OceanLabs / FacebookImagePicker-iOS

A Facebook image picker providing a simple UI for a user to pick photos from a users Facebook account. It provides an image picker interface that matches the iOS SDK's UIImagePickerController.
https://www.kite.ly
MIT License
103 stars 56 forks source link

Doesn't work on ios9 #11

Closed piotrros closed 8 years ago

piotrros commented 8 years ago

Hi, I've just updated to xcode 7 and ios 9. Library wasn't working so I installed latest update via cocoa pods. But problem persisted. After sending request facebook app is not opening, but safari with facebook page instead. I'm giving permission and it gets back to the app. Then I'm getting following error:

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

thrown right there:

id data = [result objectForKey:@"data"];
if (![data isKindOfClass:[NSArray class]]) {
     handler(nil, parsingError, nil);
     return;
}
kkarayannis commented 8 years ago

That's an issue with iOS 9's App Transport Security feature. Take a look at number 2 here: https://developers.facebook.com/docs/ios/ios9

After you do that, both the old version and the new will work. However I think the expected behavior for the new version is to present Safari View Controller rather than switching to the Facebook app.

piotrros commented 8 years ago

Thanks a lot! Adding that security stuff to plist file solved the problem!