gpt4 book ai didi

ios - App Store 禁止 performSelector 和 respondsToSelector 吗?

转载 作者:可可西里 更新时间:2023-11-01 03:45:11 24 4
gpt4 key购买 nike

我的最新版本已被 Apple 应用商店接受,但几天后我收到了下面引用的通知。

我的应用程序也使用 Rollout.io,我明确询问这是否是问题所在。暂无回复。

如果 respondsToSelector 或 performSelector 被禁止,是否有替代品?

Dear Developer,

Your app, extension, and/or linked framework appears to contain code designed explicitly with the capability to change your app’s behavior or functionality after App Review approval, which is not in compliance with section 3.3.2 of the Apple Developer Program License Agreement and App Store Review Guideline 2.5.2. This code, combined with a remote resource, can facilitate significant changes to your app’s behavior compared to when it was initially reviewed for the App Store. While you may not be using this functionality currently, it has the potential to load private frameworks, private methods, and enable future feature changes.

This includes any code which passes arbitrary parameters to dynamic methods such as dlopen(), dlsym(), respondsToSelector:, performSelector:, method_exchangeImplementations(), and running remote scripts in order to change app behavior or call SPI, based on the contents of the downloaded script. Even if the remote resource is not intentionally malicious, it could easily be hijacked via a Man In The Middle (MiTM) attack, which can pose a serious security vulnerability to users of your app.

Please perform an in-depth review of your app and remove any code, frameworks, or SDKs that fall in line with the functionality described above before submitting the next update for your app for review.

编辑:苹果论坛提到这个:https://forums.developer.apple.com/thread/73640

最佳答案

被禁止的不是 respondsToSelector:、performSelector:。禁止将动态内容作为此方法的参数。例如,这不是禁止的:

if([self.delegate respondsToSelector: @selector(myDelegateMethod)]) {
[self.delegate performSelector: @selector(myDelegateMethod)];
}

但是,此代码可能会被禁止:

NSString *remotelyLoadedString = .... (download from your backend)
[self performSelector: NSSelectorFromString(remotelyLoadedString)];

关于ios - App Store 禁止 performSelector 和 respondsToSelector 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42662028/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com