xcode 在 iPhone 5s 或 64 位模拟器上测试 32 位 iOS 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23025652/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Testing 32 bit iOS app on iPhone 5s or 64 bit simulator
提问by Jon Clayton
I have an app that uses a third party library. There is a bug in the 64 bit version of the library so I had to revert to the 32 bit version of the framework. I would like to test this release on a 5s but from XCode it will try to build in 64 bit and because of this 32 bit framework the build will fail. I need to release a version but since I'm unable to test on the 5s or 64 bit simulator I'm reluctant to do so. So it there any way to get the app on the iPhone or run it on the 64 bit simulator without having to build the 64 bit version?
我有一个使用第三方库的应用程序。该库的 64 位版本存在错误,因此我不得不恢复到 32 位版本的框架。我想在 5s 上测试这个版本,但从 XCode 开始,它将尝试构建 64 位,并且由于这个 32 位框架,构建将失败。我需要发布一个版本,但由于我无法在 5s 或 64 位模拟器上进行测试,因此我不愿意这样做。那么有没有办法让应用程序在 iPhone 上运行或在 64 位模拟器上运行它而无需构建 64 位版本?
The iPhone is provisioned and I've used it for testing the 64 bit so it is not an issue.
iPhone 已配置,我已将其用于测试 64 位,因此这不是问题。
Thanks in advance
提前致谢
采纳答案by Abhi Beckert
In Build Settings, change Architectures
to $(ARCHS_STANDARD_32_BIT)
.
在构建设置中,更改Architectures
为$(ARCHS_STANDARD_32_BIT)
.
Then choose iPhone Retina (4-inch 64-bit)
for the simulator.
然后选择iPhone Retina (4-inch 64-bit)
模拟器。
It will build a 32 bit version of your app but run it on the 64 bit simulator. Note that the simulator is running on OS X and OS X doesn't support 32 bit anymore, so we have always been running 32 bit apps on 64 bit hardware in the simulator. It works fine, as long as you don't need some types to be 64 bit (eg: CGFloat is accurate to significantly more decimal places when complied for 64 bit).
它将构建您的应用程序的 32 位版本,但在 64 位模拟器上运行它。请注意,模拟器在 OS X 上运行,而 OS X 不再支持 32 位,因此我们一直在模拟器中的 64 位硬件上运行 32 位应用程序。只要您不需要某些类型为 64 位,它就可以正常工作(例如:CGFloat 在编译为 64 位时精确到更多的小数位)。
回答by ifeegoo
I have met the similar situation but the opposite side.I use Fastlane to get app screen capture, Fastlane tool only can run on simulators,but I found every time:
我也遇到过类似的情况,但相反。我使用Fastlane来获取应用程序屏幕截图,Fastlane工具只能在模拟器上运行,但我每次都发现:
Undefined symbol(s) for architecture i386
This is because there is a .a
library only support x86_64
,So I tried to solve the problem according to the above answer.I changed Architectures
to $(ARCHS_STANDARD_64_BIT)
.
这是因为有一个.a
库只支持x86_64
,所以我试图根据上述answer.I要解决的问题改Architectures
到$(ARCHS_STANDARD_64_BIT)
。
So I can run the project on the newer simulators with only 64 bit architecture!
所以我可以在只有 64 位架构的较新的模拟器上运行该项目!