PiwikMobile - Getting started
We use Titanium Mobile http://www.appcelerator.com to create the iOS and Android PiwikMobile app. Titanium allows us to create native, cross-platform apps using web technologies. You only need good knowledge of JavaScript therefore.
Please, read http://dev.piwik.org/trac/wiki/PiwikDevelopmentProcess before you start if not already done.
1. Requirements:
- Android:
- Windows, Mac OS or Linux
- Android SDK
- JDK 6
- Titanium Mobile SDK
- iOS:
- Mac OS 10.6.*
- iOS SDK + XCode
- Titanium Mobile SDK
You can use any IDE but have respect for the coding standards http://dev.piwik.org/trac/wiki/CodingStandard, please.
2. Installation
Install Titanium
- Install Titanium Developer as described here: http://developer.appcelerator.com/doc/mobile/get_started
- Checkout the mobile folder in SVN
- Import project in Titanium
- Select imported project
- Select "Edit" tab
- Press "Save changes"
3. Code
Please comment your code as much as necessary, as few as possible. But not too little. We use jsdoc http://code.google.com/p/jsdoc-toolkit/ for any documentation.
Howto handle images/icons: TODO
4. Test
You should always test your changes on Android and on iOS, if possible. Usually, the simulator behaves in a similar manner to a device. But we recommend to test on a device - if possible - too.
Android Device
It is very easy to test on an Android device.
- Activate 'Unknown Sources' and 'USB-Debugging' on your device. You can activate this in 'Settings' -> 'Applications'.
- Plug in your device via USB, choose 'Test & Package' -> 'Run on Device' -> 'Android' -> 'Install Now' within Titanium.
iOS Device
Unfortunately, it is not that easy to test the app on an iOS device.
- First, you have to register as an Apple Developer at http://developer.apple.com/iphone/. Alternativly, you can ask to get access to the PiwikMobile Apple Developer account.
- Login at http://developer.apple.com/iphone/
- Setup all required certificates. Have a look at this http://vimeo.com/10278960 video for more information.
- Plug in your device via USB, choose 'Test & Package' -> 'Run on Device' -> 'iPhone' -> 'Install Now' within Titanium.
5. Commit / Send a patch
See http://dev.piwik.org/trac/wiki/PiwikDevelopmentProcess
6. Publish to the markets
See http://dev.piwik.org/trac/wiki/PiwikMobile/BuildRelease
7. Useful links
- Piwik API Reference http://dev.piwik.org/trac/wiki/API/Reference
- Latest Titanium API http://developer.appcelerator.com/apidoc/mobile/latest
- Appcelerator Twitter Account http://twitter.com/appcelerator
- Howto report bugs in Titanium: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report
