Skip to content

Error "[__NSCFType privateCookie]: unrecognized selector" when trying to log in Facebook #1

@vasyafomin

Description

@vasyafomin

I've got two targets in my project (one i'm using for iOS builds, second for apportable builds).
In iOS target added Facebook sdk without framework (by adding sources).
In Apportable target I'm trying to Integrate ApportableFacebookSDK:

  • there is no reference in "Compile Sources" on Facebook sdk sources which included in iOS target and no reference on Facebook.framework.
  • I added ~/.apportable/SDK/sysroot/usr/local/lib/armeabi/libFacebookSDK.a to "Link Binary With Libraries"
  • I copied this repository in my project dir, added FacebookSDK.xcodeproj in my proj and added target dependency in my apportable target on FacebookSDK target
  • I added "header_paths": ["ApportableFacebookSDK/include"] in configuration.json
  • I added "FB_APP_ID": "%app_id%" in configuration.json

All compiles fine, but when I'm trying to log in Facebook, application stuck and in log cat I see infinite flow of lines:
W/CoreFoundation﹕ +[__NSCFType privateCookie]: unrecognized selector sent to instance 0x7bd7ced0; set a breakpoint on NSUnrecognizedForwarding to debug

to log in I'm using next code:

if ( [[FBSession activeSession] state] == FBSessionStateOpen 
  || [[FBSession activeSession] state] == FBSessionStateOpenTokenExtended) {
      [[FBSession activeSession] closeAndClearTokenInformation];

} else  {
      NSLog(@"FBFBFBFBFBFBFB: loginig");
      [FBSession openActiveSessionWithReadPermissions:@[@"public_profile", @"user_friends"]
                                         allowLoginUI:withUI
                                    completionHandler:^(FBSession *session, FBSessionState state, NSError *error){}}];
}

Also Log(@"FBFBFBFBFBFBFB: loginig") is appearing in log cat before first [__NSCFType privateCookie]: unrecognised selector...

What i've done wrong? How can I fix It?
Is there other way to integrate Facebook in apportable project?
Maybe BridgeKit? (But i don't know how to implement Android method OnActivityResult() by using BridgeKit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions