using XCode 4.2 and iOS 5 SDK to create app runs on iPhone 3g

http://stackoverflow.com/questions/7760946/possible-to-target-older-ios-versions-when-using-xcode-4-2-and-ios-5-sdk




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

Thanks, Greg

link | improve this question
 
Note that your edit has to do with architectures, which is a separate issue to 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.–  darvids0n  Oct 14 '11 at 3:29
Was this post useful to you?      

5 Answers

up vote 50 down vote accepted

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.

enter image description here

4) Open the projects *-Info.plist, remove the setting "Required device capabilities" (note it required armv7) enter image description here

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.

link | improve this answer
 
Thank you very much! I owe you some beer! This indeed solved my problems, PITA indeed :D –  Greg Ellis  Oct 14 '11 at 5:06
1  
Thank you! I'd read about the architecture settings elsewhere, but no one else seems to mention the "Required device capabilities" settings too. –  bunnyhero  Oct 17 '11 at 4:58
 
Super! Thank you ! –  Sergey  Oct 20 '11 at 10:11
 
I must add: both new and old projects are affected the upgrade! I tested my old stuff before googling, and they didn't work either! I owe you a beer, too! :) –  Eduardo Costa  Oct 23 '11 at 15:58
 
I have the same issue, but even if the project's settings were 'Standard armv7' for Architectures, Valid Architectures was already indicating 'armv6 armv7'. Furthermore, I had no 'Required device capabilities' property in the Info.plist. Will try the trick nonetheless, hope it will work! –  softRli  Nov 8 '11 at 8:01
feedback

Go to Xcode > Preferences > Downloads and install debugging support for older OSes.

link | improve this answer
 
I went to preferences and downloaded and installed debugging support for older OSes, quit xcode, reopened xcode did a clean and build, but the app still wont install on my older device. I am at a total loss now, as when I saw your response I thought for sure that would fix my problem :( –  Greg Ellis  Oct 13 '11 at 22:44
 
I owe you a beer, too! This solved ANOTHER problem I had after the Xcode 4 upgrade! I can now debug my iOS 4.2 device (iPod Touch 2nd gen)! –  Eduardo Costa  Oct 23 '11 at 16:03
feedback

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

link | improve this answer
 
I did this and clicked "Use this device for development" and it seemed to do what it was supposed to, but I still can't get an app to run on my old device from xcode. –  Greg Ellis  Oct 13 '11 at 22:42
feedback

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.

link | improve this answer
 
feedback

I found out that I have add armv6 to architectures, but still did not work. And now I have removed armv7 from required capabilities, and this was that ! It worked !




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

Thanks, Greg

link | improve this question
 
Note that your edit has to do with architectures, which is a separate issue to 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.–  darvids0n  Oct 14 '11 at 3:29
Was this post useful to you?      

5 Answers

up vote 50 down vote accepted

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.

enter image description here

4) Open the projects *-Info.plist, remove the setting "Required device capabilities" (note it required armv7) enter image description here

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.

link | improve this answer
 
Thank you very much! I owe you some beer! This indeed solved my problems, PITA indeed :D –  Greg Ellis  Oct 14 '11 at 5:06
1  
Thank you! I'd read about the architecture settings elsewhere, but no one else seems to mention the "Required device capabilities" settings too. –  bunnyhero  Oct 17 '11 at 4:58
 
Super! Thank you ! –  Sergey  Oct 20 '11 at 10:11
 
I must add: both new and old projects are affected the upgrade! I tested my old stuff before googling, and they didn't work either! I owe you a beer, too! :) –  Eduardo Costa  Oct 23 '11 at 15:58
 
I have the same issue, but even if the project's settings were 'Standard armv7' for Architectures, Valid Architectures was already indicating 'armv6 armv7'. Furthermore, I had no 'Required device capabilities' property in the Info.plist. Will try the trick nonetheless, hope it will work! –  softRli  Nov 8 '11 at 8:01
feedback

Go to Xcode > Preferences > Downloads and install debugging support for older OSes.

link | improve this answer
 
I went to preferences and downloaded and installed debugging support for older OSes, quit xcode, reopened xcode did a clean and build, but the app still wont install on my older device. I am at a total loss now, as when I saw your response I thought for sure that would fix my problem :( –  Greg Ellis  Oct 13 '11 at 22:44
 
I owe you a beer, too! This solved ANOTHER problem I had after the Xcode 4 upgrade! I can now debug my iOS 4.2 device (iPod Touch 2nd gen)! –  Eduardo Costa  Oct 23 '11 at 16:03
feedback

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

link | improve this answer
 
I did this and clicked "Use this device for development" and it seemed to do what it was supposed to, but I still can't get an app to run on my old device from xcode. –  Greg Ellis  Oct 13 '11 at 22:42
feedback

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.

link | improve this answer
 
feedback

I found out that I have add armv6 to architectures, but still did not work. And now I have removed armv7 from required capabilities, and this was that ! It worked !

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值