4

I have created a custom keyboard plugin to support the Amharic character set (an Ethiopian dialect). The issue I'm having is that iOS doesn't have any Amharic support built in, this means that in other apps that use my keyboard, the characters appear as question marks.

Is there a way to install a custom font systemwide to make it available to all the user's apps. For example, I'd like a user to be able to type into the Notes app in Amharic.

I remember installing another Amharic keyboard from an app and it prompted me to install a new profile which did make the font available. But I'm unsure about what I need to do to make this happen in my keyboard component.

enter image description here

sam_smith
  • 6,023
  • 3
  • 43
  • 60
  • directly we can't do it for all UIElements of the app, we have to set programatically [UIFont fontwithname:@"customfontname"] for all labels and textbook where we need custom font to show – Max Jul 20 '15 at 10:50
  • I do not know if you have the ability to modify the font of the whole iPhone according to Apple's HIGs. – hoya21 Jul 20 '15 at 11:04
  • check this link http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/ – Ishu Jul 20 '15 at 12:08
  • Thanks for your replies, my problem is slightly different to what you have posted. I am trying to add a font system wide to my iOS device rather than adding a font to a particular iOS app – sam_smith Jul 20 '15 at 12:54
  • @angryTurtle what everyone is saying, and I agree, is that you can't. Apple is usually really closed when it comes to making system wide changes on a device. The recommended approach here is either to ship the font with customer apps or file a bug report. You can put your font online if it's free and other will set it up on their apps when needed. Filling a bug report seems appropriate as language support is important on the devices – André Fratelli Jul 20 '15 at 13:03
  • @Andre Thanks for the clear reply, I wasn't sure if the other comments were saying it is not possible or if they didn't know if it was possible. I think my original wording was somewhat unclear as a few users misunderstood what I was asking. I have found some information saying the Apple included font 'kefa' supports Amharic but otherwise I will file a bug report with Apple – sam_smith Jul 20 '15 at 13:14

1 Answers1

1

http://norbertlindenberg.com/2015/06/installing-fonts-on-ios/

The documentation for configuration profiles lists five ways to install them, of which the most practical ones are through email or a web server.

To install a configuration profile from email, for example for testing, simply email it to an account that you can access from the test device. If you tap on the profile icon in the email received on the device, Mail switches to Settings, which offers to install the profile. After the installation is done (or cancelled), control returns to Mail.

To make a configuration profile available for installation from a web server, store it on the web server and make sure that the extension is .mobileconfig. The content type for configuration profiles is application/x-apple-aspen-config, but Safari doesn’t seem to care whether the server reports that correctly as long as the extension is there. If you point Safari to a URL with extension .mobileconfig and reasonable content, it switches to Settings, which offers to install the profile. After the installation is done (or cancelled), control returns to Safari.

Installing configuration profiles from within apps If you want to enable installation of configuration profiles from within an app without depending on an external web server, or if you don’t want to make the configuration profile available on a web server at all, then things get a little difficult. There’s no API that enables installation of configuration profiles from within apps. A basic solution that developers have come up with involves multiple steps:

Set up a web server within the app. Configure the server to respond to a request from Safari with the configuration profile, using a Content-Type header with value application/x-apple-aspen-config. Start a background task to keep the app running in the background. Send a request to Safari to get the configuration profile from the app’s server. When receiving the profile, Safari automatically starts the installation. Once installation is done (or cancelled), control returns to Safari. In order to return from Safari to the app automatically, additional steps are necessary:

  • Define a custom URL scheme for the app so that Safari can return to the app (not its web server!) with a request.
  • Configure the server to first send an HTML page that reloads itself periodically.
  • Configure the server to send the configuration profile for the first reload, and a redirect to the app’s custom URL scheme for subsequent reloads.
  • Respond to the custom URL scheme by shutting down the web server.

Installing a configuration profile on iPhone - programmatically

Community
  • 1
  • 1
M.Z
  • 121
  • 5
  • I have uploaded a sample .mobileconfig that has DroidSansEthiopic, it's ready for install, or embed in your app. https://app.box.com/s/p32l8auh37fo6xnglgd6 – M.Z Nov 20 '15 at 08:01