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
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.