我已经在 Unity 的 Android 版本下成功设置了 Firebase,但我真的很难让它在我的 iOS 版本中工作。
Unity Firebase project was setup and looks fine:
![enter image description here](https://i.stack.imgur.com/MzMoz.png)
我已遵循以下所有步骤:https://firebase.google.com/docs/unity/setup 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(但我只是猜测它会生成一个)。
该项目会生成错误,尝试手动解决这些错误只会产生更多错误。
Here is the project right after the first build:
![enter image description here](https://i.stack.imgur.com/u9aOW.png)
Trying to resolve this modules disabled error:
![enter image description here](https://i.stack.imgur.com/Lwmeh.png)
Then after building this is what I see:
![enter image description here](https://i.stack.imgur.com/9djQc.png)
I then tried adding the GoogleMobileAds.framework iOS framework:
![enter image description here](https://i.stack.imgur.com/8QKBu.png)
After running again I get these errors:
![enter image description here](https://i.stack.imgur.com/a60X9.png)
在网上阅读有关这些错误的信息后,有很多关于 CocoaPods 的提及,但运行 pod init 只是创建了一个空白工作区,并没有解决我的问题。