检查Objective-C中受支持的框架架构 [英] Check supported architectures of framework in Objective-C

查看:70
本文介绍了检查Objective-C中受支持的框架架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据苹果在明年2月(2014年2月)的要求,提交给AppStore的每个应用都需要支持Arm64架构.在我的项目中,我使用了许多静态库(* .a),并且可以检查这些库是否支持arm64 arch.但是,我不知道某些框架(例如Facebook.framework)是否支持此新架构.我该如何检查?

As requested by Apple in the next February (February 2014), every app submitted to AppStore needs to support Arm64 architecture. In my project, I used many static libraries (*.a) and I can check if these libs support arm64 arch. However, I don't know if some frameworks such as Facebook.framework supports this new arch. How can I check it?

推荐答案

每个框架实际上只是一个目录-甚至不像package目录,而是一个纯目录,您可以使用Finder直接浏览该目录.进入.framework文件夹,在顶层找到与框架名称相同的文件(对于较旧的框架,该文件可能位于.framework文件夹中名为Versions/A的文件夹下).

Each framework is really just a directory - not even like a package directory, but a plain directory you can browse directly into with Finder. Go into the .framework folder, at the top level you'll find a file with the same name as the framework (for older frameworks that file may be located under a folder called Versions/A within the .framework folder).

该文件实际上是静态库(.a)文件,只是没有扩展名.像检查任何静态库一样(使用filelipo -info)对其进行检查,您将看到该文件包含哪些二进制文件.

That file is really a static library (.a) file, just without the extension. Check it as you would any static library (using file or lipo -info) and you'll see what binaries the file contains.

尽管如此,您还将通过XCode知道.如果您将项目切换为支持arm64,并且要链接的库不支持arm64,则在为设备编译时XCode不会完成链接.

You'll also know through XCode though. If you switch your project to support arm64 and the libraries you are linking to do not have arm64 support, XCode will not finish linking when compiling for a device.

这篇关于检查Objective-C中受支持的框架架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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