在我的ios应用程序中添加了FBAudience网络,但是在编译代码时面临FBNativeAdd.h中的以下问题。关于为什么发生这种情况或如何解决此问题的任何想法都将非常有帮助。

In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/src/Track.m:13:
In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/src/Util.h:24:
In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/Pods/FBAudienceNetwork/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h:27:
/Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/Pods/FBAudienceNetwork/FBAudienceNetwork.framework/Headers          /FBNativeAd.h:245:11: error: 'objc_boxable' attribute only applies to struct or union
FB_EXPORT FB_OBJC_BOXABLE struct FBAdStarRating {
      ^
In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/src/Track.m:13:
In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/src/Util.h:24:
In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/Pods/FBAudienceNetwork/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h:21:
In file included from /Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/Pods/FBAudienceNetwork/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h:21:
/Users/bbbb/gitProjects/aaaa/frameworks/runtime-src/proj.ios_mac/Pods/FBAudienceNetwork/FBAudienceNetwork.framework/Headers/FBAdDefines.h:40:40: note: expanded from macro 'FB_OBJC_BOXABLE'
#define FB_OBJC_BOXABLE __attribute__((objc_boxable))

最佳答案

我通过注释掉有问题的代码来解决了这个问题,因为在我的场景中没有使用该对象。

感谢MattDice的回答,当我使用4.10.1时它现在可以正常工作
Facebook似乎已修复它。

关于ios - FBAudience网络:objc_boxable属性仅适用于结构或联合,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36178316/

10-12 03:22