简体   繁体   English

使用facebook-unity-sdk 6.2.1解决Unity5 iOS编译错误

[英]Workaround for Unity5 iOS compile error with facebook-unity-sdk 6.2.1

i am getting these errors when i try to compile on iOS: 我尝试在iOS上编译时收到这些错误:

on ios: FBLinkShareParams *dialogParams = [[[FBLinkShareParams alloc] init] autorelease]; 在ios上:FBLinkShareParams * dialogParams = [[[FBLinkShareParams alloc] init] autorelease]; /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:561:73: 'autorelease' is unavailable: not available in automatic reference counting mode /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:561:73:'autorelease'不可用:在自动参考计数模式下不可用

/Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:662:15: No known class method for selector 'publishInstall:withHandler:' /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:662:15:没有已知的选择器'publishInstall:withHandler:'的类方法

now these don't seem to be that much of a problem, so is there any Facebook developer here who can give as a fast workaround this? 现在这些问题似乎不是那么大,所以有没有Facebook开发人员可以提供快速解决方案呢? How is responsible for this at Facebook, why can't we contact them directly? 如何在Facebook上对此负责,我们为什么不能直接与他们联系?

把-fno-objc-arc放在FbUnityInterface.mm的编译标志中,它会工作

Following user2018862's advice, this worked for me (setting the -fno-objc-arc flag for FbUnityInterface.mm ), where FbUnityInterface.mm is found under the "Compiled Sources" section of the "Build Phases" pane. 按照user2018862的建议,这对我有用(为FbUnityInterface.mm设置-fno-objc-arc标志),其中FbUnityInterface.mm位于“Build Phases”窗格的“Compiled Sources”部分下。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM