to download and install font in iphone while application running - iphone

I have links to fonts from where I can download fontName.ttf. Now When user selects a particular font I want to download that and install and use it for label.
Can I add row in Plist Fonts provided by application programatically?
And where should I save the fontName.ttf so application will use it.

Settings bundle resides inside your app's bundle, thus - you cannot change it at runtime, only at compile-time. So it is not possible.
You could check out different solutions:
Core Text fonts: Dynamic custom fonts loader in iOS
NSUserDefaults: Can i modify Root.plist in settings bundle dynamically?

Not possible you can't add and delete any thing from bundle at runtime.

Related

OS X dev: how to install a new font into the system

First of all, I know about ATSApplicationFontsPath property in Info.plist. But it adds custom fonts just for my application. And I want my app to install some fonts into the OS X during the first launch. That's because my app exports text and I have to make sure that user won't lose proper text formatting opening his file in some other app.
I saw this behavior in Final Draft app. It has custom fonts in its Resources folder. And its Info.plist has no ATSApplicationFontsPath property. But somehow after the first launch Final Draft installs those fonts into the system and uses them.
How is it possible? Didn't come any close to solve this.
You could copy the font files to ~/Library/Fonts or, with admin authentication, /Library/Fonts. You may also need to call CTFontManagerRegisterFontsForURLs() with kCTFontManagerScopeUser to make them immediately available to already-running apps (including your app which installs them).
I recommend that you ask permission from the user before installing anything "permanent" like this outside of your app.

Swap default iOS system font in apps

I'm trying to build an app to install a custom set of fonts for other ios apps to use. Is it possible to change iOS 6 default set of fonts and add a custom set of font that other apps can use?
Custom (non-system) fonts must be included in an app's .plist file and must be included in the application bundle for an app to use them.
Since application bundles are read only, it is only possible for an app to use a non-system font that is included before it is distributed.
No, it's not. Apps basically can't change default configuration (like fonts, background, colors, icons, animations) from the whole OS. You can use custom fonts in your app though.

How do I change the default icon of iPhone application programmatically?

My question is about changing default icon.png content programmatically.
I have free application with Icon (with Lite/Free word inside)
I have In-App purchase inside this app (buy full version)
I click and accept this purchase
Some app content is unlocked
Also, I want my default Icon.png to be changed as well (replace it with NON Lite/Free word inside for example)
I saw this approach in some games but did not buy them to see the results.
You cannot change the application's icon at runtime. This is because it is in the application's bundle, which cannot be modified. Access to the application's bundle is restricted for security. Each bundle is code-signed by a certificate obtained through Apple's developer portal, which guarantees this condition.
To conclude, any files inside the application's bundle, like icons, or the Info.plist file, cannot be changed.
I am sure since you have purchased it you don't have source code.. but still try to look for image icon which must be in application folder.. just delete that icon and put whatever image you want with the same image name.. Also for that one.. you might have to install folder navigation icon. And then you can look in which folder it is install.. I ain't sure but it might be something called /app or /data. I am most of the time playing with android so I know for android where to look.
Thanks

Lock my iPhone app to a specific language (Localization)

I have an Xcode4 project where I have support for several languages (localization files) .. My text and xib files change correct when I change languange on my iPhone ..
My Question is;
Can I make a release to a specific languange, even if I have several localization files?
Force my app to use only one localization?
My idea would be to set a flag in the info.plist file like;
Localization = English (Lock my app to the enligsh language)
You can do this by deleting localized strings and nib files. I don't think you can lock your app to a particular language (If localization support is there for other language).
If the localized.lproj folders are in the bundle, iOS will use them. The easiest way would be to remove your localized resources folders from the bundle and build the app.
You could probably programmatically set code a workaround in your main.m class file, by stating only to use en.lproj but I can't imagine this will be either pretty or useful.
Side note: You can set your default project localisation in the Target > Info pane. Look for key: Localization native development region

do personal fonts carry over?

if i have a font that I made and use it in my app, will it uploaded with my binary etc and display when i run it on my iphone?
If it's in your bundle, it'll go with your app. Using it though is another story. The iPhone doesn't support custom fonts out of the box. You have to write a wrapper on UILabel or whatever to use it. That, or get an open source one.
If you want information on loading your custom fonts, check out this question: Can I embed a custom font in an iPhone application?
The ultimate answer is in the app bundle you build. Locate the bundle (it has file name extension "app") in the Finder, right-click it and select "Show Package Contents". Whatever is there gets into the IPA package distributed to your customers through the App Store.
With regard to fonts included in your app, see benwong's comment. You should add the font files to the Xcode project and add all the font names under the key UIAppFonts (aka "Fonts provided by application") to the Info.plist.