Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8967] iOS: Compiler/Titanium needs to warn if <ios> section of tiapp.xml is malformed

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-01-10T18:06:48.000+0000
Affected Version/sRelease 2.0.1, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam, cb-tooling, core
ReporterShannon Hicks
AssigneeChris Barber
Created2012-05-02T17:36:52.000+0000
Updated2020-01-10T18:06:48.000+0000

Description

Problem Description

If the section of tiapp.xml is malformed, compiling completely fails... as in, build.log doesn't even get reset from the previous build, and the Ti Studio log shows nothing. The console outputs this:
[INFO] One moment, building ...
Traceback (most recent call last):

Test case

Here's a sample of malformed code:
    <ios>
    	<plist>
			<key>CFBundleDisplayName</key>
			<string>New Eng Inn</string>
			<key>UISupportedInterfaceOrientations</key>
			<array>
				<string>UIInterfaceOrientationPortrait</string>
				<string>UIInterfaceOrientationPortraitUpsideDown</string>
			</array>
    	</plist>
    </ios>

Comments

  1. jithinpv 2013-04-16

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Chris Barber 2016-08-24

    This is still broken in Titanium SDK master 6.1.0.
  3. Hans Knöchel 2017-06-30

    I tried linting it but then noticed it actually goes through (even though the key is missing), so it looks like they are merged together properly even if they shouldn't. We could explicitely check for the key, like:
       if (ios && ios.plist) {
           if (!ios.plist.dict) {
               logger.error(__('Could not parse custom Info.plist keys'));
               process.exit();
           }
           this.mergePlist(ios.plist, plist);
       }
       
    Everything else (plist key-structure, missing values) are processed even before, so we may do this validation in the tiappxml.js already.

JSON Source