Getting Started with iPhone Development

My CFUnited presentation "iPhone Apps + Adobe ColdFusion," is about so much more than just using iPhone Apps and Adobe ColdFusion together! It's a really good place to start when you're looking to get into iPhone development, regardless of whether or not you're interested in making calls to a remote ColdFusion server. Certainly there is great information in the presentation for anyone who wants to make calls to a remote server, particularly a ColdFusion server, but you don't have to be interested in making remote calls from your iPhone apps to find the information in the presentation useful. So check it out! The related link for this blog post gives the link to my blog post "iPhone Apps + Adobe ColdFusion" from Friday containing links to the presentation in PDF format and to the code resources in a ZIP file.

iPhone Apps + Adobe ColdFusion

I'm presenting "iPhone Apps + Adobe ColdFusion" right now (well, right now as this post is going live anyway). And in this post, I am making the PDF version of my presentation file available via this link (note: the file location and link may change in the future but on this post on my blog itself the link will always be kept current).

UPDATE: I've been asked for my code samples from the presentation; you can find them here. To use them with NimbleKit, you'll need to create a new NimbleKit project in Xcode then drop these resources into wherever it is that you put the NimbleKit project; you'll need to overwrite the project's main.html file with this one. Note that the sayHello.cfc and sayHello.cfm files are not needed for your NimbleKit project; they are included so you can see what they do and so that you can deploy them to your own web server (of course, in that situation you'll need to change the NimbleKit code to make its calls to the server where you put the files).

Flash Player on Mobile Devices

I'm at CFUnited. If you're not here, we miss you!

Last night I attended the Birds of a Feather session (for those not familiar, this is a session that is a bit more of an open forum than it is a presentation) on iPhone development and those present asked me lots of questions about if and when Flash Player will be on the iPhone. That's outside my Adobe arena so I didn't have great answers for them (though I'm relatively certain that even if I did have great answers, I wouldn't have been authorized to share them). But I did do some asking and some research and so I give you:

The official(ish) statement:

We would like to work with Apple to bring Flash to the iPhone, meanwhile we continue to work towards bringing the full Flash Player to Symbian, Windows Mobile, Android and other smartphones enabling a more complete web experience.

Now, as I know that's not particularly enlightening, here are some blog posts I ran across which you may find of interest:

Make Sure USB Connection Not Interrupted When Updating iPhone

I just plugged my iPhone into my MacBook Pro via USB and was immediately informed that there was a new version of the iPhone software available and I was asked if I wanted to install that software. I clicked yes and the process started. While it was doing its thing, I moved over into my Windows XP instance running in VMWare Fusion. Well, part of the process of updating the iPhone involved the iPhone restarting and when it restarted, because I was using VMWare Fusion, VMWare Fusion grabbed the USB connection and this completely hosed the iPhone. Let me be clear: it didn't just mess up the update, it hosed the iPhone--meaning it wouldn't work at all. It isn't that the iPhone connecting to the Windows XP instance in VMWare Fusion hoses the iPhone inherently; in fact, in a normal circumstance, connecting the iPhone to the Windows XP instance in VMWare Fusion would be no problem at all. What is a problem, however, is the iPhone losing the connection to iTunes in the middle of the update process.

So my only choice was to restore the iPhone to factory settings and from there to restore the phone's settings from a backup. I'm not sure that before beginning the update iTunes bothers to do a backup of your iPhone (if it doesn't, it sure should and I recommend that you do your own backup before letting iTunes do a software update), but in any case it seems I was able to restore from a recent enough backup that I didn't lose much, if anything. Because I'm using over-the-air Exchange synchronization, my most imporant data (Contacts, Calendar, Email) are not synced via iTunes so fortunately there was no risk of losing any of that data.

But even though in the end I lost little to nothing, the whole process of restoring is long and a rather big pain in the butt. So for that reason alone, I highly recommend avoiding it at all costs--and that means making sure the USB connection between your machine and your iPhone is not interrupted when you're updating the iPhone's software!

Incidentally, even after restoring from a backup, I had to completely re-do my settings for my Adobe Exchange account (I'm guessing that the certificate for the phone can't be backed up). Also, although my setting for syncing an image directory on the MacBook Pro to the iPhone was still present, the image in the directory (I only have 1 image in that directory) was not on the iPhone until I did another sync and, because I use that image as my Wallpaper, I had to reset my Wallpaper after I synced the image back to the iPhone.

Emulating Task Lists on iPhone with Calendars

Without any implication that it's at all okay that Apple hasn't bothered to implement a Task List application on the iPhone, here's a method I thought up to emulate task lists using the Calendar application:

  1. In your computer's Exchange client (you can't do it on the iPhone; you have to use Outlook or Entourage or whatever on your computer), create a new sub-directory of your current Calendar (and make sure you set it to be of the Calendar type). Call it Tasks.
  2. Repeat the above step with the exception that this time call the sub-directory Completed Tasks.

Pretty simple, huh? So how do you use it? Well, when you enter the Calendar application on the iPhone, you'll be able to view the calendars for your Exchange account (when you're in the Calendar app looking at the main view, you should see in the upper left-hand corner a button labeled "Calendars" that will take you to view the calendars). You'll see that you can view just one calendar or all of your calendars; as you may also know, your main view choices include List--so you can choose to view the "Tasks" calendar and view it as a List, very much as you would expect to view tasks in a Task List application. And of course you add a new task by creating a new calendar item in the Tasks calendar.

Unfortunately, there's no way to designate a calendar item as complete; that's why I use the second calendar called Completed Tasks. But there's one more unfortunate thing (referenced in my iPhone 2.0 Insights blog post) that comes into play here: you can't move calendar items from one calendar to another on the iPhone. Totally inexplicable pain in the butt, but it isn't the end of the world to just move the items over on your computer (if you don't care about completed tasks, you can always just delete them on either the iPhone or your computer and not worry about the Completed Tasks calendar).

Using 2 directories and calling them "Tasks" and "Completed Tasks" is just my choice: obviously, you can change the names of the calendar sub-directories as you see fit and you can create more than just 2 if you'd like.

Note: this definitely works with iPhone synched up over the air with Exchange; it may or may not work in other configurations (all I can say is that prior to synching over the air with Exchange, I was not aware of any way to synch with multiple calendars nor to view multiple calendars on the iPhone).

Note: I am aware that there are 3rd party Task List applications available for iPhone, however, given that none of those are able to synch with Exchange, they do not suit my purposes. I also don't know if any of those can alert me like calendars items can.

iPhone 2.0 Insights

UPDATE 7/13/2009: The iPhone 3.0 Firmware is now out and it has a bunch of great new feature. Unfortunately, many of the things I felt were lacking in the iPhone 2.0 Firmware were not addressed. But one was and so I've updated the information below accordingly. Look for the "UPDATE" tags.

I thought some of you might be considering iPhone 2.0 and so I thought I'd post these insights (to add, I'm sure, to all those insights others have posted of late). For those who like executive summaries, here you go: I recommend iPhone 2.0.

I am using earlier generation hardware with the new 2.0 firmware so I can't review 3G for you or any other new features of the iPhone 2.0 hardware.

Major Pros of 2.0 Firmware:

  1. Data push. This works really well for calendar, contacts, and email. I've never had a phone with data push before so I can't make comparisons (my main point of comparison is to Palm and synching locally to Outlook). My favorite features are multi-contacts groups and multi-calendars--I have always wanted this in order to keep my business contacts separate from my personal contacts and to keep my business calendar items separate from my personal calendar items. In iPhone Contacts and Calendar you can choose to view all or just one particular contacts group or calendar, respectively.
  2. Directory lookup. This is the other part of Exchange integration: you can look up any contact in the Adobe directory.
  3. Extensibility via add-on apps obtainable with the App Store application. There are numerous useful apps available, many of which are free.

There are also existing pros like the browser, the Google Maps app, the solid camera, the in-phone voice mail control, and the chat-style text message conversation threads.

Major Cons of 2.0 Firmware:

  1. If you set the view of Contacts or Calendar to a particular contacts group or calendar, respectively, then exit the application, the view sometimes changes to all when you re-launch the application.
  2. While there is a way to set the default calendar for new calendar items and there is a way to set the calendar for a new calendar item when it is created, there is no way to move a contact or calendar from one group to another and there is no way to set the default contact group for new contacts and there is no way to set the contact group for a contact when it is created (instead it automatically goes into the contact group you're viewing or, if you're viewing all, it goes into the top-level Contacts group).
  3. There is no support for Tasks. There are some 3rd party apps available, some even free, but these do not synch with Exchange Tasks.
  4. There is no copy and paste. Word has it that Apple just doesn't see this as a priority. Unfathomable. UPDATE: Copy and paste is now present in the 3.0 Firmware!
  5. There is no "quick text" for SMS...and since there's no copy and paste, there's absolutely no way to send a text message without typing the whole thing in. UPDATE: Well, at least you can copy and paste in 3.0 Firmware, which is better than nothing.
  6. No trial period for add-on apps that cost money (ditto for add-on apps that are free, but of course that's a moot point).
  7. No ability to configure how many recent calls are stored. You're stuck with the default, which is something like 50 or 100. I would like to see a configurable setting for number of recent calls displayed and I would like for one of the options to be "all" so that there is no limit. This device has gobs and gobs of storage space--it has 1000 times the storage space of my Kyocera QCP-6035 that I bought in 2001 and that device could be configured to store up to 999 recent calls with no problem--so storing an effectively limitless amount of recent call information should not be an issue--and just to be safe, it could be programmed so that if space did fill up, the last item went out every time a new item needed to come in.
  8. No ability to replicate contacts, calendar items, etc. This would be really useful, particularly on calendar items. When you go to the dentist, do you make your next appointment? I think most of us do. And so you put it immediately into your iPhone. Well, you're standing there looking at the item that got you there that day; wouldn't it be nice to copy it and just change the date and time for the new appointment? Obviously the dentist is just one of many examples of how useful this functionality would be.

BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner