Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit ddca9c6

Browse files
[[ Bug 16299 ]] Add possibility to disable ATS in the S/B
ATS (Application Transport Security), added in iOS SDK 9.0, won't let you load unsecure, HTTP URLs unless specified in the Plist file. A checkbox has been added in the S/B to let users choose whether that rules should be respected (the default is to comply to the new Apple rule)
1 parent 136c2ec commit ddca9c6

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed

docs/notes/bugfix-16299.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Unable to mobileControlSet URL with http:// URL on iOS 9.1 Simulators and Devices

docs/notes/feature-ats.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Application Transport Security (ATS)
2+
3+
Apple introduced in iOS SDK 9.0 the Application Transport Security which 'enforces best practices in the secure connections between an app and its back end' (see [the technical notice](https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW14)).
4+
5+
The most noticeable effect on applications created using Xcode 7.0 (and following versions) is that URLs using *HTTP* protocol are no longer considered valid, and the iOS engine will not process them; only URLs using *HTTPS* are deemed secure enough, and will be loaded.
6+
7+
This means that `nativeBrowser` cannot load a webpage such as [http LiveCode](http://www.livecode.com), but will happily load [https LiveCode](https://www.livecode.com). The same applies to the LiveCode function *url*.
8+
9+
To allow our users to create apps letting Web navigation accept unsecure webpages, we added a checkbox **Disable ATS** in the Standalone Settings for iOS, in the Requirements and Restrictions section. If you check this box, then *ATS* will be disabled, and the application can load Webpages using *HTTP* (as it used to do).

engine/rsrc/mobile-device-template.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<array>
6363
${DEVICE_SUPPORT}
6464
</array>
65+
${DISABLE_ATS}
6566
<key>UIRequiredDeviceCapabilities</key>
6667
<dict>
6768
${DEVICE_CAPABILITY}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<key>NSAppTransportSecurity</key>
2+
<dict>
3+
<key>NSAllowsArbitraryLoads</key><true/>
4+
</dict>

engine/rsrc/mobile-template.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<array>
2222
${BUNDLE_ICONS}
2323
</array>
24+
${DISABLE_ATS}
2425
<key>CFBundleDisplayName</key>
2526
${BUNDLE_DISPLAY_NAME_SUPPORT}
2627
<key>MinimumOSVersion</key>

ide-support/revsaveasiosstandalone.livecodescript

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,7 @@ private command revCreateMobilePlist pSettings, pAppBundle, pTarget, pFonts, pPl
11971197
----------
11981198

11991199
local tDisplayName, tMinimumOS, tDeviceFamily, tRequiredCapabilities, tPersistentWifi, tExitsOnSuspend
1200+
local tDisableATS
12001201
local tFileSharing, tPrerenderedIcon, tBackGroundAudio
12011202
put pSettings["ios,display name"] into tDisplayName
12021203
put pSettings["ios,minimum version"] into tMinimumOS
@@ -1236,6 +1237,12 @@ private command revCreateMobilePlist pSettings, pAppBundle, pTarget, pFonts, pPl
12361237
put "true" into tExitsOnSuspend
12371238
end if
12381239

1240+
// SN-2015-02-11: [[ Bug 16299 ]] Add ${DISABLE_ATS} in the Plist template
1241+
if pSettings["ios,disable ATS"] then
1242+
put URL("binfile:" & mapFilePath("DisableATS.plist")) into tDisableATS
1243+
end if
1244+
1245+
12391246
----------
12401247
-- PM-2015-02-17: [[ Bug 14482 ]] Added a new "solid" statusbarstyle
12411248
local tStatusBarHidden, tStatusBarStyle, tIPadStatusBarHidden, tStatusBarSolid
@@ -1314,6 +1321,7 @@ private command revCreateMobilePlist pSettings, pAppBundle, pTarget, pFonts, pPl
13141321
-- SN-2015-02-02: [[ Bug 14422 ]] We now have minimum version depending on the arch.
13151322
replace "${MINIMUM_OS_SUPPORT}" with "<string>" & tMinimumOSByArch["i386"] & "</string>" in pPlist
13161323
replace "${CUSTOM_FONTS}" with tCustomFonts in pPlist
1324+
replace "${DISABLE_ATS}" with tDisableATS in pPlist
13171325

13181326
get empty
13191327
repeat for each item tItem in tDeviceFamily
@@ -1635,6 +1643,9 @@ function mapFilePath pPath
16351643
case "BetaReportEntitlement.xcent"
16361644
put tRepo & slash & "engine/rsrc/template-beta-report-entitlement.xcent" into tPath
16371645
break
1646+
case "DisableATS.plist"
1647+
put tRepo & slash & "engine/rsrc/mobile-disable-ats-template.plist" into tPath
1648+
break
16381649
case "RemoteNotificationSettings.plist"
16391650
put tRepo & slash & "engine/rsrc/mobile-remote-notification-template.plist" into tPath
16401651
break

0 commit comments

Comments
 (0)