xcode 4.3 应用程序无法在运行 iOS 4.2.1 的 3G iPhone 上运行?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7446519/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:57:07  来源:igfitidea点击:

4.3 app won't work on 3G iPhone running iOS 4.2.1?

iosxcodeios-4.2ios4testflight

提问by Jessica

I'm fairly new to this so please go easy on me if this is a dumb question. I set the base SDK to 4.3 and deployment target to 4.0 so in theory, it should run on everything in-between. The app works with no problems on all iPad and iPhone simulator versions between 4.0 to 4.3. However, when I uploaded the .ipa file to testflightapp.com and someone tested it on an iPhone 3G running OS 4.2.1, it seems to crash on launch. Since it runs fine on the same version of the simulator, this makes me think there is something in project settings I haven't done right. I've looked through the 4.3 upgrade notes and I'm not making use of any of the added features so that doesn't seem to be my problem. Setting the base SDK and deployment target were the only things I've done in terms of customizing the project for different iOS versions. Is there anything else I could try to make it run on that iPhone?

我对此很陌生,所以如果这是一个愚蠢的问题,请对我放轻松。我将基本 SDK 设置为 4.3,将部署目标设置为 4.0,因此理论上,它应该在中间的所有内容上运行。该应用程序在 4.0 到 4.3 之间的所有 iPad 和 iPhone 模拟器版本上都没有问题。但是,当我将 .ipa 文件上传到 testflightapp.com 并且有人在运行 OS 4.2.1 的 iPhone 3G 上对其进行测试时,它似乎在启动时崩溃了。由于它在相同版本的模拟器上运行良好,这让我觉得项目设置中有些东西我没有做对。我查看了 4.3 升级说明,我没有使用任何添加的功能,所以这似乎不是我的问题。设置基础 SDK 和部署目标是我为不同 iOS 版本定制项目时所做的唯一事情。

采纳答案by Jessica

I figured out what it was (forgot to come back to my question). I was running into the watchdog which closes apps if a few doesn't appear 20 seconds after launching. Since it was an iPhone 3G with iOS4 and a bunch of stuff running in the background, the guy was basically using the slowest device possible.

我想出了它是什么(忘了回到我的问题)。我遇到了看门狗,如果在启动后 20 秒内没有出现一些应用程序,它就会关闭应用程序。由于它是带有 iOS4 的 iPhone 3G 和一堆在后台运行的东西,所以这家伙基本上使用了可能最慢的设备。

回答by phi

Most probably you're using API methods that doesn't exist in 4.2.1 yet. So when you try to run them there, the application crashes. If you ask your tester to check their log, you might get an idea of what could be the problem.

很可能您正在使用 4.2.1 中尚不存在的 API 方法。因此,当您尝试在那里运行它们时,应用程序会崩溃。如果您让测试人员检查他们的日志,您可能会知道问题出在哪里。

EDIT: Urgh, sorry, I just saw that it runs fine in the simulator. Can you get the crash message to give us more hints about it?

编辑:呃,抱歉,我刚刚看到它在模拟器中运行良好。你能得到崩溃消息给我们更多的提示吗?

回答by chown

Make sure all devices that you are trying to run the App on are listed in the iOS Provisioning Portal. Check your certificates and provisioning profiles in xCode and your keychain with the iOS Help Documentsto ensure that you have built the App with all the necessary dev requirements.

确保您尝试在其上运行应用程序的所有设备都列在iOS 供应门户中。使用iOS 帮助文档检查您在 xCode 中的证书和配置文件以及您的钥匙串, 以确保您已构建具有所有必要开发要求的应用程序。

Also, Enable 'Developer Logging' on the device (in the Settings App) and import the logs into xCode via the 'Devices' tab in xCode's 'Organizer'.

此外,在设备(在Settings App)上启用“开发者日志记录”,并通过 xCode 的“组织者”中的“设备”选项卡将日志导入 xCode。

If your target iOS version is 4.0, then it should run on anything from 4.0+ even if the base SDK is 4.3. Xcode will warn you if you use a class/method/feature that is not available for the target version (assuming you have live issues enabled in xcode).

如果您的目标 iOS 版本是 4.0,那么它应该可以在 4.0+ 的任何版本上运行,即使基础 SDK 是 4.3。如果您使用目标版本不可用的类/方法/功能,Xcode 会警告您(假设您在 xcode 中启用了实时问题)。