iOS>> ShareKit:如何解决FBRequest文件中的警告?

发布于 2024-12-01 01:06:17 字数 929 浏览 0 评论 0原文

我正在我的应用程序中实现 ShareKit。一切工作正常,我还摆脱了大部分警告(所有警告都是因为 ShareKit 支持 OS 2.x - 我的应用程序支持 3.2 及更高版本而引起的,所以我无论如何都不需要这些代码行......)

只有一个文件我无法解决 - FBRequest.m。我不能简单地删除收到警告的行,因为如果我这样做,我的应用程序将无法连接到 Facebook。

在我发表的关于这个问题的上一篇文章中,有人向我推荐了一个 ShareKit 分叉,它应该可以解决这个问题 - 但是(!)它要求我切换我已经为我的应用程序修改的文件(而且,我运行了分叉“示例”应用程序”并发现相同的警告...)。

如果我深入到特定警告,它们总计为 2 种类型(我有 9 个警告,但大多数都来自同一类型)

  1. FBLOGFBLOG2 - 每当其中之一出现在代码中,我收到以下警告:未使用的实体问题:表达式结果未使用
  2. FBXMLHandlerNSXMLParser - 有 2 个与此相关的警告问题,在parseXMLResponse方法:

    - 类“FBXMLHandler”未实现“NSXMLParserDelegate”协议
    - 语义问题:分配给“id”来自不兼容类型“FBXMLHandler *”
    

:碰巧在他们的应用程序中解决了这些问题,可以指导我如何处理它们吗?

或者...

是否有人遇到这些问题,忽略它们,将他们的应用程序上传到应用程序商店并且没有被Apple App Review拒绝(因此可以说“嗨,你可以忽略这些警告。Apple不在乎... ”)?

I'm implementing ShareKit in my App. Everything is working fine, I also got rid of most of the warnings (all the warnings that are caused because ShareKit suports OS 2.x - my app suports 3.2 and above, so I didn't need these code lines anyhow...)

There is only one file I'm not able to solve - the FBRequest.m. I cannot simply remove the lines that get warnings because if I do so my app doesn't connect to Facebook.

In a previous post I published about this issue someone referenced me to a ShareKit fork that supposes to fix this - but (!) it requires that I switch the files that I already modified for my app (and also, I ran the fork "Example App" and found the same warnings...).

If I drill down to the specific Warnings, they sum up to 2 types (I have 9 warnings, but most of them are from the same type)

  1. FBLOG and FBLOG2 - whenever one of them appear in the code, I get the following Warning: Unused Entity Issue: Expression result unused
  2. FBXMLHandler vs. NSXMLParser - There are 2 warnings relating to this issue, in the parseXMLResponse method:

    - Class 'FBXMLHandler' does not implement the 'NSXMLParserDelegate' protocol
    - Semantic Issue: Assigning to 'id<NSXMLParserDelegate>' from incompatible type 'FBXMLHandler *'
    

Had anyone happened to solve these issues in their app and can guide me how to deal with them?

OR...

Had anyone encountered these issues, ignored them, uploaded their app to app store and was not rejected by Apple App Review (and therefore can say "hi, you can just ignore these warnings. Apple don't care...")?

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

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

发布评论

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

评论(2

绮烟 2024-12-08 01:06:17

我发现一篇解决 FBXMLHandler 与 NSXMLParser 问题的帖子

是链接:

https://github.com/ideashower/ShareKit/issues/215

关于FBLOG问题 - 我刚刚对所有行做了“//”产生这个警告似乎工作正常。

如果有人知道我在这里所做的事情是错误的并且可能会导致其他问题,请告诉...

I found one post that solves the FBXMLHandler vs. NSXMLParser issues

here is the link:

https://github.com/ideashower/ShareKit/issues/215

Regarding the FBLOG issue - I just did "//" for all the lines that produce this warning and it seems to be working fine.

If anyone knows that what I had done here is wrong and may cause other problems, do tell...

明媚如初 2024-12-08 01:06:17

我遇到了同样的问题,我最终做了你所做的:))

由于括号而出现警告。它将函数解释为表达式,并认为您没有使用它的结果。

关于它的作用,我不是 100% 确定,但看着它,我非常确信它只是一个对调试有用的日志函数,没有任何实际作用。

I encountered the same problem and I ended up doing just what you did :))

The warning appears because of the parentheses. It interprets the function as an expression and considers that you didn't use it's result.

Regarding what it does, I'm not 100% sure but looking at it I'm quite convinced it's just a log function useful for debug without any actual role.

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