CodeIgniter Forums
CI and iPhone/iTouch/others - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: CI and iPhone/iTouch/others (/thread-19746.html)



CI and iPhone/iTouch/others - El Forum - 06-17-2009

[eluser]howman[/eluser]
Hi Everyone,

I'm getting back into web development after a long hiatus. I'm sticking with PHP/mySQL and came across CI. Looks good!

I am planning to build a "to do list" type application. I want it to run in the browser and also run on the iPhone and iTouch and possibly other handheld devices. I understand that on the iPhone/iTouch you can use the built in Safari browser to view the website. However, I want to build an application that runs on the iTouch so that the user can "sync" the data when she is connected to wifi and interact with the data when not connected.

So my question is, how can a CI application integrate with an iPhone/iTouch app so that the data in mySQL can be synced between the two?

Thanks!


CI and iPhone/iTouch/others - El Forum - 06-17-2009

[eluser]Colin Williams[/eluser]
Well, it's up to you how you want the iPhone app to communicate with the backend. I'm guessing it will be with XML. So, in your CI app, just return XML from the controllers.


CI and iPhone/iTouch/others - El Forum - 06-18-2009

[eluser]howman[/eluser]
Thanks Colin. I think you are right, output XML to the handheld and then program the handheld app to use the XML data. Makes sense. Now I just need to figure out how to program for the iPhone. ;-)


CI and iPhone/iTouch/others - El Forum - 06-18-2009

[eluser]Colin Williams[/eluser]
Haha.. Might be better of doing a web app if XHTML/CSS/JS is your game. Objective-C is a bit of a steep learning curve. I think you can also use Python with Cocoa.


CI and iPhone/iTouch/others - El Forum - 06-19-2009

[eluser]howman[/eluser]
How would a web app work when the iPhone/iTouch is not connected to a network? Let's say you create your list on my site using your home computer and want to be able to access your list when you are away from home. If you have access to a network you can use the built-in Safari browser to access my site and retrieve your data. My application will know you are using Safari mobile and serve up an interface designed for the iPhone. But what if you are out of range of a network or cell service? How do I enable a web app to sync data when connected and then use that data when offline.

Thanks for your responses so far by the way. I really appreciate your input.

Oh, and one more thing. I am thinking about abstracting the front end from the database by inserting a dynamic data layer (XML). That way, all calls to the db will result in XML and all interfaces (computer browser, mobile browser, RSS feed, etc) will use the XML data as the data source. So, even a regular web page in a desktop web browser would use the XML. The thing is, I'm really not sure how to do that with CI. Can you explain how that could work or point me to a relevant resource?

Thanks!