Pascal
Pascal

Reputation: 85

Xcode provisioning profile issues when trying to run applications on a iOS device

I'm following the excellent Stanford CS193P course (Fall 2011) on iTunes U:
http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2011-fall

I'm trying to run my application (Calculator) from Xcode 4.2 with iOS 5 on my iPhone 3GS with iOS 4.3.3

I followed those instructions:
http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/lectures/Developing%20on%20Devices.pdf

I was able to obtain my developer certificate with no problem.

I went to the iOS Dev Center and created a provisioning profile. I entered this in the form fields:

I'm pretty sure I did the right thing for my certificate and for my device.

For the App Id, I was a bit confused.

Should a provisioning profile be made for one app (create a new one for each app I make) or for one developer (create only one for all the apps I make)?

When I finally completed my provisioning profile, I imported it in Organizer (in Xcode) and plugged in my iPhone and clicked on "Use for Development". I thought I was all done!

However, when I try to run my application in Xcode using my connected device, I get the following error message:

No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.

Is it because I did something wrong with my provisioning profile? I searched around and my settings in Code Signing Identity and .plist seems to be OK.

Or is it because my iPhone has iOS 4.3.3 and I'm trying to develop using iOS 5.0? That was the first thing I thought could be the problem, so I said, let's upgrade to 5.0. However, it seems like I can only upgrade my iPhone to iOS 6.01, which I don't want to cause that iTunes U course is targeting iOS 5.0 and I know for sure some stuff won't work. Is there a way to upgrade my iPhone to iOS 5.0 only?

Right now I'm trying to figure out where the problem actually is... my provisioning profile or my iPhone device?

EDIT #1:

I started from scratch using a brand new application (I created a single-view application with a label "Hello World!" added to the view... nothing more). I then created another provisioning profile from scratch by following this:
http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk-install-apps-on-iphone-devices-for-development/

I still had the same error message.

I then went to the Build Settings of my new project and changed the iOS Deployment Target from iOS 5.0 to iOS 4.3... and then my application launched on my device! However, the application didn't display my "Hello World!" label.

So it looks like I'm doing the right thing... but my device iOS is too old. I would like to upgrade it to iOS 5.0 but not iOS 6.01... is it possible?

EDIT #2:

I upgraded my iPhone 3GS to iOS 6.01 and when I clicked on the "Use for Development" button in Organizer, I got this error message:

The version of iOS on “My iPhone” does not match any of the versions of iOS supported for development with this installation of the iOS SDK. Please restore the device to a version of the OS listed below, or update to the latest version of the iOS SDK; which is available here.

OS Installed on Gaston Vachon’s iPhone
6.0.1 (10A523)

Xcode Supported iOS Versions Latest
5.0 (9A334)
4.3
4.2 (8C134)
4.2

Now I would have to upgrade my Xcode to the latest version (4.5.2) but I can't since I'm using Snow Leopard. So I would have to upgrade my Mac OS to either Lion or Mountain Lion then upgrade Xcode to 4.5.2 (iOS 6.01) and then It would probably work. However, since I'm following that iTunes U course done with Xcode 4.2 and iOS 5.0, I would rather wait to do those upgrades until I have completed this course.

I guess I can't win!

Upvotes: 0

Views: 1595

Answers (1)

Ben Trengrove
Ben Trengrove

Reputation: 8739

You also need to provision your device. What this does is adds your device to the list of devices your app can actually run on while it is in development.

Here is Apples tutorial on how to provision devices.

http://developer.apple.com/library/ios/#recipes/xcode_help-devices_organizer/articles/provision_device_for_development-generic.html

As for your other questions:

  • Profile name: Doesn't matter, just for your reference.
  • Description: Also just for your reference
  • Bundle identifier: Has to match the bundle id in your app, you should also replace "myname" with your own name. It is meant to be for a website domain that you own. For example my website is http://bentrengrove.com so one of my bundle identifiers is com.bentrengrove.WeightApp.
  • Creating different profiles: You only need one generic development profile for all your apps. You can use the bundle identifier with a wildcard. Have a read of this note from Apple about when to create individual profiles vs generic profiles.

Pretty much all iOS5 code works on iOS6 and you should always develop with the latest SDK. You can still deploy to devices that are running old iOS versions, you just have to make sure you are not using iOS6 only features.

Upvotes: 1

Related Questions