Falling back to loading access token from NSUserDefaults because of simulator bug

23,536

Solution 1

I have this problem, too. It seems to be caused by an the Facebook SDK's Login Access Token. It caches just fine on a real device, but not on the simulators. Try running the app from a physical device.

Solution 2

You can ignore this warning, it's hard coded in the FacebookSDK when using the iOS Simulator. The SDK does contain a bug though which prevents the simulator from caching the access token.

You can fix this by adding the following line:

key = [NSString stringWithFormat:@"%@_fix", key];

in FBSDKKeychainStore.m:94 and FBSDKKeychainStore.m:135 just before:

[[NSUserDefaults standardUserDefaults] setObject:value forKey:key];

Solution 3

I had the same problem. I tried to run in real device and this show error with OAuth Login Then I just turn OAuth Login on and everything works well Turn on OAuth Login

Share:
23,536
Admin
Author by

Admin

Updated on March 03, 2020

Comments

  • Admin
    Admin about 4 years

    Xcode log show the above error while running in Xcode 8.1, ios 10.1. Is there any problem or should I ignore and continue?

  • AndrewHenderson
    AndrewHenderson over 7 years
    I can't seem to locate that file in my filesystem. Is this still accurate with version React Native >=0.37?
  • AndrewHenderson
    AndrewHenderson over 7 years
    My React Native app continues to run just fine on the physical device. Is there any fix to get it running again on the simulator?
  • Jorn van Dijk
    Jorn van Dijk over 7 years
    I don't know which version React Native is using. I'm referring to github.com/facebook/facebook-ios-sdk/blob/….
  • ibtokin
    ibtokin over 7 years
    Try uninstalling it on the simulator and running again. I can get it to work, but I have to uninstall it each time. Your results may vary.
  • jungledev
    jungledev almost 7 years
    Is this really a fix? You're still storing the key in NSUserDefaults. I would only consider this a fix if you're able to provide a solution that modifies the code to work in the simulator the same way it would on a real device
  • Gowtham
    Gowtham over 6 years
    where can i found FBSDKKeychainStore.m file?
  • eemrah
    eemrah over 5 years
    how did you even test the login status before the problem if it was disabled for OAuth Login?
  • eemrah
    eemrah over 5 years
    @gowtham in project, you can search it with CMD + Shift + O