Xcode 8 建议我将最小 iOS 部署目标从 7.1 更改为 8.0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37817554/
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
Xcode 8 recommend me to change the min iOS Deployment Target from 7.1 to 8.0
提问by X.Jian
When I use the Xcode 8 beta(8S128d) to open my project,it recommend me to change the min iOS Deployment Target to 8.0 instead 7.1. And I found that there is no option less than 8.0 in the iOS Deployment Target list.
当我使用 Xcode 8 beta(8S128d) 打开我的项目时,它建议我将最小 iOS 部署目标更改为 8.0 而不是 7.1。而且我发现iOS部署目标列表中没有低于8.0的选项。
So, does it mean that I no longer need to adjust my project for iOS 7.x or less?
那么,这是否意味着我不再需要为 iOS 7.x 或更低版本调整我的项目?
回答by Leon
I think if the app has many users who are using iOS 7, it would be necessary to adjust project to support iOS 7.
我认为如果该应用程序有很多使用 iOS 7 的用户,则需要调整项目以支持 iOS 7。
I have tried build, debug, archive with deployment target 7.0 using Xcode 8 Beta(8S128d).
All succeeded. Also successfully export and install the ipa on my iPhone 4 (iOS 7.1.2(11D257)) .
我已经尝试使用 Xcode 8 Beta(8S128d) 使用部署目标 7.0 构建、调试、存档。
都成功了。还成功导出并在我的 iPhone 4 (iOS 7.1.2(11D257)) 上安装了 ipa。
I did the followings to change my project deployment target to 7.0 and remove the suggestion warning.
我执行以下操作将我的项目部署目标更改为 7.0 并删除建议警告。
Manually input "7.0" in the "iOS Deployment Target" text box.
Uncheck the "Update iOS Deployment Target" and press "Perform Changes" / "Done" button,
then the recommended suggestion warning will disappear.
Edit:
编辑:
Make Xcode 8.x debug your apps on iOS 7.x devices.
让 Xcode 8.x 在 iOS 7.x 设备上调试您的应用程序。
You need Xcode 7.x. You can download it from Apple Developer Site.
OpenFinder, and goto "Xcode 7.x.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/".
Copy"7.0" and "7.1" folders and pastethem to "Xcode 8.x.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/".
你需要Xcode 7.x。您可以从Apple Developer Site下载它。
打开Finder,进入“ Xcode 7.x.app/Contents/Developer/Platforms/iPhoneOS.platform/ DeviceSupport/”。
复制“ 7.0”和“ 7.1”文件夹并将它们粘贴到“ Xcode 8.x.app/Contents/Developer/Platforms/iPhoneOS.platform/ DeviceSupport/”。
- Open"Xcode 8.x.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist"
- 打开“ Xcode 8.x.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ SDKSettings.plist”
- Addvalues, "7.0" and "7.1", to key, "Root/DefaultProperties/DEPLOYMENT_TARGET_SUGGESTED_VALUES", according to the following screenshot.
- 根据以下屏幕截图,将值“ 7.0”和“ 7.1”添加到键“Root/DefaultProperties/ DEPLOYMENT_TARGET_SUGGESTED_VALUES”。
Restart Xcode 8.x.
Now you can choose "7.0" or "7.1" in the "iOS Deployment Target" text box list and debug your apps on iOS 7.x devices.
重新启动 Xcode 8.x。
现在您可以在“ iOS 部署目标”文本框列表中选择“ 7.0”或“ 7.1”并在 iOS 7.x 设备上调试您的应用程序。
回答by JAL
The minimum deployment target with Xcode 8 is iOS 8. To support target the iOS SDK 7.x and below, use Xcode 7.
Xcode 8 的最低部署目标是 iOS 8。要支持目标 iOS SDK 7.x 及以下,请使用 Xcode 7。
If you try to use a deployment target of iOS 7.x or below, Xcode will suggest you change your target to iOS 8:
如果您尝试使用 iOS 7.x 或更低版本的部署目标,Xcode 会建议您将目标更改为 iOS 8:
回答by Putz1103
Apple has changed so much since iOS 7 until now. The easiest way of not having to deal with backward compatibility is to make the old OS's obsolete. So you have 2 choices. You can leave the setting as is and deal with the warning message,or you can change the setting and not support iOS 7 or lower any longer. There are pros and cons to each...
从 iOS 7 到现在,Apple 已经发生了很大的变化。不必处理向后兼容性的最简单方法是使旧操作系统过时。 所以你有2个选择。您可以保留设置并处理警告消息,或者您可以更改设置并不再支持 iOS 7 或更低版本。各有利弊...
Leave the setting: If you chose to leave the Min OS setting as is your app will have a larger user base. But since new OS adoption rate is very very high this is not as much of an issue with iOS devices as it would be with Android devices. You would also have to deal with supporting iOS 7. That means that if you decide to use any new features not available in iOS 7 you would have to deal with the iOS 7 case. Possible app crashes, inconsistent UI, etc...
保留设置:如果您选择保留 Min OS 设置,您的应用程序将拥有更大的用户群。但由于新操作系统的采用率非常高,这对于 iOS 设备来说并不像 Android 设备那样严重。您还必须处理对 iOS 7 的支持。这意味着如果您决定使用 iOS 7 中没有的任何新功能,您将不得不处理 iOS 7 案例。可能的应用程序崩溃、UI 不一致等...
Change the setting: If you chose to change the setting then you no longer have to support iOS 7 (you can create much simpler and more consistent code with new features). You also slightly shrink your customer base (very very slightly).
更改设置:如果您选择更改设置,则您不再需要支持 iOS 7(您可以使用新功能创建更简单、更一致的代码)。您还略微缩小了您的客户群(非常非常小)。
It's up to you what you would like to do, but really all devices that can run 7 can also run 8. So if they want your app they can just upgrade OS's and be fine (not like the iPad 1 that stopped at iOS 5). My customers are all large businesses that need to run through lots of red tape to upgrade their fleet of devices. So I have to support iOS 7 (for now, xCode 8 may give me the sway to force those who haven't to upgrade).
这取决于你想做什么,但实际上所有可以运行 7 的设备也可以运行 8。所以如果他们想要你的应用程序,他们可以升级操作系统并且很好(不像 iPad 1 停止在 iOS 5) . 我的客户都是大型企业,需要通过大量繁文缛节来升级他们的设备群。所以我必须支持iOS 7(目前,xCode 8 可能会给我一个强制那些没有升级的人的影响)。
回答by Skeletom
If you don't want to fiddle with XCode just update your project file for iOS 6 or 7.
Right click .xcodeproj choose "Show package contents" and edit project.pbxproj in favorite text editor.
Search for IPHONEOS_DEPLOYMENT_TARGET = 7.0;
如果您不想摆弄 XCode,只需更新 iOS 6 或 7 的项目文件。
右键单击 .xcodeproj 选择“显示包内容”并在最喜欢的文本编辑器中编辑 project.pbxproj。
搜索 IPHONEOS_DEPLOYMENT_TARGET = 7.0;