Monday, January 2, 2012

Appcelerator Titanium Module Development for iOS

Appcelerator Titanium is a one of best cross-platform tools which is used for build Mobile applications. Currently it supports iOS, Android and Blackberry. Here I'm talking about some difficulties that I faced when using Appcelerator Titanium to build an iOS application, which used a native iOS module as well.


You can find the procedure to build a native iOS module for a particular Titanium project here. But there are some issues when we are following the steps as defined there. Followings are the solutions that I could able to come-up with and I was OK with them.

1.Issue :
    ".bash_profile" file does not exist


Solution: 
  • Start up Terminal
  • Type "cd ~/" to go to your home folder
  • Type "touch .bash_profile" to create your new file.
  • Edit .bash_profile with your favorite editor (or you can just type     "open -e .bash_profile" to open it in TextEdit)


2.Issue :
issues when Packaging the Module

Solutions :
  • Make sure that, to run this script from the terminal, you should in ~/tmp/test.
  •   The markdown2 module is not on the PythonPath by default for the Mac's pre-installed Python interpreter. So,
  1. Download the latest release from https://github.com/trentm/python-markdown2
  2. Unzip the resulting download
  3. Using the setup.py script in the directory that was created from expanding the zip file you downloaded, install with `sudo python setup.py install`
  4. Re-run build.py
3.Issue :

'ImportError: No module named markdown' when runs the build.py


Solution :

          You can fix this by editing the build.py in /Library/Application Support/Titanium/mobilesdk/osx/1.6.2/module/iphone/templates
Edit the line 53 and 57 with the appropriate markdown'X' that you have just downloaded.

Hope this will helpful for you. Cheers...!!!


2 comments: