App Store - Method Swizzling 合法性 [英] App Store - Method Swizzling Legality

查看:25
本文介绍了App Store - Method Swizzling 合法性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is there any current information on wether or not method swizzling is legal/illegal on the App Store?

我能找到的唯一数据点是 Three20 框架改组不久前,从这条通知开始:

The only data point I can find is the Three20 framework shakeup a while back, which started with this notice:

您的应用程序 xxx 当前发布到 App Store 正在使用method_exchangeImplementations 交换苹果的实现提供带有您自己实现的 API.因为即将更改,您的应用程序中的这种行为可能会导致崩溃或导致iPhone OS 4.0 上的用户数据丢失.

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 使用 method_exchangeImplementations 交换实现与您的方法 ttdealloc 的 dealloc.它还交换了方法 popViewControllerAnimated: 的实现方法 popViewControllerAnimated2:.

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:.

请立即解决此问题并将您的新二进制文件上传到iTunes 连接.如果我们认为,我们可能会删除您的申请这样做是谨慎或必要的.

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 和 App Store 的最近所有对话似乎都提到了同一个 Three20 事件.该通知似乎非常具体,我想知道该问题是否是 Three20 所做更改的特定更改问题,或者 method_exchangeImplementations 是否被普遍禁止.

When I'm searching around, every recent conversation I can find about swizzling and the app store seems to reference the same Three20 incident. The notice seems to be pretty specific, and I'm wondering if the issue was specific changes issues with the changes Three20 had made or if method_exchangeImplementations is universally banned.

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

Are there any other data points about whether or not the practice is allowed? Are there any devs with Apps in the store that are using swizzling?

谢谢!

推荐答案

AFNetworking,一个广泛用于网络请求的库 (IMO),用于至少 1.3.4 版本的 swizzling 以支持其他可接受的状态代码和内容- 类方法中的类型.

AFNetworking, a lib widely (IMO) used for network-requests, used swizzling up to at least version 1.3.4 to support additional acceptable status-codes and content-types in class-methods.

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

So it seems legit to do it.

注意:他们使用了 class_replaceMethod 而不是 method_exchangeImplementations.

Note: They used class_replaceMethod and not method_exchangeImplementations.

这篇关于App Store - Method Swizzling 合法性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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