I am trying to implement a keyboard extension, which can display keys depending upon the language chosen by the user in Settings of the device.
In Edit Scheme, I have correctly setup the Application Language and Application Region for both Container app and extension as shown:
But still my keyboard always open up in English(en-US) version.
In info.plist, I have already added mul for PrimaryLanguage:
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IsASCIICapable</key>
<false/>
<key>PrefersRightToLeft</key>
<false/>
<key>PrimaryLanguage</key>
<string>mul</string>
<key>RequestsOpenAccess</key>
<false/>
</dict>
Moreover, I have localized key names.
I logged what language is being interpreted by app using:
var lang : String = NSLocale.preferredLanguages()[0] as! String
NSLog(lang)
Container app does detect correct language as ur. But keyboard Extension always picks up en-US. I am using xcode 6.4 and testing on Simulator iOS 8.4.
I am probably missing out a very small point here. Any suggestion is welcome. Thanks.