Reputation: 38005
I have encountered an unfortunate design issue with the Facebook iOS SDK. The problem is our company produces many branded apps from the same prototype codebase (think restaurant ordering) that all need to interact with the same Facebook app.
The problem is that if a user has multiple brands installed on their phone, the url schemes conflict and when authenticating from one app, the user may be returned to the wrong app!
I looked into Facebook's url scheme suffixes, but the documentation says multiple suffixes are searched in order (!), not relative to the corresponding bundle id. This is horrible. If it simply associated a suffix with a particular bundle id, our problem would go away, but as it is documented, it will place precedence on certain brands over other brands, which is no better than the default behavior.
Is there any way to associate a url scheme suffix with a specific bundle id?
Upvotes: 0
Views: 507
Reputation: 15662
You can explicitly specify the suffix for each app by setting FacebookUrlSchemeSuffix in the application's plist. When this happens, for the purposes of login and share dialog, the Facebook app will know the right suffix to use.
The only time it searches down the list of suffixes is for deep linking, which you may or may not use.
In any case, you might want to have different app IDs anyways as @WizKid recommends since you'll be able to get analytics for each app, and it also becomes easier to maintain.
Upvotes: 1