ios - Ionic iOS build error with google-plus plugin
问题描述
How to resolve the following error? I'm not sure where to start...When trying to build my Ionic project for iOS, I get the following error:
$ ionic cordova build ios
....
/Plugins/cordova-plugin-googleplus/GooglePlus.h:2:9: fatal error: 'GoogleSignIn/GoogleSignIn.h' file not found
#import <GoogleSignIn/GoogleSignIn.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
It works great on Android! But I'm not sure what to do about this iOS build error. My current version of the plugin is: 5.3.0 "Google SignIn"
With the following info:
cli packages:
@ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.9 Cordova Platforms : android 7.0.0 browser 5.0.3 ios 4.1.1 Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1 ios-deploy : 1.9.0 ios-sim : 5.0.11 Node : v8.11.1 npm : 6.0.0 OS : macOS Sierra Xcode : Xcode 9.2 Build version 9C40b
UPDATE: It does seem like a dependency error in xcode. I am trying to manually add the GoogleSignin SDK using the instructions here: https://developers.google.com/identity/sign-in/ios/sdk/
Resolved:
In xcode, I dragged and dropped the following 3 files (GoogleSignIn.bundle, GoogleSignIn.framework, GoogleSignInDependencies.framework) from the Google Sign-In SDK - making sure to check the “Copy items into destination group’s folder (if needed)” option.
Now when I build, the dependency to SignIn is resolved.
解决方案
Went to: https://developers.google.com/+/mobile/ios/getting-started
Downloaded Google+ iOS SDK
and added GoogleOpenSource.framework
manually.
推荐阅读
- mysql - 将 Azure SQL 表中的数据链接并导出到我的 SQL 表
- elasticsearch - Elasticsearch:通过数组属性搜索多个文档
- c# - .NET Core 无法连接到 SQL DB
- system-verilog - 如何在垃圾收集时执行 SystemVerilog 代码?
- python - 如何使用 selenium 抓取网页 - find_element_by_link_text
- layout - Flutter:如何使Container的宽度等于Stackview的宽度?
- amazon-web-services - 我应该把 aws cloudfront 放在 ELB 前面吗?
- swift - 如何使用 applicationdidBecomeActive 函数呈现 ViewController,但有一些例外?
- android - 即使在 BroadcastReceiver 注册后也不会调用 OnReceive
- c++ - 如何在 Manjaro 中将 zapcc 设置为默认值?