INCLUDE_DATA

Teach by Example. Tech in your face.

MySpaceID iPhone SDK

Filed Under (iPhone) by haidersabri on 11-09-2009

I recently completed the beta version of the MySpaceID iPhone SDK. The idea is to create a cocoa library that is easy for iPhone developers to start using when they want to integrate their iPhone applications with MySpaceID. 


This version of the library comes with support of 3-legged-OAuth, which keeps in tune with MySpace’s devotion to the "Open Stack".  The 3-legged-OAuth flow requires a redirect to the browser, so your application will go to Safari for authentication.  Although breaking away from your application does seem rather counterintuitive from a user experience, the good news is after authentication, your app will be fired up once again.  This is because the SDK takes in your iPhone URL scheme to make a callback after authentication. The other good news is, you will only have to do this one time to associate your user with his MySpaceID.  This is because the SDK stores the Access Token needed for future requests.


On top of OAuth support, the SDK comes with methods to make calls to the MySpace REST API’s.  We have full support for all the V1 and V2 endpoints. As more and more API’s get added, we will add more support.

I’ve also added a VERY simple dumb-down sample application with the SDK, just to demonstrate the OAuth flow, and a few API calls.


I have to admit that this is actually my first real cocoa/iPhone project.  I’ve had a blast picking it up, and I really like the Cocoa Touch framework.  Coming from a managed and scripting code background, I did have hiccups with memory management, but I got the hang of it eventually.  I definitely see areas of improvement to the code, and welcome any feedback.


Take a look at my code. We have open-sourced it like all the other SDK’s. Check it out here: Google Code Page MySpace Wiki Page

Arabic PDF’s on Kindle DX

Filed Under (Uncategorized) by haidersabri on 11-09-2009

I recently purchased an Amazon Kindle DX because I really like to read books, and I have a ton of eBooks, articles and larger websites I’d like to read through but don’t have the discipline to sit behind a screen to read. I also find it far less enjoyable to read a book (as opposed to short articles, news, blogs, etc.) on a computer screen and my work station. I really need to have a book wherever I go to finish it. So for some time i tried using my iPhone for portable reading, but the screen is just too small for reading a book.

I was really happy with the DX, but I found myself unable to read PDFs in Arabic. Every file I would put on my Kindle wouldn’t open, or it would render incorrectly. At first i assumed the DX didn’t support Right-To-Left texts like Arabic and Hebrew, but then i was wondering why. It made no sense to me, so I started messing around with the PDFs to see if I can fix them. I wasted time trying to export to a word document, RTF, anything really…my goal was to "re-pdf" the source so i can test what the problem was. Well, I was lucky to have tried something that worked out of the box! Using Acrobat Professional 8.0 (might work on previous versions. idk), just click Document->Reduce-File-Size. Make sure click the setting "Make Compatible with Acrobat 8.0 or greater". Save, and move to your DX and you should be able to read Arabic (and Hebrew) PDF files now.