iOS版Google SignIn无法构建,因为它正在寻找不存在的文件 [英] Google SignIn for iOS fails to build because it's looking for a file that doesn't exist

查看:356
本文介绍了iOS版Google SignIn无法构建,因为它正在寻找不存在的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google刚刚将其iOS登录库更新为

Google just updated their sign in library for ios to version 3.0.0. In the process, it looks like they also caused the library to fail to build with the error ld: file not found: MY_APP_PATH/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a

我该怎么做才能解决这个问题? 我正在使用Cocoapods.

What can I do to solve this? I'm using Cocoapods.

推荐答案

我主要提出了这个问题,以便对如何解决此问题有一个Google可以回答的问题.

I mostly made this question so that there's a google-able answer on how to fix this issue.

就像我在上面的问题中所述,该问题是由2016年3月22日Google iOS库的v3.0.0更新引起的.

Like I stated in the question above, the issue is caused by the March 22 2016 v3.0.0 update of the Google iOS libraries.

Google Signin Podspec v3. 0.0 (鉴于围绕Cocoapods生态系统构建方式的性能问题,我实际上不建议您使用该链接)将库GoogleUtilities列为依赖项.

The Google Signin Podspec v3.0.0 (I don't actually recommend you follow that link given the performance issues surrounding how the Cocoapods ecosystem is architected) lists the library GoogleUtilities as a dependency.

"dependencies": {
    "GoogleUtilities": [
      "~> 1.0"
    ],

GoogleUtilities Podspec v1 .2.0 使导入这些文件的人可以使用以下文件:

The GoogleUtilities Podspec v1.2.0 makes these files available to those who import it:

"vendored_libraries": [
    "Libraries/libGTM_iPhone_external.a",
    "Libraries/libGTM_core_external.a",
    "Libraries/libGTM_UIFont+LineHeight_external.a",
    "Libraries/libGTM_SystemVersion_external.a",
    "Libraries/libGTM_StringEncoding_external.a",
    "Libraries/libGTM_RoundedRectPath_external.a",
    "Libraries/libGTM_Regex_external.a",
    "Libraries/libGTM_NSStringXML_external.a",
    "Libraries/libGTM_NSStringHTML_external.a",
    "Libraries/libGTM_NSScannerJSON_external.a",
    "Libraries/libGTM_NSDictionary+URLArguments_external.a",
    "Libraries/libGTM_NSData+zlib_external.a",
    "Libraries/libGTM_KVO_external.a",
    "Libraries/libGTM_GTMURLBuilder_external.a",
    "Libraries/libGTM_DebugUtils_external.a",
    "Libraries/libGTM_AddressBook_external.a",
    "Libraries/libGTMStackTrace_external.a"
  ],

请注意,GoogleUtilities无法使libGTM_NSData+zlib可用. GoogleUtilityies的早期版本可能确实使该文件可用,但是由于上述性能问题,我无法通过查看podspec的先前版本来确认这一点.

Notice that GoogleUtilities does not make libGTM_NSData+zlib available. It's likely that the previous version of GoogleUtilityies did make that file available, but I'm not able to confirm that by looking at the previous version of the podspec due to the performance issues mentioned above.

我通过将GoogleSignIn依赖项回滚到以前的版本2.4.0来修复了构建错误.

I fixed the build error by rolling my GoogleSignIn dependency back to the previous version, 2.4.0.

为此,请打开您的Podfile并替换

To do that, open your Podfile and replace

pod 'Google/SignIn'

使用

pod 'GoogleSignIn', '2.4.0'

进行项目范围内的搜索,并将其替换为将<Google/SignIn.h>替换为<GoogleSignIn.h>.

Do a project-wide search and replace that replaces <Google/SignIn.h> with <GoogleSignIn.h>.

这篇关于iOS版Google SignIn无法构建,因为它正在寻找不存在的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆