分析发现私有 API 使用情况,尽管我已经更改了该代码

发布于 2024-10-30 19:11:46 字数 381 浏览 3 评论 0原文

我的应用程序因使用私有方法 -[UIImage initWithData:cache:] 在 App Store 审核后被拒绝,但这是我的代码:

NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[details image]]];
picture = [[UIImage alloc] initWithData:imageData];

我提交的应用程序的早期版本确实 > 包含一个 initWithData:cache: 调用,但我在重新提交之前删除了它。我是否需要清理构建?构建是否以某种方式“记住”旧代码?

My app was rejected after App Store review for using the private method -[UIImage initWithData:cache:], but this is my code :

NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[details image]]];
picture = [[UIImage alloc] initWithData:imageData];

An earlier version of the app I submitted did contain an initWithData:cache: call, but I removed this before resubmitting. Is it possible I need to clean the build? Is the build somehow "remembering" the old code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

池木 2024-11-06 19:11:46

您在该片段中使用的所有函数都有公共文档,因此值得向 Apple 投诉并要求澄清。以下是每个文档的链接,顺便说一句:

  1. NSURL URLWithString
  2. NSData dataWithContentsOfURL
  3. UIImage initWithData

请注意,Apple 的消息引用了“initWithData:cache:”,但是,您提供的代码片段指“initWithData:”。您确定您提供的代码是Apple 提到的吗?

All the functions you used in that snippet have public documentation, so it would be worth complaining to Apple and demanding clarification. Here are the links to the documentation for each of those, BTW:

  1. NSURL URLWithString
  2. NSData dataWithContentsOfURL
  3. UIImage initWithData

Note that Apple's message refers to the "initWithData:cache:", however, the snippet you provided refers to "initWithData:". Are you sure that the code you've provided is what was referred to by Apple?

放血 2024-11-06 19:11:46

(从OP对问题的编辑中复制出来。)

我通过创建一个全新的项目并从旧项目复制文件来解决这个问题。当项目确实包含 initWithData:cache: 方法时,看起来好像有什么东西出现了。

(Copied out from an edit to the question by the OP.)

I resolved this by creating a completely new project and copying files across from old project. It looks like something was ghosting from when the project did contain the initWithData:cache: method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文