I am trying to insert code into my plist for the Apple ATS changes.

If I use the example you gave to disable it:

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

Everything works fine and I can make the connection. But obviously I don't 
want to do this. I am trying to make a local connection from an iOS device 
to my PC over my home network. Apple recognize this condition, I think, 
NSAllowsLocalNetworking. From the Apple article you reference:

An optional Boolean value that, when set to YES, removes App Transport 
> Security protections for connections to unqualified domains and to .local 
> domains, without disabling ATS for the rest of your app. 
>
> If you set this key’s value to YES, then App Transport Security ignores 
> the value of the NSAllowsArbitraryLoads key in iOS 10 and later and in 
> macOS 10.12 and later. This behavior supports adoption of App Transport 
> Security protections while allowing embedded browsers to continue working 
> in iOS 9 and earlier and in OS X v10.11 and earlier. (To obtain this 
> behavior, set the value of this key to YES and set the value of the 
> NSAllowsArbitraryLoads key to YES as well.)
>
> Default value is NO.
>
>> Available starting in iOS 10.0 and macOS 10.12.
>>>
>>
If I read this correctly I have to set both 
NSAllowsArbitraryLoads and NSAllowsLocalNetworking to true. And therein 
lies my problem, whatever I do results in a build failure on the plist 
step. I have no idea how to format the plist entry.

I have tried things like:

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

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

but the build always fails. I obviously have no idea what I am doing here. 
How do I format the plist entry?


Thanks


-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/51d5d84a-2611-4601-912a-4746f3862ac0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to