Patches to make Titanium's
builder.py produce complete, self-contained app builds for the iOS Simulator. This makes it possible to upload compiled Titanium apps to the Pieceable Viewer web simulator, or to distribute them as standalone Mac apps with Landon Fuller's simlaunch.
When building for the simulator,
builder.py normally assumes you'll be running the app on the same machine as your project source. This lets it take shortcuts like not compiling your
app.js, and symlink'ing to image resources.
These patches add a
buildfull option to the
builder.py script that doesn't take any shortcuts.
Which patch to use?
Run the following to figure out which version of the Titanium SDK you have installed:
ls ~/Library/Application\ Support/Titanium/mobilesdk/osx
We've included patches for 220.127.116.11 (builder.py-18.104.22.168-patch) and 1.7.5 (builder.py-1.7.5-patch). If we don't have a patch for your specific version, try whichever is closest. Or, email email@example.com and we'll help.
Applying the patch
Be sure to replace the version number with the SDK version you have.
cd ~/Library/Application\ Support/Titanium/mobilesdk/osx/22.214.171.124/iphone curl https://raw.github.com/pieceable/titanium-patches/master/builder.py-126.96.36.199-patch | patch -b -p0 builder.py
-b option to patch will create a backup for you at
Building your app
Use the new buildfull option:
~/Library/Application\ Support/Titanium/mobilesdk/osx/188.8.131.52/iphone/builder.py buildfull \ 5.0 "~/path/to/YourProject" com.yourcompany.yourappid YourAppName
At this point, your fully compiled app is now ready at:
Uploading to the Pieceable Viewer web simulator
Replace the path with the path to your compiled .app, and fill in your email address.
ditto -cj ~/path/to/YourProject/build/iphone/build/Debug-iphonesimulator/YourAppName.app - | \ curl -F "firstname.lastname@example.org" -F "file=@-" http://www.pieceable.com/view/publish
More details on this available here: https://www.pieceable.com/start