Titanium JIRA Archive
Appcelerator Community (AC)

[AC-935] Titanium CLI created ios module cannot be tested / run by titanium.py

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-09-24T02:17:26.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
LabelsTCSupportTriage, module
Reportersprhawk
AssigneeMauro Parra-Miranda
Created2014-09-16T10:09:41.000+0000
Updated2016-03-08T07:37:15.000+0000

Description

according to http://docs.appcelerator.com/titanium/3.0/#!/guide/iOS_Module_Development_Guide use Titanium Studio or Titanium CLI create project use following command line:
ti create -p ios -t module -d . -n test -u http://test.me --id me.test
will like this:
projectdir-
         |-  LICENSE
         |-  README
         |-  assets
         |-  documentation
         |- example
         |- iphone
                  |-  Classes
                  |-  test.xcodeproj
only under iphone dir I can run
titanium.py run
but it cannot load example/app.js (and module) if current dir is the root directory of the project,
titanium.py run --dir=iphone/  --platform=iphone
[INFO] One moment, building ...
Traceback (most recent call last):
File "/Users/hongbo.yang/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/iphone/builder.py", line 1650, in <module>
main(sys.argv)
File "/Users/hongbo.yang/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/iphone/builder.py", line 615, in main
ti = TiAppXML(tiapp_xml)
File "/Users/hongbo.yang/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/tiapp.py", line 52, in __init__
data = codecs.open(self.file,'r','utf-8','replace')
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 878, in open
file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'iphone/tiapp.xml'
titanium.py run  --platform=iphone
**** does not contain a valid project
However use:
titanium.py create --platform=iphone --type=module --dir=. --name=test --id=me.test
created project will show as:
projectdir-
         |-  LICENSE
         |-  README
         |-  assets
         |-  documentation
         |-  example
         |-  Classes
         |-  test.xcodeproj
         |-  ...
ie, all the source code are under root directory, then titanium.py can run the test module correctly.

Comments

  1. Mostafizur Rahman 2014-09-20

    Hello, We have researched and tested about this issue.It's works fine as we expect. Please follow the [iOS_Module_Development_Guide](http://docs.appcelerator.com/titanium/3.0/#!/guide/iOS_Module_Development_Guide) or [Wiki-iOS_Module_Development_Guide](https://wiki.appcelerator.org/display/guides2/iOS+Module+Development+Guide ) *TESTING ENVIRONMENT:* Titanium SDK: 3.3.0.GA Titanium CLI: 3.3.0 OS X Version: 10.9.3 iOS SDK version: 7.1 *STEPS THAT MUST BE FOLLOWED:* 1) Fulfill the Prerequisites of iOS modules. 2) Then follow the Step 1,2,3,4 from [iOS Module Development Guide](http://docs.appcelerator.com/titanium/3.0/#!/guide/iOS_Module_Development_Guide). Thanks.
  2. Mauro Parra-Miranda 2014-09-24

    Please test the provided info from [~mrahman].

JSON Source