Book is available at
This is a working application based on the code examples from the book. A user can login/logout, see an activity feed and map, upload photos, and add friends. ACS features include users, comments, friends, maps/locations, push notifications, and more. Also note the use of Alloy, models, progress windows, and the ACS sync adapter.
This repo of the source code will be updated to ensure the application functions on the latest version of Appcelerator Titanium Alloy. Please feel free to add issues and submit pull request where appropriate.
A few updates have already been made since the release of the book. Check out this blog post for further details, or follow along the commit history.
As the materials in the repo begin to diverge from the original contents of the book we will create a branch so there will always remain the historical context of the application.
Setup your application in ACS and replace the following keys in tiapp.xml:
<property name="acs-oauth-secret-production" type="string"></property>
<property name="acs-oauth-key-production" type="string"></property>
<property name="acs-api-key-production" type="string"></property>
<property name="acs-oauth-secret-development" type="string"></property>
<property name="acs-oauth-key-development" type="string"></property>
<property name="acs-api-key-development" type="string"></property>
A quick short cut for getting the keys needed is to create a new Alloy Application and click cloud enable in the settings. After the app is created, open the tiapp.xml
and copy the keys from there and paste them into this project.
Refer to the "Obtain a Google Maps API key" section here and replace the google maps API key in tiapp.xml:
<meta-data
android:name="com.google.android.maps.v2.API_KEY" android:value="..."/>
The keys have been removed from the tiapp.xml, this application will not function until you setup an ACS account and get the keys as mentioned above. For the twitter and facebook to function properly please follow instructions in the book for creating and app in the specified social media platforms
http://docs.appcelerator.com/titanium/3.0/#!/api/Modules.Facebook
https://apps.twitter.com/app/new
$ keytool -v -exportcert -keystore "/Users/<your username>/Library/Application Support/Titanium/mobilesdk/osx/<3.4.0.GA or your version>/android/dev_keystore" -storepass tirocks -alias tidev > ./exportedtidevcert.txt
$ openssl sha1 -binary ./exportedtidevcert.txt > ./exportedtidevcert_sha.txt
$ openssl enc -a -e < ./exportedtidevcert_sha.txt > ./output.txt