ios 如何将 xcode 32 位应用程序转换为 64 位 xcode 应用程序

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

How to convert xcode 32 bit app into 64 bit xcode app

iosobjective-cxcode

提问by Queries

I have updated xcode as 6.1 version with ios 8.1.I want to make settings in build settings of project. What changes should be made in architecture and valid architecture of 32 bit xcode project to convert it into 64 bit support.

我已经使用 ios 8.1 将 xcode 更新为 6.1 版本。我想在项目的构建设置中进行设置。应该在 32 位 xcode 项目的架构和有效架构中进行哪些更改以将其转换为 64 位支持。

Earlier,32 bit xcode project has settings as follows: architectures:Standard Architecture(armv7 arm64) valid architectures:armv64 armv7 armv7s

早些时候,32位xcode项目有如下设置:架构:标准架构(armv7 arm64)有效架构:armv64 armv7 armv7s

Now,when I changed the architecture setting as... architectures:Standard Architectures (including 64-bit)...as written in developer.apple.com. valid architectures:armv64 armv7 armv7s

现在,当我将架构设置更改为...架构:标准架构(包括 64 位)...如 developer.apple.com 中所写。有效架构:armv64 armv7 armv7s

So,the application runs on ios device with ios 8.1.3 version

因此,该应用程序在 ios 8.1.3 版本的 ios 设备上运行

I want to know that,when I write in
valid architectures:arm64 armv7 armv7s,error is displayed in flurry sdk which I have used for ios.4.2.3

我想知道,当我在
有效的架构中编写:arm64 armv7 armv7s 时,错误显示在我用于 ios.4.2.3 的 flurry sdk 中

but ,when I write .. valid architectures:armv64 armv7 armv7s,then no error displayed,application runs fine.

但是,当我写..有效架构:armv64 armv7 armv7s,然后没有显示错误,应用程序运行良好。

I know,I will hav to update all my libraries to 64 bit support like flurry sdk,etc.

我知道,我将不得不将我所有的库更新到 64 位支持,例如 flurry sdk 等。

But,please anyone tell me detail in steps as what should be done to convert 32 bit xcode app into 64 bit app.

但是,请任何人详细地告诉我如何将 32 位 xcode 应用程序转换为 64 位应用程序的步骤。

And,how one can know the architecture of the libraries used in the project using terminal command.

以及,如何使用终端命令了解项目中使用的库的体系结构。

Thanks..

谢谢..

回答by Maheswaran Ravisankar

It's arm64not armv64

arm64不是 armv64

enter image description here

在此处输入图片说明

To explain these,

为了解释这些,

Architectures:First Step is to set the Architecture to Standard architectures(Apple recommended). Which means build both 32 and 64 Bit architectures. This would change your iOS Deployment Targetto iOS5.1.1. With a confirmation from you.

架构:第一步是将架构设置为Standard architectures(Apple 推荐)。这意味着同时构建 32 位和 64 位架构。这会将您更改iOS Deployment TargetiOS5.1.1. 得到你的确认。

Valid Architectures :Specify the architectures you want to build:
armv7 and armv7s are for 32 bit devices.
arm64 is for 64 bit devices

有效架构:指定您要构建的架构:
armv7 和 armv7s 适用于 32 位设备。
arm64 适用于 64 位设备

Build Active Architecture Only :This is to specify, whether, build all the valid architectures or build only for the target specified. So for Debug, set is as Yes, hence, it builds only the current architecture, (32 bit, if iPhone 5 64bit if iPhone 5s). And For Release as No. (Build all architecture for Release).

仅构建活动体系结构:这是指定是构建所有有效体系结构还是仅为指定的目标构建。因此,对于 Debug,set 为 Yes,因此,它仅构建当前架构(32 位,如果 iPhone 5 64 位,如果 iPhone 5s)。并为发布为编号(为发布构建所有架构)。

Apple's recommendation on 64 bit conversion

Apple 对 64 位转换的建议

回答by Balaji Kondalrayal

  1. Open your app project in Xcode (version 5.0.1 or later).
  2. Update the project settings to support iOS version 5.1.1 or later.
  3. In the Build Settings section of the project settings set Standard architectures (arm64) for the Architectures
  4. The previous changes will raise some compiler warnings and errors in your project.
  5. Test the project on 64-bit devices apart from the iOS Simulator.
  6. Take advantage of Instruments to check your application's memory usage.
  1. 在 Xcode(版本 5.0.1 或更高版本)中打开您的应用项目。
  2. 更新项目设置以支持 iOS 5.1.1 或更高版本。
  3. 在项目设置的 Build Settings 部分为 Architectures 设置 Standard architectures (arm64)
  4. 之前的更改会在您的项目中引发一些编译器警告和错误。
  5. 在 iOS 模拟器之外的 64 位设备上测试项目。
  6. 利用 Instruments 来检查应用程序的内存使用情况。