0

I've a problem and I'm going crazy. I really don't know how to figure it out and can't find any helpful resources on the web..

In my app I'm implementing the social login with Facebook. I'm using FB SDK 4.5.

if I run the app on a device with iOS 8 everything works like a magic.

If I run it on a device with iOS 7, I can see the web view with for Facebook authorization (if FB app is not installed) otherwise I see the app switching from my app to Facebook app an then both if the app is coming from the web view or from the app.. the screen becomes black and after 3-4 seconds it crashes. The only error message I receive is

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString containsString:]: unrecognized selector sent to instance 0x398098'

I fI try to debug I see that the app stops here

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                          openURL:url
                                                sourceApplication:sourceApplication
                                                       annotation:annotation];
}

Please, please, please have you any idea of what is happening?

Is that a compatibility problem with FB SDK 4.5 and iOS 7? Am I missing something?

Tahnks

EDIT

Just downloaded the latest version of FB SDK: with the 4.6 everything works as a magic. Same code.

The question was not a duplicate since I don't use containsString anywhere. Maybe it was used into FB SDK 4.5. Hope to help someone.

EDIT 2 !

As pointed out in this question and the relative answer

Linker Error in iOS

the FB SDK 4.6 has a bug. No way to make it work.

Try to download the 4.5.1. version instead (link in the answer above). That definitely solved the problem.

Community
  • 1
  • 1
Miwi
  • 774
  • 4
  • 15
  • 28
  • Read the error message. Then read the docs for `NSString containsString:`. When was it added? What version of iOS is causing your issue? – rmaddy Sep 26 '15 at 15:51
  • @rmaddy iOS 7 is causing the problem. In my code, in all the project i never use containsString. Could you tell me witch one is the duplicate question? – Miwi Sep 26 '15 at 15:54

0 Answers0