React Native iOS simulator network images not loading - ios

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

Related

Fetch (or Axios) in react native not working for expo for iOS apps

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.

iPhone HTTP Request failed by real device

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

Xcode 6.4 The Application You Have Selected Does Not Exist

I am trying to submit to iTunes Connect with Xcode 6.4. I am getting this error
Unable to Validate Your Application
The application you have selected does not exist.
I am able to find the provisioning profile through my dev account on the previous step. I have double-checked all identifiers. I tried Application Loader as well and got basically the same error. What is weird is that I submitted another app several hours before to the same account with no issues. Any help would be greatly appreciated.
I tried Application Loader and it worked. It did not work 2 hours earlier. What is weird is that I tried to download an app from the App Store and they could not find my account. Some new terms of service popped up and I agreed. After that I was then able to download with the previous "non-existent" account. That's when I tried App Loader and it worked. Must be something on Apple's side that will be fixed shortly.
I was having the same issue, here's what I did to send the app to the app store:
On XCODE create generate the "Archive", once you get the "Organizer" window/popup, validate it as you normally do. If validated, then click "Export" and select "Save for iOS app store deployment". Save it somewhere and take note of this location, you'll need the IPA file.
Install the "Application Loader" from https://itunesconnect.apple.com/apploader/ApplicationLoader_3.1.dmg, if you don't have it already.
Follow the easy steps to push the app to the app store. That is "Deliver your app", select the IPA file and that's it!
While other are having success with Application Loader, I did not and received a different error « You are not authorized to use this service » Great!
Since iOS 9.1 was just released yesterday perhaps Xcode 6.x is being phased out, but we're not ready to migrate to Xcode 7.x for this particular project.
I was successful by archiving in Xcode 6.x and using the Organizer in Xcode 7.1 to submit to the App Store. The procedure is as follows:
Rename Xcode 6.x (In my case Xcode632.app).
Download and install Xcode 7.1 from .dmg file, not as an upgrade.
Build and archive your app in Xcode 6.x
Close Xcode 6.x
Launch Xcode 7.1 but do not open your project.
In Xcode 7 Select Window->Organizer.
Submit to App Store.
Hopefully this helps you if both the Xcode and Application Loader uploads fail.
Download Xcode 7 and try to upload new build make sure that you changed version or (and) build number of app, it should work.
It seems to be a bug/"feature" of iTC not related to Xcode version. Bundled frameworks should bump their versions(CFBundleShortVersionString) to match the version of the app.
Related topics:
https://github.com/CocoaPods/CocoaPods/issues/4421
https://github.com/Carthage/Carthage/issues/859
Exporting and uploading via Application Loader worked for me.
Failed to upload archive using Xcode 6.4 and 7.1, but successfully uploaded with Xcode 7.0.1.
http://adcdownload.apple.com/Developer_Tools/Xcode_7.0.1/Xcode_7.0.1.dmg
UPDATE: It appears that Apple has remedied this bug. I just successfully uploaded a build using Xcode 6.4 to iTunes Connect. I believe this was either an organizer bug or an iTC bug but they've fixed it.
Before the solution was to use application loader.
You should be able to submit using Xcode 6.x now. We need to upload build from 6.x still because Xcode 7 requires a lot of refactoring due to ATS. The standard "AllowArbitraryLoads" doesn't cut it for my project.
It looks like this can be caused by some new version number validation logic on Apple's end. In our case, tacking an extra ".1" onto the end of the version number strings for the app allowed it to be uploaded with Application Loader.
Really weird/deceptive that the error message for this would be "The application you have selected does not exist", though.
I was having the same issue. I tried to upload with Application loader then got descriptive errors about the bundle version. After removing all third party info.plist from pods and static libs, will work to upload my build.
I fixed this issue. I had to update my OSX to 10.10.5 and XCode to 7.0.1. In XCode you need to set few keys. NSAppTransportSecurity Key is required if your app or game needs internet access. After this setup it works perfectly from xcode it self. And no issue on live itunes connect.
<key>UIRequiresFullScreen</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>domain.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<false/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<false/>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
My solution for similar problems is use of Fastlane Tools https://fastlane.tools
First You can use GYM tool for build/archive your project, and then Pilot for send it to iTunesConnect Testflight.
This tool fixes all of my problems with Code signing, submitting, etc. so I can recommend it.

iOS 9.1 Images and Videos not displaying in app

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/

XCode - Swift - App Transport Security has blocked a cleartext HTTP (http://) error

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.

Resources