Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8168] iOS: Titanium Mobile Module creations scripts do not take xcode-select or DEVELOPER_DIR into account

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-03-22T16:24:14.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsTooling
Labelsn/a
ReporterIngo Muschenetz
AssigneeBlain Hamon
Created2012-03-21T15:12:30.000+0000
Updated2017-03-06T18:15:40.000+0000

Description

I just tried this in Studio...it does not appear to matter if I use SDK 1.8 or 2.0. I was unable to find a duplicate issue, but please let me know if there is one.

Create a new Mobile Module Project for iOS

After clicking finish, get the following error message (it does not matter which version of the SDK I am using)

Nothing is created in the project

Internal error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0.v20120321131754/module/iphone/xcode/install.py", line 18, in <module>
shutil.copytree(os.path.join(template_dir,'Titanium'), file_dir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 174, in copytree
os.makedirs(dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Developer'
Created iphone module project
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0.v20120321131754/module/iphone/xcode/install.py", line 18, in <module>
shutil.copytree(os.path.join(template_dir,'Titanium'), file_dir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 174, in copytree
os.makedirs(dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Developer'
Created iphone module project
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0.v20120321131754/module/iphone/xcode/install.py", line 18, in <module>
shutil.copytree(os.path.join(template_dir,'Titanium'), file_dir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 174, in copytree
os.makedirs(dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Developer'
Created iphone module project
Looking at the code, it does not appear that install.py takes the variables into account:
#TODO: need to run xcode-select to get the true path to xcode
xcodedir = os.path.join("/Developer","Platforms","iPhoneOS.platform","Developer","Library","Xcode")
This also fails equivalently on the command line:
"/usr/bin/python" "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0.v20120321131754/titanium.py" "create" "--type=module" "--id=asdasd" "--name=testModule" "--dir=/var/folders/ff/5n2k6kjj15l1c_3xkct_8z2w0000gp/T/module_temp3116096165008991932.tmp" "--platform=iphone"
Unsure if this is related to TIMOB-7736.

Comments

  1. Blain Hamon 2012-03-22

    Eureka. ~/Library/Developer/Xcode/Templates/Application/File Templates/Appcelerator works on both Xcode 4.2 and 4.3, is xcode-select-agnostic, and is user-writable. Much better than the previous install location.
  2. Blain Hamon 2012-03-22

    Pull request awaiting review.
  3. Lee Morris 2017-03-06

    Closing ticket due to time passed.

JSON Source