FBSDKLog: fbauth2 is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0
Any idea what this is? I have added
To build your app for iOS 9 : ( For Facebook Share )
Info.plist
file , add another field LSApplicationQueriesSchemes under Information Property List and set it's datatype Array
or NSArray
.String
or NSString
.fbauth2
, fbshareextension
, fbapi
as item value .Follow this photo :
If you are using iOS9 then this is important to update your info.plist file. You just need to do 3 steps 1. Go to info.plist 2. Add a field namely LSApplicationQueriesSchemes NSArray datatype. 3. Add an item of NSString datatype name it as fbauth2.
Thats it. Just clean and run. warning wont show again.
I got this when running my Kiwi tests as our test target didn't have access to main bundle. So I had to add a condition to isRegisteredCanOpenURLScheme
in FBSDKInternalUtility.m
+ (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme
{
static dispatch_once_t fetchBundleOnce;
static NSArray *schemes = nil;
dispatch_once(&fetchBundleOnce, ^{
schemes = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"LSApplicationQueriesSchemes"];
if (!schemes) { // This is a work around for our Kiwi tests as the Specs target doesn't have access to main bundle
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *path = [bundle pathForResource:@"Info" ofType:@"plist"];
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:path];
schemes = [dictionary valueForKey:@"LSApplicationQueriesSchemes"];
}
});
return [schemes containsObject:urlScheme];
}