How to check supported architectures for my framework in terminal?

浪子不回头ぞ 提交于 2020-01-24 12:24:06

问题


I want to know which architectures are supports my framework.

I referred some of stack overflow questions and tried like this in terminal

lipo -info /Users/admin/library/myFramework.framework

But I didn't get any solution.

How to solve my problem.


回答1:


lipo -info pathToFramework/MyFramework.framework/MyFramework

you may get an error like

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

select command Line tools

after this try again

lipo -info pathToFramework/MyFramework.framework/MyFramework




回答2:


In Terminal:

file /path/to/MyFramework.framework/MyFramework

Example output:

path/to//MyFramework.framework/MyFramework: Mach-O universal binary with 5 architectures
path/to//MyFramework.framework/MyFramework (for architecture x86_64):   Mach-O 64-bit dynamically linked shared library x86_64
path/to//MyFramework.framework/MyFramework (for architecture i386): Mach-O dynamically linked shared library i386
path/to//MyFramework.framework/MyFramework (for architecture armv7):    Mach-O dynamically linked shared library arm
path/to//MyFramework.framework/MyFramework (for architecture armv7s):   Mach-O dynamically linked shared library arm
path/to//MyFramework.framework/MyFramework (for architecture arm64):    Mach-O 64-bit dynamically linked shared library


来源:https://stackoverflow.com/questions/40546721/how-to-check-supported-architectures-for-my-framework-in-terminal

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