Discover Master of Alchemy, our first iPad/iPhone and iPod touch game!

Follow Me


Forum's topics

Latest Files


Top Rated


Photo Gallery

Alessandro Crugnola on August 26, 2008 in general

iPhone on holidays

Screenshot 2008-08-25 22_44_09 +0200-1.pngWelcome back everybody!
I just want to share with you my little experience I had with the iPhone sdk during my summer holidays.

This year I haven't spent my holidays on the beach, like usual, because I just bought home and so I had to put up everything... that's why I decided to devote some of the free time to try out objective-c. I wanted to make something for the iphone since I bought it in March in NYC but I never had the free time to do that..

First of all I had to buy a new Mac-mini because the iphone sdk is not supported on my old mac-mini ppc. Then I had to subscribe to the developer program for $99 because otherwise I was unable to test applications on my iphone, but only on the simulator (cool, I have to pay to install my own applications on my iphone!).

Well, after reading a bit the documentation, watching some video tutorials and looking at example code I started with my first application. What I wanted to do was a simple SMS application to show sms received, sent and a simple search. A very simple app but for me better than the limited built-in iphone sms application.

After a couple of days I reached my goal, but not without troubles. There's nothing inside the iphone documentation about the SMS system.

Afterward using an "UPDATE" sqlite query I was getting an error: "SQL error: no such function: read", and obviously there was nothing in the doc explaining this. Only after half a day I discovered that I had to create a C method and use sqlite_create_function in order to bypass that error:

const char *fn_name = "read"; 
sqlite3_create_function(database, fn_name, 1, SQLITE_INTEGER, nil, sqlite_fn_read, nil, nil);

Now that everything with the db was fine I had to google a bit in order to find a way to implements features like "reply", "forward" or "call" (basic features in a telephone, but not covered in the iphone sdk documentation).

Finally, after a long debug and Instruments session to find leaks ( I must admit xcode has some powerful tools for debugging and inpect apps) I installed my first application on my own iphone.

And big big surprise!! On the iphone my application is unable to mark messages as read and delete messages too!
In other words it is unable to write into the sms.db!

And Why?
That's because a beautiful sandbox which does not allow applications to write outside their scope! Oh, cool! That's correct, but in this case you, Apple, must give me an API which wraps those features!
They gave an SDK for developing on a mobile phone but they don't grant access to any of the telephone features?!?




Bookmark and Share


Tags: apple , holidays , iphone , mac , objective-c , sqlite 


Hi Alessandro. Please, let me know how i can contact you about the source code. Thanks
Hi. Sorry for the delay. I've sent you an email. Thanks for your reply. Bye, Luca
Yes, if you want i can give you the code even if it's not a great application :)
Hi. Are you realeasing the source code of this app? Thanks
Certo che anche tu pero'... cedere al lato oscuro e comprare l'iPhone e pure l'iMac per fare funzionare l'sdk. Alla Apple ridono largo cos´┐Ż :D
Isn't it forbidden from the NDA to talk about the SDK? That NDA sucks, no public forum and list can talk about it! Where did you buy the house btw? :) Soon!
So, you have to pay $99 to test *your* apps on *your* phone???? Can't they just lock your app to you phone via IMEI???? I must admit (again!) that Apple's marketing team is the BEST in the world without any doubt because i'm very surprised that these things don't piss off people to death and make more noise about them. Cheers!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Type the characters you see in the picture above.