0

I'm trying to use one LinkedIn app for multiple whitelabel versions of an App.

I've successfully got FB doing this - and it appears LinkedIn should be very similar, but cannot successfully get LinkedIn to return to correct app (when others are installed). Sometime it doesn't return, sometimes it goes to the other app sharing the same LI App ID...

I've added the bundleIDs com.bethegame.app1 and com.bethegame.app2 to the LinkedIn Mobile App, and added app1 and app2 as Suffixes for LinkedIn iOS mobile App.

Here's what's in my plist for each app...

        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>com.bethegame.app1</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>app1</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb123456789012345</string>
        </array>
        <key>FacebookUrlSchemeSuffix</key>
        <string>app1</string>
    </dict>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>com.bethegame.app1</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>li1234567-app1</string>
        </array>
        <key>LISuffix</key>
        <string>app1</string>
    </dict>

Like I say FB works although 'FacebookUrlSchemeSuffix' is documented, the LinkedIn 'LISuffix' is not?

halfer
  • 19,824
  • 17
  • 99
  • 186
Jules Burt
  • 115
  • 2
  • 7
  • All these apps have the same url scheme? – Lumialxk Jul 07 '16 at 00:03
  • Sorry I'm not clear on what you're asking? Each app would be unique in terms of the urlscheme - see above where each different app would have app1, app2, app3 etc...as a referenced suffix. – Jules Burt Jul 07 '16 at 17:28

1 Answers1

1

To support multiple iOS apps sharing a single LinkedIn App, go to your LinkedIn developer account, find your app and go to the Mobile settings section. Add the necessary iOS Bundle Identifiers and iOS URL Scheme Suffixes under the iOS Settings section. Note down the Application Id shown on that screen.

In your Xcode, open your project's info.plist file and add the following:

<key>LIAppId</key>
<string>{LinkedInAppId}</string>
<key>LISuffix</key>
<string>{suffix}</string>

And the following into the CFBundleURLTypes:

<dict>
    <key>CFBundleURLName</key>
    <string>li{LinkedInAppId}</string>
    <key>CFBundleURLSchemes</key>
    <array>
        <string>li{LinkedInAppId}-{suffix}</string>
    </array>
</dict>

Replace the {LinkedInAppId} with the Application Id you just noted down, and replace {suffix} with the one you just added on the developer website.

Casey
  • 116
  • 3