如何知道是否iOS应用构建为64位。 [英] How to know if the iOS App you build is for 64 bit.

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

问题描述

我想建立一个iPhone应用程序为64位。我怎么知道天气是构建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-视图可以帮助?如果是,去哪里找呢? 也有它的任何命令行。 ?

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

我下文称这个,但它并不能帮助我知道天气这一点,是建还是不为64位。 <一href="https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1" rel="nofollow">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天全站免登陆