...Please verify you have configured your app for Application Transport Security compatibility described at https://developers.facebook.com/docs/ios/ios9
We were getting App Transport Security errors in the simulator (Xcode 7 running on OSX 10.10.5). We implemented FB guidelines for iOS9.
FB graph api invoked was that based on SDK v.3.24.
The errors looked like those the Facebook documentation in lack of ATS info.plist configuration, i. e.:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
Related
I have an app and I am trying to download file which is on AWS S3 and 5mb. I am having no issue with cellular but with comparingly slow wifi (not so slow about 120 kb/s), the download stops about 10%. I was searching a lot and did some motification on info.plist but didn't help. Below you can see what I used in info.plist and logs during download.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>amazonaws.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<false/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<true/>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
<key>NSRequiresCertificateTransparency</key>
<false/>
</dict>
</dict>
</dict>
log output:
2019-06-04 22:17:36.828347+0300 My App [12042:57908] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C3.1:2][0x7fdd3c72a8e0] get output frames failed, state 8196
I try to request with HTTPS but it not worked ios 8 and ios 9 for this problem I chanced the info.plis like below. But i still get error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>domainname.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
</dict>
</dict>
How can I solve this problem ? Could you help me?
I can't make my app to login to facebook after i updated to IOS 9.
I'm using Facebook-iOS-SDK (4.0.1). I followed the steps from https://developers.facebook.com/docs/ios/ios9
Here is what i get:
2016-02-08 22:30:12.962 Test[46890:887841] -canOpenURL: failed for URL: "fbauth://authorize/?auth_type=rerequest&client_id=1567056303561905&default_audience=friends&display=touch&e2e=%7B%22init%22%3A1454963412954%7D&redirect_uri=fbconnect%3A%2F%2Fsuccess&response_type=token%2Csigned_request&return_scopes=true&scope=email&sdk=ios&sdk_version=4.0.1&state=%7B%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A0%2C%220_auth_logger_id%22%3A%22726D5E62-ED16-43E4-A946-1266F17C8CA4%22%7D" - error: "(null)"
2016-02-08 22:30:20.954 Test[46890:888120] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
Any thoughts?How do i fix that?
UPDATE:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key><true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key><false/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-api20140430</string>
Thanks.
notice the App Transport Security - now you have to connect via https (and not http)
if you want you can edit it in the plist and allow specific urls with http and not https, but this is not recommended
I am trying to fix CFNetwork SSLHandshake failed (-9806) warning.
My app working well but when I run app through Xcode in device, app crashing.
I've added NSAppTransportSecurity in .plist,
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourserver.com</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow insecure HTTP requests-->
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
Also Tested with different 3g/wifi's.
Need help. Thanks in advance.
Go through this link
Also try with different versions of TLS like below.
<key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string>
Also check with this by adding to your app's Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>YOUR_HOST.COM</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>1.0</string>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
I'd the same problem. After reading this post CFNetwork SSLHandshake failed iOS 9, I put this on Info.plist and now works:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
I have a problem with facebook and vk.com integration. When I'm trying to authorize a user all I get is
-canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"
and
-canOpenURL: failed for URL: "vkauthorize://authorize" - error: "(null)"
in the console.
I already updated info.plist like that:
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-api20140430</string>
<string>fb-messenger-api</string>
<string>fbshareextension</string>
<string>twitter</string>
<string>whatsapp</string>
<string>wechat</string>
<string>line</string>
<string>instagram</string>
<string>kakaotalk</string>
<string>pinterest</string>
<string>vk</string>
<string>vkauthorize</string>
</array>
....
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
but it still don't work on device/simulator.
What did I miss?
I'm using Facebook SDK 4.6
P.S. tried Facebook SDK 4.7.0
-canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
So, I found the source of all the troubles in my case.
There were incredible mistakes in my plist.info.
In URL schemes fb app id was like "fb(nnnnnnn)" (the right format is "fbnnnnnnn").
in FacebookAppId my app id was like "{nnnnnnn}" (the right format is "nnnnnn").
I don't think these mistakes were made by me, but I can't be sure here.
I know this is old question but I had the same error so replacing pod
pod 'FacebookCore'
pod 'FacebookLogin'
with
pod 'FBSDKCoreKit', '~> 4.38.0'
pod 'FBSDKLoginKit', '~> 4.38.0'
solved my problem. Might be helpful to someone.