Posted by mbates on Sep 10, 2009 in
Uncategorized
Yesterday Mike and I received a phone call from our publisher tells us that the book has been cancelled. Unfortunately, this is just not the right time for this book.
Mike and I would like to thank all those who submitted suggestions and recipes for the book, we appreciate your support.
Thank you all so much for you time and interest. We will let everyone know if something new comes up!
Thanks.
Posted by mbates on Jul 26, 2009 in
Announcements
The other night I submitted a new iPhone application to the Apple Store. The app, which I’ll speak about when, and if it gets approved, uses the new Apple Push Notification service available in iPhone OS 3.0. On the server side I have a Rails application that I am using to send the notifications to Apple. The problem I ran into was how.
Enter the APN on Rails gem. While searching I found one plugin for Rails that mostly worked for me, Sam Soffes’ apple_push_notification plugin. It was a great place to start, but I found that there were things that didn’t suite me. For starters, not having any tests is always a big turn off for me when it comes to any code. I also didn’t like that you didn’t need to save a notification in order to send it. That means you don’t have a record of what was sent and when. I also wanted to have devices stored separately from the notification. Finally, I wanted to be able to easily configure the plugin. Sam’s was using constants that would need to be changed when it hit production.
So, with all that said and done I took Sam’s great work, ripped it apart, and put it back together again, this time in gem form instead of a plugin, and here it is.
There are a few migrations, a few models, and a few Rake tasks, but here is the basic idea of how it works:
To get a better understanding of exactly how it works, and what it does, I highly recommend reading the RDOC.
There are a few things I still would like to add, for example, a controller to do CRUD for devices so iPhones can register with the Rails app. I’d also like to add a task that talks to Apple and finds out which devices are no longer accepting messages so they can be removed.
If you’d like to contribute, please feel free and for the project on GitHub:
http://github.com/markbates/apn_on_rails/tree
Again, a special thanks to Fabien Penso and Sam Soffes for their initial work on this project.
Tags: apn, apple, gem, iPhone, iphone 3.0, push notification, rails
Posted by mbates on May 20, 2009 in
Announcements,
Book
In just over a year since the iPhone API was released, we’ve seen some incredible applications created. It’s clear that there are some really sharp developers in the iPhone community.
Do you have a really cool solution to a common problem? We’d love to hear it. We’re looking for bite sized recipes for our “iPhone Recipes” book to be published by the Pragmatic Bookshelf and edited by Mark Bates and Mike Mangino. This is your opportunity to show your chops to the community as a whole. In particular, we’re looking for easily understandable, general purpose recipes that aren’t already well documented.
For example, do you have a great method showing a preferences screen inside your application? Maybe you know a cool trick loading images from the web asynchronously. We’re looking for tips that save you time that other people could benefit from. We’re not asking you to share your application’s secret sauce, just a few of the toppings.
Do you have an idea for a recipe but don’t want to write it yourself? We’re collecting a list of recipe ideas at http://www.iphonerecipesbook.com/2009/07/07/our-recipe-ideas/. You can add your ideas in a comment there.
To propose a recipe idea, here’s what we need from you:
A paragraph or two describing the problem that the recipe solves.
A sentence or two indicating what the solution will be.
The OS version(s) to which the recipe applies.
You should already have working code. You can send some along if it helps convey your idea.
Email your idea to us at submissions@iphonerecipesbook.com by August 1st (or sooner!) We’ll let you know if we can use your recpie by August 8th. After that, you’ll work with Mark and Mike to get your recipe written and included in the book!
If your recipe is selected, your name, bio, and a link to your site/blog will appear in the book. You’ll also receive a complimentary copy of the book, of course.
We look forward to working with you!
Mark Bates and Mike Mangino
Tags: Book, iPhone, iPhone API, iPhone Recipes, iPhone SDK, mark bates, mike mangino, Pragmatic Bookshelf, Pragmatic Programmers, recipes