Titanium Appcelerator Quickie: base64encode iOS Module - Clearly Innovative | Web and Mobile DevelopmentClearly Innovative | Web and Mobile Development

UPDATE : December 27, 2011

This module should no longer be needed if you are using

UPDATE : Nov 8 2011

Here is a link to download the compiled module; I know there were some issue building it so it is now just included. Enjoy


UPDATE : Thanks Alex

As of iOS 5 / Xcode 4.2, armv6 is no longer part of the default architectures. When building a universal app, you obviously want/need armv6 in addition to armv7.

If anyone else encounters build/install errors with your (or any newly built module), they need to open the module in xcode and add the literal “armv6” flag to their build settings. After that, works just fine!

Here is a link to the source code in gist.

This is a simple module I put together using Appcelerator’s Module Framework. One of the great things about the platform is that you can always extend it to do new interesting things with just a bit of Objective-C and time. Once your module is completed, you can use it over an over again.

So… my problem was to convert an image/blob into an encoded string. There is currently an open issue in the Appcelerator Framework, and I suspect it will be resolved soon, but this was a simple enough function that it lent it self very well to be used as an example module.

The complete project is here in github.

here is how you use it


As usual, ask questions.

Module Developer Guide for iOS

Objective-C Beginner’s Guide