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:

enter image description here

App-Info.plist:

enter image description here

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:

enter image description here

I have tried some of the almost similar solutions, but none of them work for me. Can anyone point me in the right direction?

+3


source to share


1 answer


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 add user-defined setting

    .

enter image description here

Then I set my custom values ​​( FB_SCHEME

) to staging

for assembly staging

and vice versa.



  • In my App-info.plist

    file. I installed FacebookURLSchemeSuffix

    and URL scheme

    the following values:

enter image description hereenter image description here

Now when I switch between schemas it sets the value ${FB_SCHEME}

to production

or staging

. What is it.

+3


source







All Articles