IOS "connection refused" for HTTP requests

78 views
Skip to first unread message

Dave Dyer

unread,
Aug 30, 2016, 1:47:40 PM8/30/16
to CodenameOne Discussions

The IOS requirement to use this build hint to permit HTTP requests seems to have kicked
in today.  I'm not sure if this is because of something apple changed or something codenameone
changed.


ios.plistInject
<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/></dict>


No word yet on if apple will start giving grief when reviewing apps which use this hint.

Shai Almog

unread,
Aug 31, 2016, 12:14:22 AM8/31/16
to CodenameOne Discussions
Nope. Apple won't accept your app without a good reason.

Carlos Verdier

unread,
Aug 31, 2016, 10:10:24 AM8/31/16
to CodenameOne Discussions
I assume this is because you switched to the new Xcode version. 

Is iphone_old working? My builds are queued and can't get them compiled. 

Although I have a good reason to overcome the ssl security, i'd like to avoid this situation at least in the first release.

Carlos Verdier

unread,
Aug 31, 2016, 10:49:26 AM8/31/16
to CodenameOne Discussions
Ok, forget it, I got the green light finally :)

nickk...@gmail.com

unread,
Aug 31, 2016, 10:00:31 PM8/31/16
to CodenameOne Discussions
I don't know how long its going to work for, but you can put specific exceptions for individual domains in rather than a blanket exception and we've not had problems getting Codename One or Native apps approved for the app store recently with Apple.

Shai Almog

unread,
Sep 1, 2016, 1:25:53 AM9/1/16
to CodenameOne Discussions, nickk...@gmail.com
Generally when you add exceptions you need to explain why you asked for that exception. We just got a reject because kitchen sink had a link to codenameone.com which has a paid signup process...

I am not kidding!!!

I had to explain to the tester that this signup has nothing to do with the app and that there is no benefit to signing up or not which is reflected in the app. Ugh.

Carlos Verdier

unread,
Sep 1, 2016, 4:22:45 AM9/1/16
to CodenameOne Discussions, nickk...@gmail.com
Yes, I know I can add specific exceptions, but it won't work for me. I'm developing a magazine app where advertisers want their URLs open in an internal browser, so I can't possibly know what those webpages will be in advance. 

Anyway, I don't take anything for granted. As Shai say, you can be rejected for the most weird reasons, depending on which tester is reviewing, that's why I want to avoid any kind of problem in the first release. In my experience, updates are more easily approved.

Dave Dyer

unread,
Sep 1, 2016, 4:26:29 PM9/1/16
to CodenameOne Discussions, nickk...@gmail.com
You could arrange your service to proxy links.  There are even advantages - you get to monitor what your
network is being used for.


On Thursday, September 1, 2016 at 1:22:45 AM UTC-7, Carlos Verdier wrote:
Yes, I know I can add specific exceptions, but it won't work for me. I'm developing a magazine app where advertisers want their URLs open in an internal browser, so I can't possibly know what those webpages will be in advance. 

Anyway, I don't take anything for granted. As Shai say, you can be rejected for the most weird reasons, depending on which tester is reviewing, that's why I want to avoid any kind of problem in the first release. In my experience, updates are more easily approved.

It never ends.  Every n'th release, some approver trying to make their quota finds something new to complain about.
I just got hit because my screen shots "weren't representative enough"

Jérémy MARQUER

unread,
Sep 16, 2016, 4:17:04 AM9/16/16
to CodenameOne Discussions
FYI,

If you're on iOS 10, you can use the new key : NSAllowsLocalNetworking (see https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html).
Reply all
Reply to author
Forward
0 new messages