Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19568] iOS: Wrong log message when ATS is explicitly disabled

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-09-22T23:02:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.1.0, Release 5.0.1
ComponentsiOS, Tooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2015-09-22T16:41:23.000+0000
Updated2015-09-24T18:13:41.000+0000

Description

When building an app that defines the ATS policy in the tiapp.xml section or custom Info.plist and the NSAllowsArbitraryLoads is set to true (i.e. disable ATS), the iOS build prints the incorrect message:
ATS enabled, but appcelerator.com sites will be unreachable
ATS is not actually enabled.

Comments

  1. Chris Barber 2015-09-22

    To test, build an app without a custom Info.plist or section in the tiapp.xml. It should say "Disabling ATS". Next add this to the tiapp.xml:
       <ios>
           <plist>
               <key>NSAppTransportSecurity</key>
               <dict>
                   <key>NSAllowsArbitraryLoads</key>
                   <true/>
               </dict>
           </plist>
       </ios>
       
    This should output "ATS explicitly disabled". Next set "NSAllowsArbitraryLoads" to false:
       <ios>
           <plist>
               <key>NSAppTransportSecurity</key>
               <dict>
                   <key>NSAllowsArbitraryLoads</key>
                   <false/>
               </dict>
           </plist>
       </ios>
       
    This should output "ATS enabled, injected appcelerator.com into ATS whitelist". Next, add the following property to test disabling the injection of appc.com:
       <property name="ios.whitelist.appcelerator.com" type="bool">false</property>
       
    Build again and you'll see "ATS enabled, however *.appcelerator.com are not whitelisted".
  2. Chris Barber 2015-09-22

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7218 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7219
  3. Chee Kiat Ng 2015-09-22

    Master PR merged. 5_0_X pending.
  4. Eric Wieber 2015-09-24

    Verified fixed, using: MacOS 10.11 (15A279b) Studio 4.3.1.201509222258 Ti SDK 5.0.1.v20150923102330 Appc NPM 4.2.0 Appc CLI 5.0.2-19 Ti CLI 5.0.4 Alloy 1.7.10 Arrow 1.2.62 Xcode 7.0 (7A218) Node v0.10.37 Java 1.7.0_45 production Log messages are correctly displayed for the different plist/tiapp settings

JSON Source