This tutorial is based on code created at the App Developer Conference Conference and Hackathon in Santa Clara, CA as a result of about 4 hours of hack time. Thus, it is extremely rough, though it should serve as a good starting point for working with both AppMobi and the SendGrid API. This code has been tested on a MacBook Air running Lion. The iOS portion was tested using an iPhone 4s using the AppMobi labs iPhone app.
This program will allow you to send an email within your iPhone or Android app, view rudimentary account statistics and receive a SMS message when a link is clicked in your email.
Once you have completed the above, you are ready to begin.
Click Start New to get started.
Choose the Client-Side project.
Choose your project name and select which API's you would like to include in your project. For this tutorial, I did not choose any APIs.
Now you should see a screen similar to:
Click the Development icon to jump to the folder where your code will be stored.
Note that if you jump up two directories, you will find a ton of sample code to enjoy. I used the Klout source code as my starting point.
Copying this code into your AppMobi directory should produce a working solution for you, which is demonstrated in the video below. Note that you will need to replace the SendGrid and Twilio credentials.
For the SMS alert to be sent when a link is clicked in your email, you will need to setup the webhook here.
You can find the code for the webhook in the webhook directory. This code is placed at the link you specified above.