Facebook iOS SDK 4.2: Invalid URL schemes for multiple apps
I need to use the same Facebook app id for mine staging
and production
assemblies. I have defined the url schemes suffix in my app .plist
and configured the dashboard with the required Bundle ID and url schemes, following exactly how to share the app ID across apps .
Toolbar url scheme suffix:
App-Info.plist:
The thing is, I can connect to Facebook correctly in my build staging
, but when I try to login production
, it crashes and breaks like this:
I have tried some of the almost similar solutions, but none of them work for me. Can anyone point me in the right direction?
source to share
He decided. As it turns out, I can only define one FB url scheme per scheme. I also forgot to define FacebookURLSchemeSuffix
. So what I did is I use custom settings to alternate between staging
and production
build. This is how I did it.
- Go to
Targets > Build Setttings
and adduser-defined setting
.
Then I set my custom values ( FB_SCHEME
) to staging
for assembly staging
and vice versa.
- In my
App-info.plist
file. I installedFacebookURLSchemeSuffix
andURL scheme
the following values:
Now when I switch between schemas it sets the value ${FB_SCHEME}
to production
or staging
. What is it.
source to share