react-native icon indicating copy to clipboard operation
react-native copied to clipboard

xcode 7.0beta could not connect to development server.

Open samfriend opened this issue 11 years ago • 26 comments

Today I downloaded IOS9 and xcode7.0beta which is needed for ios9

When I try to build my existing project to both simulator and iphone. It refused to load the index.ios.bundle with msg...

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

How to make this 'Temporary exceptions' in info.plist file?

thank you very much

samfriend avatar Jun 09 '15 01:06 samfriend

Adding the following to your Info.plist will disable ATS

< key>NSAppTransportSecurity< / key>
< dict>
< key>NSAllowsArbitraryLoads< / key>< true/>
< / dict>

samfriend avatar Jun 09 '15 06:06 samfriend

I think this issue shouldn't be closed, we should probably try to make this work out of the box. Or perhaps apple should allow localhost or local ips to be loaded regardless?

JohnyDays avatar Jun 09 '15 11:06 JohnyDays

File a bug with Apple if you have a case for local IPs. They might already have a way to whitelist certain IPs in which case we could add localhost. I don't think weakening security for the entire app is a good default if we can avoid it.

ide avatar Jun 09 '15 20:06 ide

I'd imagine they implemented this to prevent naive implementations of OTA updates. But I do think it doesn't make sense for local IPs. I'm not an expert on IP addresses and other network-y things, but there's a few select ip ranges that are reserved for local networks right? Perhaps that could be automatically added to the whitelist(or atleast referenced somewhere in the docs)

JohnyDays avatar Jun 09 '15 23:06 JohnyDays

It has nothing to do with OTA updates. This is blocking HTTP and requiring HTTPS. An alternative solution would be for the packager to serve a self-signed certificate though I'm not sure what it would take to get the client to accept it.

ide avatar Jun 09 '15 23:06 ide

I've added the plist entry but it's not clearing up the error. I'm using the latest Xcode Beta released this week - Version 7.0 beta 3 (7A152u)

danielkramer avatar Jul 10 '15 19:07 danielkramer

Works for me for Version 7.0 beta 3 (7A152u)

sergeyu avatar Jul 10 '15 21:07 sergeyu

This is fixed in master (create a new project to get the changes).

ide avatar Jul 14 '15 03:07 ide

So is there any way to update an existing project? (other than create a new one and copy files)

gunn avatar Jul 14 '15 04:07 gunn

You could look at the SampleApp's xcodeproj and manually port over the plist entry that's mentioned earlier in this thread.

ide avatar Jul 14 '15 04:07 ide

The above .plist entry worked immediately for me (on an old project ported to Swift 2).

kbpontius avatar Jul 15 '15 20:07 kbpontius

I've added the plist entry but it's not clearing up the error. I'm using the latest Xcode Beta released this week - Version 7.1 beta (7B75) Any suggestion?

DIJOiGloo avatar Sep 30 '15 01:09 DIJOiGloo

I am in the same situation, which is quite annoying since I have been working on this project for the last three months. However I am not sure if the simulator doesn't pick up the new updated info.plst or that is not working.

edo1493 avatar Sep 30 '15 08:09 edo1493

I am sorted, I was trying to change the info from xcode, but opening the file clearly showed my xml was wrong.

edo1493 avatar Sep 30 '15 08:09 edo1493

:)

DIJOiGloo avatar Sep 30 '15 23:09 DIJOiGloo

using xcode 7.1 beta 3. None of the solutions are working for me. Did any one solved for xcode 7.1 beta 3?

fatinWasta avatar Oct 26 '15 05:10 fatinWasta

tried, the above solutions not working for me either. Any suggestion?

yychun1217 avatar Oct 27 '15 09:10 yychun1217

Yes I can

DIJOiGloo avatar Oct 27 '15 22:10 DIJOiGloo

Am using Xcode Version 7.1 beta (7B75)

DIJOiGloo avatar Oct 27 '15 22:10 DIJOiGloo

What's the solution here? I read the app faces rejection possibility if this is in your plist.

niftylettuce avatar Dec 08 '15 01:12 niftylettuce