Xcode 4.2 + LLVM 3:无法在iPhone3G上运行
刚刚为 Snow Leopard 安装了 Xcode 4.2 并开始开发一个新项目。该应用程序可以在 iPhone4 上成功运行,但不能在 iPhone3G 上运行。代码被构建、编译、运行并完成。我刚刚收到一条消息“运行完毕......”。以下是我在项目和目标构建设置上设置的设置:
构建选项 - > GCC_VERSION = Apple LLVM 3
Architectures - > ARCHS =“armv6 armv7” 架构->SDKROOT =“最新iOS5”
部署->IPHONEOS_DEPLOYMENT_TARGET =“iOS 3.1”
链接->OTHER_LDFLAGS->调试->任何架构|任何SDK =“-ObjC -all_load”
任何想法或建议还有什么我应该尝试吗?
Just installed Xcode 4.2 for Snow Leopard and started to developer a new project. The app successfully runs on iPhone4 but isn't on iPhone3G. The code gets build, compiled, ran and finished. I just get a message "Finished running ...". Here's the settings that I have set both on Project and Target Build settings:
Build otions->GCC_VERSION = Apple LLVM 3
Architectures->ARCHS = "armv6 armv7"
Architectures->SDKROOT = "Latest iOS5"
Deployment->IPHONEOS_DEPLOYMENT_TARGET = "iOS 3.1"
Linking->OTHER_LDFLAGS->Debug->Any architecture |Any SDK = "-ObjC -all_load"
Any ideas or suggestions what else should I try?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Xcode 4.2 创建新项目时似乎会发生此问题。创建此类项目时,Xcode 在 app plist 文件中添加一个隐藏密钥,限制设备仅在 armv7 架构上运行。您需要删除该密钥。此外,您需要在项目和目标构建设置中的 ARCHS 构建设置中将“standard (armv7)”值替换为“armv6 armvv7”值。还要检查 ONLY_ACTIVE_ARCH 是否设置为 NO。
This problem appears to happen when creating new projects with Xcode 4.2. When creating such projects, Xcode adds one hidden key in app plist file, that restricts device to run on armv7 architecture only. You need to delete that key. Also, you need to replace "standard (armv7)" to "armv6 armvv7" value in ARCHS build setting, both in project and targets build settings. And also to check ONLY_ACTIVE_ARCH is set to NO.
我在 iPhone 4 上的代码中也看到过“已完成运行...”。每当发生这种情况时,我都会进行一次干净的构建,并从 iPhone 上卸载该应用程序。发布后,事情又开始运转了。
I have seen 'finished running...' in my code too with an iPhone 4. Whenever that happens, I do a clean build and also uninstall the app from my iPhone. Post that, things start working again.