I’am not entirely sure where this first started, but a pattern that you seen a lot in third party Objective-C libraries is using separate success…
Doing it the ‘Apple’ way.
Been playing this over and over for the last past week. Wait for my “What You Don’t’ See” review soon!
People know him from the popularity of AFNetworking and his other essential open source projects, Mattt delivers another awesome open source project called, Helios
> Helios is an open-source framework that provides essential backend services for iOS apps, from data synchronization and user accounts to push notifications, in-app purchases, and passbook integration. It allows developers to get a client-server app up-and-running in just a few minutes, and seamlessly incorporate functionality as necessary.
It’s like everything that a mobile app need for its backend. Sure there are lots of BasS out there (Parse, StackMob to name a few), but for everyone who needs more control, helios would be the answer.
For me, BasS model is too magical, and migrating our own data out of it seems like a hassle. Also, I don’t like having my data in someone else’s system, I don’t feel comfortable knowing that my (or my client’s) data is on other people’s hands.
I haven’t looked around the code yet, but if there’s any backend requirement for my next project, helios is my first option to be the backbone of my app.
What I like is I can do whatever I want with it. I can make it as the base of a Rails/Sinatra app, or even plug it in to my existing Rails/Sinatra app. You can deploy in your own server, or in your favorite PasS that support ruby deployment (I’ll pick Heroku). Ahh, the smell of an open source project, liberating as usual.
Stumbled across this inspirational video about leadership. But not solely about leading, but also following. Be the first follower. Get some guts to follow and show others how to follow.
‘When you find a lone nut doing something great, have the guts to be the first person to stand up and join in’
I often have the need to deploy my finished iOS applications to my client’s iOS devices easily. There are couple ways to do that, via iTunes application, via iPhone Configuration Utility application and over the air distribution.
Clients usually don’t want to have 1 or 2 extra application for that sole purpose. Even though they still need one of the app to send me the device’s identifier, installing the .ipa manually seemed like a hassle. Especially, if the client comes from non-Mac platforms. So far, the best option that worked well for me is the latest one. For more details, there’s a blog post that guide you through the steps.
But the downside is, you have to host your file and your website that provided the link.
If you haven’t use Dropbox, please do (v2 just released not so long ago). If Dropbox is already installed in your disk, you only need to copy your files to your Dropbox folder. After it’s done, you can see your files’ public link by Right Click > Dropbox > Copy Public Link. So there’s your file’s URLs, we won’t use it immediately, but it’ll come handy later.
There’s a special plist file that we need to link, with a special protocol as well. But since the format is always the same for every app, I wanted to make some sort of plist generator. I want to have the links and all the properties to be variables. With that, the app can get the variables through many ways, whether it’s hard coded, database or even from API requests.
Then, comes Sinatra. In my opinion, it is the best fit for my needs. The application is fairly simple to build, it can use awesome gems that are available, and it’s easy to deploy as well. The sinatra app will serve as the page that provided the link, and also the plist generator.
So here’s my sample code.
For XML generation, I use a great gem called builder. You can see the docs for the details, but using builder is simple, especially if you already familiar with ruby.
For the routes, the app only have 2 of them. Root url will provide the single page for the download link. The plist url will be served by making the xml file on the fly, using the variables that are provided. For this simplicity of this example, I hardcoded the variable.
For deployment, you can’t go wrong with heroku. They have a special page to guide you through on deploying rack based app such as sinatra. Actually, it’s as simple as pushing your repo using git.
Hopefully, you find the code useful. Happy coding.