iPhone on holidays

Welcome 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?!?

Installing PHP5 on Apache server

Today i was trying to install the new PHP5 module on my local apache server.
It’s really simple at least, but when searching for instructions i discovered WAMP5, which includes in the installation:

  • Apache 1.3.31
  • PHP 5.0.0
  • MySQL 4.0.18
  • PhpMyAdmin 2.5.7
  • sqlitemanager

I’ve immediately installed it 😉
Once installed you’ll see a new tray icon with some options for your installed services.
I sugges it if you are thinking to install PHP5 on your local machine (i have also a separate apache/php4/mysql3 framework on my machine too, in this way i can always switch trought the two version of PHP/MySQL)

PHP 5.0.0 Released!

Finally, after months of release candidates…
Some of the key features of PHP 5 include:

* The Zend Engine II with a new object model and dozens of new features.
* XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/).
* A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
* A brand new built-in SOAP extension for interoperability with Web Services.
* A new MySQL extension named MySQLi for developers using MySQL 4.1 and later. This new extension includes an object-oriented interface in addition to a traditional interface; as well as support for many of MySQL’s new features, such as prepared statements.
* SQLite has been bundled with PHP. For more information on SQLite, please visit their website.
* Streams have been greatly improved, including the ability to access low-level socket operations on streams.
* And lots more…

http://www.php.net