Posts Tagged ‘iphone’
Today I looked at the new iPhone features built into Dashcode, Apple’s development environment that was originally created for Dashboard Widgets. Upon loading the application, I was presented with three new iPhone development options: Custom, Browser, and RSS.
Development
While Custom is going to give you a blank template to work with and Browser gives you a basic list view for you to fill in with your own content, the RSS template provides you a pre-coded environment to add your RSS feed and publish to your website. Today I decided to make my own iPhone version of this website.
Just like creating a Dashboard widget, you have the ability to change fonts, colors, image, and much more. Using the predefined template, I modifed the colors and background to match the look and feel of the full site you’re probably viewing this on right now. Having only used Dashcode once before to create a Podcast widget for OS X, I found no issues creating a mobile website for the iPhone. All the menus and toolbars are the same, though the library of items you can add to your mobile site are different (for good reason, of course).
As you develop your iPhone mobile RSS page, you can test it inside of the Aspen Simulator — an iPhone running on your computer (I mentioned this in the last entry). Each time I made a major change to the operation of the mobile page, I would click on the Run button, view it inside the Simulator, and operate it just like it’s on my mobile phone.
Deployment
Once I was satisfied with my changes, I went to the file menu inside Dashcode and clicked on the Deploy option. I then chose to save it to my desktop where I would be able to take it and upload it to my website.
After upload it to the labs.blackice912.net site, I decided to launch it on my actual iPhone to see the results. It turns out the results were pretty bad. No news loaded at all. I then tested it inside the Simulator and got the same results. Why was it working on my computer but not once I published it to the internet?
Well after activating the debug mode inside of Mobile Safari, I found out why. As I should have remembered, you cannot have JavaScript on one site grab data from another site. It is cross site scripting and can be considered dangerous. Realizing this, I moved the code over to blackice912.net and launched it with success.
So are there ways to use a RSS feed that is hosted on another site and use it? With the addition of PHP, yes you could do this and not run into that issue.
Conclusion
Apple has really done a lot of things right with this new SDK. While I still need to do some more investigation into the native application side of it, I am impressed with what I have seen today. You can really create a powerful web application with the SDK today and an even better one once the 2.0 firmware hits phones in June.
If you’re interested in seeing the mobile site I created, visit blackice912.net/mobile on your iPhone/iTouch or in Safari. It will not load properly in any other browser!
Today Apple released the iPhone SDK, which will allow developers such as myself to program native applications for the iPhone. What wasn’t given a lot of attention during the keynote held this morning was all the new opportunities for web developers.
I’ve only had the chance to watch a 20 minute video on the subject, but the new iPhone firmware upgrade coming in July will bring support for additional WebKit features like animation and iPhone specific functions like gestures
I hope on doing some more research into this tomorrow using the published SDK’s Simulator and publishing sample projects to the labs site.












