分析发现私有 API 使用情况,尽管我已经更改了该代码
我的应用程序因使用私有方法 -[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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您在该片段中使用的所有函数都有公共文档,因此值得向 Apple 投诉并要求澄清。以下是每个文档的链接,顺便说一句:
请注意,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:
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?
(从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.