PDA

View Full Version : Reading Email on IPhone




arnieterm
Nov 18, 2008, 10:51 PM
In my Iphone app, I want to read emails on a non-jailbroken Iphone. Using the NSFileManager, I have noticed that if you specify path outside of your application you can read files. So it is possible to read the location /Library/Mail/Envelope.Index file. But since it is an sqlite file we need to use sqlite related statements for reading the tables in it.
The aim is to take a snapshot of new email and gets it saved via a web service into the database. For this my app needs to check the file at regular intervals to see if any new email arrives. Can we use NSFileHandle instead that provides certain notification methods [readInBackgroundAndNotify, waitForDataInBackgroundAndNotify] for data change in file.
Any idea??