Problem
Launching newly created project in iOS simulator produces following exception:
+ TARGET_BUILD_DIR = /Users/mwhite/Documents/Titanium Studio Workspace/com.zytac.tit2/build/iphone/Debug-iphonesimulator
Exception detected in script:
Traceback (most recent call last):
File "/Users/mwhite/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1274, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False)
File "/Users/mwhite/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1202, in execute_xcode
sys.exit(1)
SystemExit: 1
If you check the build.py script there is a test at line 1197. xcode will not be invoked if the test fails. I can see from the code that TARGET_BUILD_DIR must be equal to build_dir. HOWEVER in xcode 4.2 I have no idea how to correct TARGET_BUILD_DIR (ENV). The difference can clearly be seen mid string at ".....project/iphone/project....".
It would help if the source of TARGET_BUILD_DIR was documented. Looking at the contents of this string it can only come from Titanium since Xcode can only obtain this string from the
.xcodeproj file which is created by Titanium.
Test case
Steps to reproduce:
* create a new "Titanium mobile project" in Titanium studio. Use Xcode 4.2.1
* do not add any new code to the project
* build the project using "iPhone Simulator"
Workaround
* Open the .xcodeproj file created by Titanium Studio by invoking the Xcode GUI. The compiled project can then be run using Xcode outside of Titanium.
Discussions
http://developer.appcelerator.com/question/117950/error-your-targetbuilddir-is-incorrectly-set
http://developer.appcelerator.com/question/71331/really-thats-the-first-impression#answer-218760
Michael Have you read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report)? If so, where is the link to the Q&A question you raised? Where is a link to the workaround you mention? Where is your log file? Once the necessary information is included, I can see if we can escalate this issue. Thanks
http://developer.appcelerator.com/question/117950/error-your-targetbuilddir-is-incorrectly-set http://developer.appcelerator.com/question/71331/really-thats-the-first-impression#answer-218760
Michael See ticket TIMOB-2588, which provides a possible solution. If this does not work, then we need to know the steps required in order to reproduce the issue, to be able to accept this ticket. Thank you
btw, it's preferable that you edit the ticket to add missing information, rather than to add it in a comment. Please also try to use the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template) as a starting point, next time. Cheers
Hi Paul. Ticket TIMOB-2588 differs from my problem. The fragment "build/iphone/build" is identical in both strings expected & was: whereas in my ticket the two strings do not match. I get "build/iphone". TIMOB-2588 ticket is to do with case sensitivity "Users" as opposed to "users". In my example Users is correct in both strings. To reproduce my problem, create a new "Titanium mobile project" in Titanium studio. Note the version of Xcode being used. Do not add any new code. Then build the project using "iPhone Simulator". That will re-produce the problem. If I launch the Xcode GUI using the .xcodeproj file created by Titanium Studio, I am able to run the project.
Michael I don't understand this ticket. Where is the error in the attached log? Would you verify that my changes to the description still describe your situation? Please, again, read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) - following it will prevent delays in getting your ticket escalated now and in future. Thanks
Hi Paul Near the bottom of the log you will see that TARGET_BUILD_DIR,is output to the log: this (was) string is incorrect. If you check the BUILD_DIR (expected) string it differs as described in my ticket. If you check the build.py script there is a test at line 1197. xcode will not be invoked if the test fails. I can see from the code that TARGET_BUILD_DIR must be equal to build_dir. HOWEVER in xcode 4.2 I have no idea how to correct TARGET_BUILD_DIR (ENV). The difference can clearly be seen mid string at ".....project/iphone/project....". Please carefully study my original fault report for this string fragment which I obtained from the Titanium console. For the work around I suggest this text for more clarity. Open the
Michael I am afraid I need to be able to produce this in order to escalate it. Please would you provide this information? In the meantime, I will ask internally to see if anyone has any ideas. Cheers
To reproduce my problem, create a new "Titanium mobile project" in Titanium studio. Use Xcode 4.2.1. Do not add any new code to the project. Then build the project using "iPhone Simulator". That will re-produce the problem. It would help if the source of TARGET_BUILD_DIR was documented. Looking at the contents of this string it can only come from Titanium since Xcode can only obtain this string from the
Michael Would you please try the advice provided in [http://developer.appcelerator.com/question/40691/mobil-sdk-130---targetbuilddir-is-incorrectly-set] ? Also, are you using the official release of 1.8.0.1? Thanks
Michael Have you had a chance to try this? Thanks
Hello, tried this with Xcode 4.2.x, Lion and Mobile SDK 1.8.1, it's working just fine. Best, Mauro