How to make a Keyboard extension's name shorter (via info.plist keys)

683 views Asked by At

I am developing a Keyboard Extension for iOS 8.

Everything is ok but when I run on device, the name of the Keyboard is "myBoard - mBoard". I would like it to just be "myBoard".

My extension info.plist is:

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-    1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Meboard</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>tapi.Meboard.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSHasLocalizedDisplayName</key>
<false/>
<key>NSExtension</key>
<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>IsASCIICapable</key>
        <false/>
        <key>PrefersRightToLeft</key>
        <false/>
        <key>RequestsOpenAccess</key>
        <true/>
    </dict>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.keyboard-service</string>
    <key>NSExtensionPrincipalClass</key>
    <string>${PRODUCT_MODULE_NAME}.myBoard</string>
</dict>

Please help me solve this problem.

3

There are 3 answers

1
Meenakshi On

In your Contaning app, set the Bundle Display Name empty and in your Keyboard Extension set the Bundle Display Name "MyBoard".

After making this changes, it will show "MyBoard -"

1
Ben Lachman On

It seems like this isn't consistently possible as of iOS 8.1. We've experimented with numerous combinations of display keys and while it seems that you can in some case simply appear as "myBoard" or whatever your keyboard name is, it seems impossible to appear as simply "myBoard" and not "myBoard - myBoard" (or something similar) in all cases.

The set up we ended up with is as follows:

CFBundleName: identical on both container app and keyboard extension
CFBundleDisplayName: only present for the keyboard extension CFBundleExecutable: the same as CFBundleDisplayName on the Keyboard extension, the normal ${EXECUTABLE_NAME} for the container app.

This is the best we've found. I'll update if I figure out anything better.

0
Red Mak On

To have what you want you should set the display name EXACTLY the same in both info.plist files (app and extension).