Search code examples
iphoneiosxcode4code-signingprovisioning

Xcode 4 -- "no provisioned iOS device is connected" with iPod touch 2


I have two iPod touches. One is 2nd generation running iOS 4.2.1, and the other is 4th generation, running iOS 4.3. I have the same provisioning profile installed on both of them.

My app runs just fine on the 4th generation device.

With the 2nd generation one, when I look at my device in the organizer, everything looks fine, there is a green dot next to the device, and it shows that the profile is installed. But when I try to run the app, I get the above error.

The deployment target for my app is iOS 4.0.

As of a week ago, I was using Xcode 3, and everything worked fine. Over the past week, I upgraded to Xcode 4, and also had to update the profile, as the old one expired. I did install the new profile on both devices -- and the above situation ensued.

Incidentally, if you are a new developer and you arrived at this question, I suspect your problem is different from mine. This question has been answered in the generic form many times before; several of them are linked from here.

I've tried reinstalling the profile and also restarting both my device and computer. No luck.


Solution

  • What I had to do was change the settings of the scheme. I had it set to "iOS device". This worked fine for my newer iPod. But for the older one, I had to change it to the device name of my older iPod. It was of the form "William Jockusch's iPod (4.2.1, overriding to Base SDK 4.2)".

    Annoyingly, Xcode appears to reset this setting every time the device is changed. So I have to set it again every time I swap devices.