How to know if the iOS App you build is for 64 bit.

梦想的初衷 提交于 2019-12-19 10:54:00

问题


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 ?

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

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


回答1:


Try this:

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

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

Edit:

By the way, it works fine on iPhone Simulator.



来源:https://stackoverflow.com/questions/19228703/how-to-know-if-the-ios-app-you-build-is-for-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!