【发布时间】:2017-06-25 19:34:12
【问题描述】:
我已经在 Unity 中的 Android 版本下成功设置了 Firebase,但我真的很难让它在我的 iOS 版本中运行。
我已按照以下所有步骤操作: https://firebase.google.com/docs/unity/setup
我已经安装了 CocoaPods:
skywalker:sl leonard$ pod --version
1.2.0
这是生成的顶级 iOS 项目:
skywalker:sl leonard$ ls
Classes Libraries
Data MapFileParser
Info.plist MapFileParser.sh
LaunchScreen-iPad.png Unity-iPhone
LaunchScreen-iPad.xib Unity-iPhone Tests
LaunchScreen-iPhone.xib Unity-iPhone.xcodeproj
LaunchScreen-iPhoneLandscape.png UnityData.xcassets
LaunchScreen-iPhonePortrait.png build
我没有看到正在添加的 GoogleService-Info.plist 文件,并且还需要一个 Podfile(但我只是猜测它会生成一个)。
项目产生错误并试图手动解决它们只会产生更多错误。
然后我尝试添加 GoogleMobileAds.framework iOS 框架:
在线阅读有关这些错误的信息后,很多人提到了 CocoaPods,但运行 pod init 只是创建了一个空白工作区,并没有解决我的问题。
【问题讨论】:
-
对于任何有兴趣的人。我解决这个问题的方法是按照上述步骤操作,但每次通过 Unity 重建时,都要从 iOS 项目中手动删除和读取 GoogleMobileAds.framework。不理想,但至少它有效
标签: ios firebase admob unity3d-5