Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

iPhone module creation


With Ti 1.2.1 and SDK 1.3.0

Just a feedback on little problems I encounter creating an iphone module following those instructions

1) Need to give missing execution right

chmod +x ./build.py

2) Indentation problem

$ ./build.py 
  File "./build.py", line 89
    for dn in ('assets','documentation','example'):
IndentationError: unindent does not match any outer indentation level

3) Need to change the default name in the manifest but WHY ?

$ ./build.py 
please update the manifest key: 'name' to a non-default value

4) Doc mistake

"making the app load the app."
— asked May 28th 2010 by SEBASTIEN PEROCHON
  • iphone
  • module

2 Answers

  • couple of other issues with build.py

    1. module_defaults 'name' and 'moduleid' have been changed to the project I just created. Rogue grep and sed?

    2. lines 89-95 have extra spaces and python doesn't understand the indentation. delete all tabs and spaces in front of these lines.

    after changes in #1 and 2 I get


    — answered June 16th 2010 by Robert Logan
  • This is a bit old but there is still a problem with build.py in Ti Mobile SDK 1.6: if you have a .svn dir it will crap out and give an error like this:

    Traceback (most recent call last):
      File "./build.py", line 194, in <module>
      File "./build.py", line 173, in package_module
        docs = generate_doc(config)
      File "./build.py", line 57, in generate_doc
        md = open(os.path.join(docdir,file)).read()
    IOError: [Errno 21] Is a directory

    What needs to be done is to ignore the .svn directory when we reach build.py line 57.

    — answered March 12th 2011 by Thuan Ta
    1 Comment
    • Later on at line 123 of build.py does ignore them ignoreDirs = ['.DS_Store','.svn','.git','CVSROOT'] - it looks like this needs to be added earlier in the script and added to the file appending blocks.

      — commented March 12th 2011 by Kosso
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.