1

I have xCode 4.2, and I've done all the steps about the $99 ios dev program.

Now I need to test my project on my device, which is an iPhone4 in 4.2.1, but I failed to run the app on the device, where the xcode says Xcode cannot run using the selected device.

But in the Organizer my device seems well, because there is a green bulb nearby, like it is in the picture:

see the little bulb is green

and this is my device's version

Does anyone know the solution to this problem? Should I find something like 4.2.1 sdk to add to my Xcode? Thanks a lot for your answering!

AsTeR
  • 7,247
  • 14
  • 60
  • 99
Wang Liang
  • 941
  • 2
  • 15
  • 34
  • Have you installed the provisioning profile and set the device up for development using the organiser? Also, is there a particular reason that you're targeting this version of iOS? Why not iOS 5? – Steve Rukuts Nov 18 '11 at 15:22
  • Make sure your iPhone has the provisioning profile on it. You can see where to look in your picture there. – Andreas Eriksson Nov 18 '11 at 15:37

1 Answers1

2

Download latest version of the SDK, the one supporting iOS 5.0.1. Use the latest SDK as the base SDK. This is not necessarily the oldest version of iOS your app will support.

If you'd like to support/test on devices running iOS 4.2, just go to project build settings and set "iOS Deployment Target" to 4.2.

Sanjay Chaudhry
  • 3,181
  • 1
  • 22
  • 31
  • But why it is not necessary to run on some old version? I think my app is gonna support some 4.x ios, or is there a better way to cover the old version? – Wang Liang Nov 18 '11 at 15:39
  • SDK's version is the latest iOS it supports. It supports that and few older versions. For example, SDK 5.0.1 can support as far back as iOS 3.0. You don't have to use an old version of SDK to support an old iOS. You can choose as old version of iOS as per your technical and business needs (as long as Apple still supports it) but you can always use the latest SDK. – Sanjay Chaudhry Nov 18 '11 at 16:29
  • I guess I understand it somehow, thans again! – Wang Liang Nov 20 '11 at 12:15