Reputation: 2210
Working with iOS Facebook SDK 3.0, it needs to define FacebookAppID and the related URL Scheme with it on the info.plist of the app. I want to define these remotely (request to my own server for app id). So 2 different questions:
Upvotes: 4
Views: 2899
Reputation: 3090
1.1 No you cannot alter the Info.plist file at runtime.
1.2 No you cannot load another plist file to override settings in Info.plist.
2.1 Yes, you can define FacebookApID without altering Info.plist file, by calling [FBSettings setDefaultAppID:@"Your Facebook App ID"];
See the source code of FBSettings.h in Facebook iOS SDK.
2.2 No, URL Scheme must be defined in Info.plist so iOS can recognize it. I believe that the URL Scheme is read by iOS when installing your app, and it is cached elsewhere in system. Even if you can alter your Info.plist, the system won't pick up your new URL Scheme. But don't worry, there's a workaround for Facebook authentication without using URL schemes! We can force the Facebook iOS SDK to use UIWebView for login, see this stackoverflow question.
Upvotes: 14
Reputation:
This is not possible, for multiple reasons:
These are just a handful I could think of off the top of my head, I'm sure there are many more.
Upvotes: 2