I have develop one application in which there are so many photos and videos.
I have develop this app in xcode6.3 and it will work perfectly but now i have installed new xcode7.1 and when i'm trying to run this app in xcode7.1 it will run perfectly but i haven't seen any videos and images of my app.
Is that any chnage that i have to do in my code or is it any other problem
Starting from Xcode7 Apple mandates that all url access should be HTTPS as a part of Apple Transport Security (ATS)
To overcome this you have to add the following item in your app info.plist file
You can bypass this by adding this key to your info.plist of the project
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
for more details about ATS refer NSURLSession/NSURLConnection HTTP load failed on iOS 9
http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/
Related
I have a react native app created. Image assets and react-native-vector-icons are loading correctly. But network images are not loading. Images are being fetched from aws as signed url. Those links are working correctly on android.
Tried this fix - https://github.com/facebook/react-native/issues/29279#issuecomment-658244428
I don't think the patch fix is required https://github.com/facebook/react-native/issues/29279#issuecomment-657284028 as my react-native version is 0.70.1
App Information
"react-native": "0.70.1"
Xcode Version 13.2.1 (13C100)
ok. the URL you shared is http and iOS does not all http request. to allow http request in iOS please add this to info.plist file
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
for more details please see this question and answer
iOS doesn't allow to navigate to http only url, allowing only https.
There is a solution, which is changing some code inside info.plist file
https://github.com/facebook/react-native/issues/8717
How can I change settings for iOS, as it comes with only .expo folder but nothing else.
Do I need to change server configuration for this at last? :(
As you properly find out, the problem is that iOS do not allow arbitrary calls to non-secure(http only) domains. It was a feature introduced with iOS 9 in order to push developers onto more secured connections.
As per writing of this(mid 2017), there is workaround. You should open
{Your-project}/ios/{Your-project}/Info.plist
and set proper values for the domain you are targeting(docs).
Following example will disable ATS and allow HTTP call to somedomain.com:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
In your situation, I believe you are looking for the Info.plist file in the wrong place. It is not part of the node modules, instead look at the ios path specified above.
Unfortunately Expo doesn't allow you to modify the App Transport Security Settings but may bake in a configuration option. Here's a Github thread.
You can eject from Expo but only do this if you are 100% sure.
This will give you a project very similar to one created by react-native init
This features an ios and android directory, navigating to ios/YourProject/ will reveal Info.plist.
How much of a struggle would it be to install an SSL certificate on your server? It may be more beneficial to do this and you can use a free service like letsencrypt.
I develop iPhone App which use local rails server for development.
Before the problem, the app could connect to rails server through WiFi.
But, recently the app could not connect to rails server sometimes.
This is the problem I met
1. HTTP Request can not reach to rails server because the rails log do not show nothing.
2. iPhone log show HTTP Request failed because time out.
Environment
1. AFNetworking 3.0.4 I use AFHTTPSessionManager for HTTP Request
2. I user real iPhone devices that are iPhone6s plus iOS 9.2.1, iPhone6 iOS 9.2 and iPhone5s iOS 8.2. All device show same problem.
What I do
1. Changed AFNetworking version 2.6.3 to 3.0.4. But ineffective.
2. Reinstall app. First some times OK. But at a minute same problem occurred.
Anyone know the solution?
I have developed the app for a few months, but recently sudden the problem occurred. I do not know at all why this is happened.
for the http request now you need to add those line in your plist <key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Starting from iOS9 you should provide NSAppTransportSecurity key value in your plist file to use HTTP (not HTTPS):
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33
I'm working on my app, I wanted to add AdMob banner like I always do without any problem before, but now on this new app it doesn't show up.
The banner ad is in one of the UITableViewCell's, and I get this log message:
-canOpenURL: failed for URL: "kindle://home" - error: "(null)"
I have disabled Bitcode and I have added the App Transport Security and NSAllowsArbitraryLoads in the info.plist file.
Update to the latest AdMob SDK. This issue was fixed in 7.5.0:
SDK no longer uses UIApplication's canOpenURL method on iOS 9 devices.
AdMob for iOS Release Notes
I simply pasted this into my info.plist file and it all worked
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
as per https://developers.google.com/admob/ios/ios9
I have been trying to deal with this problem for a while now, and I'm hoping someone has a solution that I haven't yet seen.
I am using XCode 7 and am testing my app on an iPad (ios 9 beta). I have tried adding the code below to every instance of Info.plist and it doesn't work.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
I have tried decreasing the Deployment Target to 8.4. I have tried restarting both my laptop I am developing on and the iPad.
I just don't know what else to do. Thanks.
You may just be adding it in an invalid position, it should be inside the main <dict> tag. Try adding as the first element in the first dictionary like this.