iOS 私有框架 [英] iOS Private Frameworks

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

问题描述

我正在尝试在我的项目中使用私有框架,问题是当我将.framework文件添加到项目中时,没有头文件

I'm trying to use Private Frameworks in my project, The problem is when I add the .framework file to the project, there is no header file

有什么解决办法吗?

谢谢!

推荐答案

BJ Homer 说的是对的:私有框架仅供 Apple 使用,因此他们没有理由发布标题.

What BJ Homer said is correct: private frameworks are for Apple's use only, so there's no reason why they would ship the headers.

也就是说,如果你想在野外行走,并且不想将你的应用提交到应用商店,你可以尝试使用 class-dump 基于框架中的库文件创建头文件.这不会生成 Apple 使用的真实标头 - 您只会获得方法签名.您不会得到任何常量或 C 函数,当然也不会得到任何信息丰富的注释.您使用的任何私有框架都可能会在下一个 iOS 版本中发生变化,从而破坏您的应用.

That said, if you want to walk on the wild side, and you don't want to submit your app to the app store, you can try using class-dump to create headers based on the library file in the framework. This won't generate the real headers that Apple uses - you just get the method signatures. You don't get any constants or C functions, and you certainly don't get any informative comments. Any private frameworks you do use will probably change in the next release of iOS, breaking your app.

这篇关于iOS 私有框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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