简体   繁体   English

XCode 5并支持iOS 6.x和iOS 7

[英]XCode 5 and support for iOS 6.x and iOS 7

Happy New Year to all. 祝大家新年快乐。

I have a fully developed iOS 6.x app (not in AppStore yet) with XCode 4.6. 我有一个使用XCode 4.6完整开发的iOS 6.x应用程序(尚未在AppStore中)。 I'm running on Mavericks with XCode 5.0.2 and iOS 7. Now, I wanted my app to support both iOS 6.x and 7.0 devices. 我正在XCode 5.0.2和iOS 7上的Mavericks上运行。现在,我希望我的应用程序支持iOS 6.x和7.0设备。 I'm totally confused on what should I do. 我对应该怎么做感到完全困惑。 Also, I have my 4S running on iOS 6.1.2 with modem firmware 3.4.02. 另外,我的4S在iOS 6.1.2上运行,调制解调器固件为3.4.02。

What should be the best way to acheive this? 实现这一目标的最佳方法是什么?

  1. I can upgrade to iOS 7.0.4 on the 4S. 我可以在4S上升级到iOS 7.0.4。 By doing this, what I'm losing here?. 这样,我在这里失去了什么? Is it safe to be at 6.1.2 on the device to not to lose testing on 6.x devices. 在设备上达到6.1.2的安全性以免丢失对6.x设备的测试是否安全? But, then how do I test it on iOS 7 device as I can't afford a new one now. 但是,那我该如何在iOS 7设备上对其进行测试,因为我现在买不起新设备。

  2. I read that I can copy iOS 6.1 SDK to the XCode 5 folder to make XCode 5.0.2 support both iOS 6.x and 7.x simulators. 我读到可以将iOS 6.1 SDK复制到XCode 5文件夹,以使XCode 5.0.2支持iOS 6.x和7.x模拟器。

  3. I ran the app thru the iOS 7 simulator from within XCode 5 and some of the UI screens are not looking good with controls misaligned. 我通过XCode 5中的iOS 7模拟器运行了该应用程序,并且某些UI屏幕在控件未对齐的情况下效果不佳。

At the end of the day, I want my app to run fine on iOS 6.x and iOS 7 devices. 最后,我希望我的应用在iOS 6.x和iOS 7设备上运行良好。 Also, my app only supports portrait mode. 另外,我的应用仅支持纵向模式。

Please help. 请帮忙。

The best way to test an app for compatibility with more than one iOS version is to have at least one iOS device for each major OS version. 测试应用程序是否与一个以上iOS版本兼容的最佳方法是,每个主要OS版本至少拥有一个iOS设备。 The iOS Simulator is not an adequate test. iOS模拟器不是足够的测试。 If you only have one device, then (given that the majority of App store customers now run iOS 7) one option is to update your device to iOS 7, and just support that one OS version. 如果只有一台设备,那么(鉴于大多数App Store客户现在都在运行iOS 7),一种选择是将设备更新到iOS 7,并仅支持该OS版本。

Using the iOS 6.x (or earlier) SDK with Xcode 5 is unsupported and reported to be buggy. 不支持将iOS 6.x(或更早版本)SDK与Xcode 5一起使用,并且报告存在问题。 Apple says not to do it in their support forums. 苹果公司在其支持论坛上表示不这样做。

The UI control and window metrics are different in iOS7. UI控件和窗口指标在iOS7中有所不同。 An iOS6 app usually has to be modified to look functional when re-built with the new SDK. 使用新的SDK重新构建iOS6应用程序时,通常必须对其进行修改以使其具有功能性。 One can test at run-time for the OS version and modify the control and view alignments as needed. 可以在运行时测试操作系统版本,并根据需要修改控件和查看对齐方式。 Or just (re)design the app for iOS7 only. 或者仅(重新)设计仅适用于iOS7的应用程序。

If you have more than one iOS test device, one option is to build using the iOS7 SDK, set the Deployment Target lower (to iOS 5.1 or 6.x), test on those devices, and code OS dependent run-time control and view alignment adjustments as needed. 如果您有多个iOS测试设备,则一种选择是使用iOS7 SDK进行构建,将“部署目标”降低(设置为iOS 5.1或6.x),在这些设备上进行测试,并对与操作系统相关的运行时控制和查看进行编码根据需要调整对齐方式。

As of 2013-Feb-01, according to a notice on Apple's dev site, building using the iOS7 SDK will be required for submission to Apple's App store. 根据Apple开发者网站上的通知,自2013年2月1日起,将需要使用iOS7 SDK进行构建才能提交给Apple的App Store。 A Deployment Target as low as iOS 4.3 is still supported by Xcode 5, if you want to do testing on that many iOS devices. 如果要在许多iOS设备上进行测试,Xcode 5仍支持低至iOS 4.3的部署目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM