I just recently downloaded the Xcode 4.2 with iOS 5 SDK package and I immediately noticed that I am unable to use my iPhone 3Gs with iOS 4.2.1 for debugging. I am only able to debug and test on my iphone 4 with iOS 5 installed.
For any of my devices running any iOS less than 5.0 Xcode just says "Finished running for iPhone3GS" and doesn't run it. I have my deployment target set to 3.0 because I am not using any features in my app above 3.0 and I want to be able to target all versions 3.0 or higher. I have all my provisioning profiles installed and up to date.
I have quit and restarted xcode, I have cleaned the build multiple times. I have tried adding armv6 in the archtecture build settings, but nothing will allow me to build and run my app on my old phone with ios 4.2.1.
My question is, is it possible to still make apps with the new SDK work for iOS versions lower than 5? How can I be sure that my app will still run on lower iOS versions if I am unable to install them on my old phone?
Edit: OK it looks like iOS SDK 5 dropped support for armv6 by default. What you have to do is add armv6 in the Architectures field under Build Settings for both your Target and your Project. Then your app will be able to run on iPhone 3G devices. Answer can be found here How to build for armv6 and armv7 architectures with iOS 5
iOS
versions. Also, please add the edit as an answer so you can accept the solution you found and this question can be marked as answered.
I was having the same issue trying to get a newly created Xcode 4.2 project running on an iPhone 3G 4.2.1. Here is how I was able to get it to run.
1) Change the Target's "Build Settings" ==> "Architecture" from "Standard (armv7)" to "other". Add armv6 and armv7.
2) Change the Target's "Build Settings" ==> "Valid Architecture" to armv6 and armv7.
3) Change the Target's "Build Settings" ==> "iOS Deployment Target" to iOS 4.2.
https://i.stack.imgur.com/9jAHt.png
https://i.stack.imgur.com/y0rfw.png
btw I figured this out when I tried to manually add the app via the organizer and it reported:
Can't install application The Info.plist for application at /Users/.../TestsDebug.app specifies device capability requirements, which are not met by Dev iPhone 3G
All should work after that. Talk about a PITA.
Go to Xcode > Preferences > Downloads and install debugging support for older iOS versions.
mmorris got me close to resolving the issue... In the Info.plist, I had to set the Required Device Capabilities to armv6, not armv7 Hope this helps others out as well.
You need to connect the phone and then go to the organizer. Xcode should automatically request the older version.
See the developer page for more info. It was described in the notes for the 4.2 beta
I encountered a similar problem trying to run my app on an old iPod Touch. I upgraded to Xcode 4.3.3 and the app would no longer run in the debugger for me on older hardware.
I believe the other comments here about "Architectures" and "Required device capabilities" are important details to specify correctly. Unfortunately, they weren't enough to fix my problem.
In my case, I found the build scheme to be the culprit. Xcode 4.3.3 prompted me to switch from the GDB debugger to LLDB when it upgraded my project. When I changed the Run action of my scheme back to GDB, I was able to run the app again on my old hardware from Xcode.
I found out that I had to add armv6 to architectures, but still did not work. And now I have removed armv7 from required capabilities, and that was it! It worked!
This worked for me and should work for you if you had an older version of Xcode previously. If not then you should follow the advice given by others to obtain the SDK from an older version of SDK:
sudo cp -a /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
This command is only a little bit different from that shown by others, but those commands dropped the files in the SDKs folder itself for me - we want a subdirectory of it to be created with the appropriate name.
https://i.stack.imgur.com/64iyT.png
I just removed it...
https://i.stack.imgur.com/AsFrb.png
Hopefully it will help someone else.
Success story sharing