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

ぃ、小莉子 提交于 2019-11-30 19:33:14

问题


i am getting these errors when i try to compile on iOS:

on 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:662:15: No known class method for selector '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? How is responsible for this at Facebook, why can't we contact them directly?


回答1:


Put -fno-objc-arc in the compile flags of the FbUnityInterface.mm , and it will work




回答2:


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.



来源:https://stackoverflow.com/questions/29318048/workaround-for-unity5-ios-compile-error-with-facebook-unity-sdk-6-2-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!