简体   繁体   English

适用于iOS的Google登录快速错误:桥接标头'... path / myProject / myProject / myProject-Bridging-Header.h'不存在

[英]Google Sign-in for iOS swift error: bridging header '…path/myProject/myProject/myProject-Bridging-Header.h' does not exist

I followed all the instructions on Google Sign-in for iOS using CocoaPods (even though I hadn't used CocoaPods before and still don't really understand what it is) and I am getting this error when I run the program: 我使用CocoaPods遵循了iOS的Google登录中的所有说明(即使我以前没有使用过CocoaPods,但仍然不太了解它是什么),并且在运行程序时遇到了此错误:

bridging header '...path/myProject/myProject/myProject-Bridging-Header.h' does not exist 桥接标头'... path / myProject / myProject / myProject-Bridging-Header.h'不存在

I made sure that my header file is in the right place and everything. 我确保头文件在正确的位置,所有内容都在正确的位置。 Any help? 有什么帮助吗?

UPDATE: 更新:

I tried deleting the whole project and following the steps over and I realized that when I typed pod 'Google/SignIn' it said [!] Unknown command: 'Google/SignIn' . 我尝试删除整个项目并按照步骤进行操作,然后我意识到,当我输入pod 'Google/SignIn'它说[!] Unknown command: 'Google/SignIn'

Is this step somehow the reason why the bridging header has an error? 这是某种原因导致桥接头出现错误的原因吗?

So I solved my own problem and I thought I should put my answer so if anyone has the same problem they don't have to lose sleep over it. 因此,我解决了自己的问题,我认为我应该回答我的问题,这样,如果有人遇到相同的问题,他们就不必为此沉迷。

The reason that the bridging header was coming up with an error was because the Google/SignIn wasn't linked in the Podfile. 桥接标头出现错误的原因是因为Podfile中未链接Google/SignIn Instead of following Google's steps in the "Set up your CocoaPod dependencies" section of this page, I followed the steps from CocoaPods Guides - Using CocoaPods to link the pod. 我没有遵循页面“设置CocoaPod依赖项”中Google的步骤,而是按照CocoaPods指南-使用CocoaPods链接容器的步骤进行操作

The main step (the one that I don't think happened last time) was this: 主要步骤(我认为上次没有发生)是:

Add a CocoaPod by specifying pod '$PODNAME' on a single line inside your target block [of your Podfile]. 通过在[Podfile]的目标块内的一行中指定pod'$ PODNAME'来添加CocoaPod。

The last step from here is to... 从这里的最后一步是...

Open the MyApp.xcworkspace that was created. 打开创建的MyApp.xcworkspace。 This should be the file you use everyday to create your app. 这应该是您每天用来创建应用程序的文件。

so ya... hope that helps somebody 所以...希望能对某人有所帮助

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

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