简体   繁体   English

Xcode 5,iOS7和64位与32位

[英]Xcode 5, iOS7 and 64bit vs 32bit

I have an application that I have in the store and it supports 32bit(iPhone 4+) on iOS 6+ 我在商店中有一个应用程序,它在iOS 6+上支持32bit(iPhone 4+)

I now also have an iPhone 5S and I'm currently using Xcode five. 我现在也有iPhone 5S,目前正在使用Xcode 5。

I was able to successfully run my app under iOS seven with minimal tweaking, just for a status bar. 我可以通过最小的调整就状态栏在iOS 7下成功运行我的应用程序。

I now want to release a version that support iOS seven (For look and feel of tableviews/controls) but also supports iOS six for my current users. 我现在想发布一个支持iOS 7的版本(用于表视图/控件的外观),同时还支持当前用户的iOS 6。

How can I build my up so it's compatible with iOS six and iOS seven? 如何建立自己的设备,使其与iOS 6和iOS 7兼容?

Do I have to build an iOS six version and a separate binary that I submit separately for iOS seven? 我是否必须构建iOS 6版本和单独提交给iOS 7的单独二进制文件?

Also I would like to support the 64-bit CPU/architecture in the iPhone 5S , how can I support this? 另外,我想在iPhone 5S中支持64位CPU /体系结构 ,如何支持呢?

Looking in instruments my app is still 32 bit even running on iPhone 5s, 在乐器上看,即使在iPhone 5s上运行,我的应用程序仍为32位,

Do I have to build separate iOS six, iOS seven, and iOS seven 64-bit binaries? 我是否必须分别构建iOS 6,iOS 7和iOS 7 64位二进制文​​件? and submit each version separately to the store? 并将每个版本分别提交给商店?

From Apple release notes: 从苹果发行说明:

https://developer.apple.com/library/ios/releasenotes/General/RN-iOSSDK-7.0/ https://developer.apple.com/library/ios/releasenotes/General/RN-iOSSDK-7.0/

You can submit 64-bit apps for iOS 7 today that take advantage of the power of the iPhone 5s. 您可以立即利用iPhone 5s的功能提交适用于iOS 7的64位应用程序。 Xcode can build your app with both 32-bit and 64-bit binaries included so it works across all devices running iOS 7. If you wish to continue to support iOS 6 then you need to build for 32-bit only. Xcode可以同时包含32位和64位二进制文​​件来构建您的应用程序,因此它可以在运行iOS 7的所有设备上运行。如果您希望继续支持iOS 6,则仅需要针对32位进行构建。 Next month we will be making changes so that you can create a single app binary that supports 32-bit on iOS 6, as well as 32-bit and 64-bit on iOS 7. 下个月,我们将进行更改,以便您可以创建一个应用程序二进制文件,该二进制文件在iOS 6上支持32位,在iOS 7上支持32位和64位。

I guess that you have to compile different binaries for each version (iOS 6 32 bit, iOS 7 32 bit, iOS 7 64 bit), until the update next month. 我猜您必须为每个版本(iOS 6 32位,iOS 7 32位,iOS 7 64位)编译不同的二进制文件,直到下个月更新为止。

You need to check your Xcode build settings. 您需要检查您的Xcode构建设置。

The first important settings are ARCHS where you specify if you are 32 bit only, 32 + 64 bit, or 64 bit only. 第一个重要设置是ARCHS,您可以在其中指定仅32位,32 + 64位还是64位。 32 bit works anywhere, including iPhone 5s. 32位可在任何地方使用,包括iPhone 5s。 32 + 64 bit means your app runs faster on iPhone 5s. 32 + 64位意味着您的应用程序在iPhone 5s上运行更快。

The second important setting is IPHONEOS_DEPLOYMENT_TARGET. 第二个重要设置是IPHONEOS_DEPLOYMENT_TARGET。 This is the lowest iOS version that your app will run on. 这是您的应用将运行的最低的iOS版本。 If it is 6.0 your app won't run on iOS 5. If it is 7.0 your app won't run on iOS 5 or iOS 6. 如果是6.0,则您的应用程序将无法在iOS 5上运行。如果是7.0,则您的应用程序将无法在iOS 5或iOS 6上运行。

The third important setting is SDKROOT. 第三个重要设置是SDKROOT。 That's the SDK that you are using. 那就是您正在使用的SDK。 Apple wants you to use the 7.0 SDK for any new apps. Apple希望您将7.0 SDK用于所有新应用。

With deployment target = 6.0, SDK = 7.0, you have to be careful not to use any code that is 7.0 only on an iPhone running iOS 6. So you have to write code like "if (iOS 7 function is available) { use iOS 7 function } else { use iOS 6 function}", as long as you want to support iOS 6. 在部署目标= 6.0,SDK = 7.0的情况下,您必须注意不要仅在运行iOS 6的iPhone上使用任何7.0的代码。因此,您必须编写类似“如果(如果有iOS 7功能,则){使用iOS 7功能} else {使用iOS 6功能}”,只要您想支持iOS 6。

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

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