Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11336] Tooling: Device-specific Info.plist entries in tiapp.xml cause builder to fail

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-10-10T22:10:16.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2012 Sprint 21 Core, 2012 Sprint 21
ComponentsTooling
Labelscore
ReporterArthur Evans
AssigneeChris Barber
Created2012-10-09T23:28:07.000+0000
Updated2017-03-28T21:10:24.000+0000

Description

In 2.1, we introduced a new feature to add custom info.plist values directly into the tiapp.xml file, in place of the old hard-coded titanium-specific flags. However, the new system lacks the ability to specify device-specific keys. Specifies which interface orientations this application supports. In particular, we've introduced the UISupportedInterfaceOrientations key as an alternative to the older:
<orientations device="iPhone">.
However, it's less functional than the previous version, because there's no way to specify a device type. In the raw plist format, you can introduce a device specifier as a suffix to the device key:
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationPortrait</string>
<key>UIInterfaceOrientation~ipad</key>
<string>UIInterfaceOrientationLandscapeRight</string>
However, adding code like this to the tiapp.xml file causes the build to fail with the following error:
[ERROR] Error: Traceback (most recent call last):
  File "/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121009034227/iphone/builder.py", line 1069, in main
    applogo = ti.generate_infoplist(infoplist,appid,devicefamily,project_dir,iphone_version)
  File "/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121009034227/tiapp.py", line 580, in generate_infoplist
    newcontent += '\t<key>%s</key>\n\t%s\n' %(p,v)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 8: ordinal not in range(128)

Comments

  1. Chris Barber 2012-10-10

    This is supported in the new CLI. I wonder if this issue also happens in the new CLI. Have you tried?
  2. Arthur Evans 2012-10-10

    This issue appears to be a rogue UTF-8 character in the tiapp.xml file, unrelated to the issue at hand, probably from cutting and pasting stuff from Apple's docs. My bad.
  3. Lee Morris 2017-03-28

    Closing ticket as invalid.

JSON Source