objective-c - App Store - Method Swizzling 合法性

标签 objective-c ios app-store swizzling

<分区>

是否有关于 App Store 中方法调配是否合法/非法的最新信息?

我能找到的唯一数据点是前一段时间的 Three20 framework shakeup,它是从这个通知开始的:

Your application, xxx, currently posted to the App Store is using method_exchangeImplementations to exchange the implementation of Apple provided APIs with your own implementations. Because of upcoming changes, this behavior in your application may cause a crash or cause user data loss on iPhone OS 4.0.

xxx uses method_exchangeImplementations to exchange the implementation of dealloc with your method ttdealloc. It also exchanges the implementation of the method popViewControllerAnimated: with your method popViewControllerAnimated2:.

Please resolve this issue immediately and upload your new binary to iTunes Connect. We may remove your application if we believe that doing so is prudent or necessary.


当我四处搜索时,我能找到的关于 swizzling 和应用商店的所有最近对话似乎都提到了同一个 Three20 事件。该通知似乎非常具体,我想知道这个问题是否与 Three20 所做的更改有关,或者 method_exchangeImplementations 是否被普遍禁止。

关于这种做法是否被允许,是否还有其他数据点?商店中是否有应用程序的开发人员正在使用 swizzling?

谢谢!

最佳答案

AFNetworking 是一个广泛 (IMO) 用于网络请求的库,使用 swizzling 至少版本 1.3.4 来支持类方法中额外的可接受状态代码和内容类型。

所以这样做似乎是合法的。

注意:他们使用的是 class_replaceMethod 而不是 method_exchangeImplementations。

关于objective-c - App Store - Method Swizzling 合法性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8834294/

相关文章:

objective-c - 如何在 objective-c 中初始化数组?

iphone - 停止重复 UIView 动画 block ?

ios - 几天后 react native 应用程序无法启动

ios - <b> 标记在 UILabel 属性字符串中不起作用

iphone - 如何计算等轴测图上两点之间的实际距离?

ios - 在后端服务中检索 facebook 数据

ios - 1080p AVCaptureSession

ios - 如何在 iPhone 锁定屏幕上放置一个图标?

iphone - 上传较低版本号的应用程序

iphone - 无效的代码签名权利 - 不支持数据保护 key