有什么方法可以使用 Xcode 8 beta 将应用程序安装到 iPhone 4?

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

Any way to install app to iPhone 4 with Xcode 8 beta?

iosxcodeios7

提问by kientux

When trying to run app on my iPhone 4, Xcode 8 beta shows me this message:

尝试在我的 iPhone 4 上运行应用程序时,Xcode 8 beta 向我显示以下消息:

This iPhone 4 is running iOS 7.1.2 (11D257), which may not be supported by this version of Xcode.

This iPhone 4 is running iOS 7.1.2 (11D257), which may not be supported by this version of Xcode.

My app must support iOS 7. I read many answers they say that app build with Xcode 8 beta still can run on iOS 7 devices. So is there a way to install app to iPhone 4 with Xcode 8 beta? Like building the app first, then use a command line to install .appfile to the iPhone?

我的应用程序必须支持 iOS 7。我阅读了很多答案,他们说使用 Xcode 8 beta 构建的应用程序仍然可以在 iOS 7 设备上运行。那么有没有办法使用 Xcode 8 beta 将应用程序安装到 iPhone 4?喜欢先构建应用程序,然后使用命令行将.app文件安装到 iPhone?

回答by petra

Actually, there is a way. You just need to copy DeviceSupport folder for iOS 7.1 from Xcode 7 to the new one. It's located in:

其实是有办法的。您只需要将 iOS 7.1 的 DeviceSupport 文件夹从 Xcode 7 复制到新文件夹。它位于:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1

I've tried it and it works.

我试过了,它有效。

EDIT: If you don't have the 7.1 files anymore, you can find them here.

编辑:如果您不再拥有 7.1 文件,您可以在此处找到它们。

回答by Leszek Szary

If you do not need to debug but only build and put the app on device then you could also use product -> archive to create .ipa file with an adhoc version and then put in on iphone 4 using window -> devices. This works on xcode 8 without any additional files.

如果您不需要调试而只在设备上构建和放置应用程序,那么您还可以使用产品 -> 存档创建具有临时版本的 .ipa 文件,然后使用窗口 -> 设备将其放入 iphone 4。这适用于 xcode 8,无需任何其他文件。