iOS 9 “fbauth2” missing from Info.plist

后端 未结 9 1563
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 06:23
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

相关标签:
9条回答
  • 2020-12-02 07:03

    To build your app for iOS 9 : ( For Facebook Share )

    1. Open Info.plist file , add another field LSApplicationQueriesSchemes under Information Property List and set it's datatype Array or NSArray .
    2. Add 3 items for LSApplicationQueriesSchemes and set their datatype to String or NSString .
    3. Assign fbauth2 , fbshareextension , fbapi as item value .

    Follow this photo :

    0 讨论(0)
  • 2020-12-02 07:05

    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.

    0 讨论(0)
  • 2020-12-02 07:07

    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];
    }
    
    0 讨论(0)
提交回复
热议问题