Titanium 3.2 CLI
Chris Barber
Titanium Engineer Extraordinaire

TiAppCamp 2 / Nov 2, 2013
About Me
• Been with Appc 3 ½ years
• Stuff I've done
– Early versions of www site
– Dev center Q&A
– Titanium Mobile Web
...
What's New in 3.2

Titanium 3.0.0,
3.0.1, 3.0.2, 3.0.3

Titanium 3.1.0,
3.1.1, 3.1.2, 3.1.3

Titanium 3.2.0

778

816

171...
Titanium CLI
Titanium CLI
•
•
•
•

Complete overhaul
Better selected SDK handling
New setup wizard
New prompting library
– http://npmjs...
Setup Command

• New menu design
• Improved quick setup
• New check environment
Info Command
• node-appc versions
• Mac OS X command line
tools
• Intel HAXM (Hardware
Accelerated Execution
Manager)
• Xc...
Config Settings
•
•
•
•
•
•
•
•
•
•

cli.ignoreDirs
cli.ignoreFiles
cli.progressBars (true)
cli.width (100)
paths.hooks
pa...
Android Build
Android Build
•
•
•
•
•
•

Complete rewrite from Python to Node.js
Support for CLI plugins
Android 2.3.3 no longer require...
•
•
•
•
•

Fast x86 Android emulator
Built on top of VirtualBox
Beta support with Titanium
http://www.genymotion.com/
tita...
iOS Build
iOS Build
•
•
•
•
•
•
•
•

Builds are about 20% faster
Xcode 5.0.1 and iOS 7.0.3 support
64-bit iOS Simulator support
iOS ...
No More iTunes Sync
• Direct install to iOS device
• Insanely fast
• Supports install to multiple devices
simultaneously
•...
CLI Plugins
CLI Plugins
• Contains commands, event hooks, &
function hooks
• Global and per-project
• Global and Module hooks
Anatomy of a CLI Command
• /some/dir/mycommand.js
• ti config -a paths.commands /some/dir
• ti mycommand -baz wow
Anatomy of a CLI Hook
• /some/dir/myhook.js
• ti config -a paths.hooks /some/dir
Packaging a CLI Plugin
• Global plugins go in ~/Library/Application
Support/Titanium/plugins
– Can contain commands and ho...
Packaging a CLI Plugin
• Project plugins go in <project dir>/plugins
• Can contain hooks only
– Loaded by "build" and "cle...
Available Plugin Hooks
Event Hooks

Function Hooks

•
•
•
•
•
•
•
•
•
•
•

•
•
•
•
•
•
•
•
•
•
•
•
•
•

cli:command-not-fo...
How to get it:
npm install -g
git://github.com/appcelerator/titaniu
m.git
ti sdk install -b master -d
DISCLAIMER: This is ...
Future Ideas
Build Profiles
• Controls build settings
– JavaScript minification
– JavaScript encryption
– Debugging
– etc

• Global or ...
Build Profiles
Export Command
• Generate standalone Xcode (iOS) or
Eclipse (Android) projects
• No dependency on Titanium
• Replaces tran...
Improved Logging
•
•
•
•
•

Console-only today
File logging, especially for builds
Destination specific logging
Timestamps...
Titanium Daemon
• Server that runs in background
• Plugin architecture
• Device notifications
– Connected devices

• Envir...
?
Questions?
Thank you!
cbarber@appcelerator.com
Twitter: @cb1kenobi
Titanium 3.2 CLI - TiAppCamp2 - 11/2/2013
Upcoming SlideShare
Loading in …5
×

Titanium 3.2 CLI - TiAppCamp2 - 11/2/2013

6,850 views
6,156 views

Published on

This talk was given at TiAppCamp2 on 11/2/2013 in Atlanta, GA about Titanium 3.2's CLI and tooling related changes.

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,850
On SlideShare
0
From Embeds
0
Number of Embeds
1,833
Actions
Shares
0
Downloads
30
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Follow me for important info like what I ate for breakfast
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • Titanium 3.2… or &quot;how I spent the last 6 months of my life&quot;
  • !!! Presentation Tip !!! Use relevant icons to mark each section.Sectional transition sides help divide up the presentation and the guide the audience to the next topic of discussion
  • Titanium 3.2 CLI - TiAppCamp2 - 11/2/2013

    1. 1. Titanium 3.2 CLI Chris Barber Titanium Engineer Extraordinaire TiAppCamp 2 / Nov 2, 2013
    2. 2. About Me • Been with Appc 3 ½ years • Stuff I've done – Early versions of www site – Dev center Q&A – Titanium Mobile Web platform – Titanium CLI – Titanium platform build scripts • JavaScript Guru
    3. 3. What's New in 3.2 Titanium 3.0.0, 3.0.1, 3.0.2, 3.0.3 Titanium 3.1.0, 3.1.1, 3.1.2, 3.1.3 Titanium 3.2.0 778 816 1717+
    4. 4. Titanium CLI
    5. 5. Titanium CLI • • • • Complete overhaul Better selected SDK handling New setup wizard New prompting library – http://npmjs.org/package/fields • Command improvments – info, module, plugin, sdk, setup • More config settings • Unit tests
    6. 6. Setup Command • New menu design • Improved quick setup • New check environment
    7. 7. Info Command • node-appc versions • Mac OS X command line tools • Intel HAXM (Hardware Accelerated Execution Manager) • Xcode support • Improved iOS cert and provisioning profile detection • Android & iOS Devices & Emulators/Simulators • Environment Issues
    8. 8. Config Settings • • • • • • • • • • cli.ignoreDirs cli.ignoreFiles cli.progressBars (true) cli.width (100) paths.hooks paths.modules paths.plugins paths.sdks sdk.defaultInstallLocation sdk.selected (formerly app.sdk)
    9. 9. Android Build
    10. 10. Android Build • • • • • • Complete rewrite from Python to Node.js Support for CLI plugins Android 2.3.3 no longer required Builds are about 13% faster Nearly 100 bug fixes Distribution builds much, much faster thanks to UglifyJS • Support for multiple emulators AND devices • No longer creates AVDs, you manage your own
    11. 11. • • • • • Fast x86 Android emulator Built on top of VirtualBox Beta support with Titanium http://www.genymotion.com/ titanium config genymotion.enabled true
    12. 12. iOS Build
    13. 13. iOS Build • • • • • • • • Builds are about 20% faster Xcode 5.0.1 and iOS 7.0.3 support 64-bit iOS Simulator support iOS Simulator profiles Fixed several bugs Improved validation Improved symbol detection Certificate and provisioning profile selection
    14. 14. No More iTunes Sync • Direct install to iOS device • Insanely fast • Supports install to multiple devices simultaneously • https://npmjs.org/package/node-ios-device
    15. 15. CLI Plugins
    16. 16. CLI Plugins • Contains commands, event hooks, & function hooks • Global and per-project • Global and Module hooks
    17. 17. Anatomy of a CLI Command • /some/dir/mycommand.js • ti config -a paths.commands /some/dir • ti mycommand -baz wow
    18. 18. Anatomy of a CLI Hook • /some/dir/myhook.js • ti config -a paths.hooks /some/dir
    19. 19. Packaging a CLI Plugin • Global plugins go in ~/Library/Application Support/Titanium/plugins – Can contain commands and hooks – Automatically loaded for every Titanium command
    20. 20. Packaging a CLI Plugin • Project plugins go in <project dir>/plugins • Can contain hooks only – Loaded by "build" and "clean" commands • Must be enabled in tiapp.xml
    21. 21. Available Plugin Hooks Event Hooks Function Hooks • • • • • • • • • • • • • • • • • • • • • • • • • cli:command-not-found cli:command-loaded cli:pre-validate cli:post-validate cli:pre-execute cli:post-execute help:header build.pre.construct build.pre.compile build.post.compile build.finalize build.config build.android.config build.android.copyResource build.android.compileJsFile build.android.dexerArgs build.android.javacArgs build.android.writeBuildManifest build.android.startEmulator build.ios.config build.ios.writeBuildManifest build.ios.copyResource build.ios.compileJsFile build.mobileweb.config clean.config
    22. 22. How to get it: npm install -g git://github.com/appcelerator/titaniu m.git ti sdk install -b master -d DISCLAIMER: This is not fully tested. This is not stable code. Use at your own risk.
    23. 23. Future Ideas
    24. 24. Build Profiles • Controls build settings – JavaScript minification – JavaScript encryption – Debugging – etc • Global or per-project • Project-level defined in tiapp.xml – Can contain any tag
    25. 25. Build Profiles
    26. 26. Export Command • Generate standalone Xcode (iOS) or Eclipse (Android) projects • No dependency on Titanium • Replaces transport.py
    27. 27. Improved Logging • • • • • Console-only today File logging, especially for builds Destination specific logging Timestamps Force specific locale
    28. 28. Titanium Daemon • Server that runs in background • Plugin architecture • Device notifications – Connected devices • Environment caching • Check for Titanium updates • Web server plugin w/ interface – Environment info (same as "ti info") – Debug proxy – Serve Titanium Mobile Web apps • Run similar to "adb" – Do not require root priviledges
    29. 29. ? Questions?
    30. 30. Thank you! cbarber@appcelerator.com Twitter: @cb1kenobi

    ×