如何知道您构建的 iOS 应用程序是否适用于 64 位. [英] How to know if the iOS App you build is for 64 bit.

查看:37
本文介绍了如何知道您构建的 iOS 应用程序是否适用于 64 位.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 64 位构建一个 iOS 应用程序.我怎么知道天气是为 32 位还是 64 位构建的?

I am trying to build an iOS Application for 64 bit. How do I know weather it is build for 32 bit or 64 bit ?

Mach-O-View 有帮助吗?如果是,在哪里寻找?还有它的任何命令行.?

Does Mach-O-View can help ? if Yes, where to look for it ? Also is there any command line for it. ?

我提出了这个问题,但它并不能帮助我了解它是否为 64 位构建的天气.https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1

I reffered this but it does not help me to know weather this it is built or not for 64 bit. https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1

推荐答案

试试这个:

#ifdef __LP64__
// NSLog(@"64");
#else
// NSLog(@"32");
#endif

它适用于 OS X,但我没有在 iOS 上测试它(我没有 iPhone5S :().

It works for OS X, but I didn't test it for iOS (I don't have an iPhone5S :( ).

顺便说一下,它在 iPhone 模拟器上运行良好.

By the way, it works fine on iPhone Simulator.

这篇关于如何知道您构建的 iOS 应用程序是否适用于 64 位.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆