Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7931] iOS: Build: Cannot compile KitchenSink, getting ValueError: substring not found

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-03-11T00:22:57.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsiOS
Labelsrelease-note-2.0.0
ReporterNatalie Huynh
AssigneeSabil Rahim
Created2012-03-08T12:55:32.000+0000
Updated2012-03-12T10:19:06.000+0000

Description

Steps To Reproduce: 1. Import KS to Titanium Studio 2. Build to iOS device Actual: [ERROR] Error: Traceback (most recent call last): File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0.v20120308093239/iphone/builder.py", line 1045, in main applogo = ti.generate_infoplist(infoplist,appid,devicefamily,project_dir,iphone_version) File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0.v20120308093239/tiapp.py", line 471, in generate_infoplist i = plist.index('CFBundleShortVersionString') ValueError: substring not found Expected: To compile KS

Comments

  1. Stephen Feather 2012-03-08

    --I'll look into this in the morning. I'm thinking the plist template no longer has a CFBundleShortVersionString entry in it to modify.-- -- _edit_ -- Confirmed that both the Info.plist and Titanium.plist still have the CFBundleShortVersionString key.
  2. Stephen Feather 2012-03-09

    Problem

    Kitchen sink uses a custom Info.plist located in the project root. This Info.plist does not contain the CFBundleShortVersionString entry thus causing the failure mentioned above.

    Proposed Solution

    Have the caretaker of the Kitchen Sink code add the following to {project}/Info.plist:
       <key>CFBundleShortVersionString</key>
       <string>1.0</string>
       
  3. Stephen Feather 2012-03-09

    I suppose this
       i = plist.index('CFBundleShortVersionString')
       
    ought to be wrapped to catch the exception if it is missing. I'll see if I can dedicate some time to that this weekend. Neeraj (and Stephen may want to jump in on this), because of the importance of the CFBundleShortVersionString to distribution , do you believe the build should halt with a clear user message in the console that the string is missing from what we believe is the use of a custom Info.plist?
  4. Stephen Feather 2012-03-09

    Pull request submitted https://github.com/appcelerator/titanium_mobile/pull/1623
  5. Sabil Rahim 2012-03-09

    Pull pending [PR1627](https://github.com/appcelerator/titanium_mobile/pull/1627)
  6. Natalie Huynh 2012-03-12

    Tested with 2.0.0.v20120312104735

JSON Source