简体   繁体   English

在 IOS 上使用 Flutter 的 GoogleSignIn - 构建失败

[英]GoogleSignIn with Flutter on IOS - build fails

The build fails for IOS when I use googlesignin plugin with flutter.当我使用带有 flutter 的googlesignin 插件时,IOS 的构建失败。 It works fine for android.它适用于 android。 Including the error below.包括下面的错误。 I have already tried flutter clean and also tried to start with a fresh project.我已经尝试过 flutter clean 并且还尝试从一个新项目开始。

Automatically signing iOS for device deployment using specified development team in Xcode project: 
Running Xcode build...
Xcode build done.                                           304.8s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-05-25 09:28:41.547 xcodebuild[21636:235481]  DTDeviceKit: deviceType from 00008030-001345E602B8802E was NULL
    2020-05-25 09:28:41.613 xcodebuild[21636:235481]  DTDeviceKit: deviceType from 00008030-001345E602B8802E was NULL
    2020-05-25 09:28:42.304 xcodebuild[21636:235481]  DTDeviceKit: deviceType from 00008006-000B25610CEB002E was NULL
    2020-05-25 09:28:42.309 xcodebuild[21636:235451]  DTDeviceKit: deviceType from 00008006-000B25610CEB002E was NULL
    2020-05-25 09:28:42.442 xcodebuild[21636:235398] [MT] DTDeviceKit: deviceType from 00008006-000B25610CEB002E was NULL
    2020-05-25 09:28:42.448 xcodebuild[21636:235398] [MT] DTDeviceKit: deviceType from 00008006-000B25610CEB002E was NULL
    2020-05-25 09:28:42.453 xcodebuild[21636:235398] [MT] DTDeviceKit: deviceType from 00008006-000B25610CEB002E was NULL
    ** BUILD FAILED **


Xcode's output:
↳
    Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_GTMOAuth2KeychainCompatibility", referenced from:
          objc-class-ref in GoogleSignIn(GIDAuthStateMigration_425a588fcd149b383bb30d0e6a3b4322.o)
      "_OBJC_METACLASS_$_GTMAppAuthFetcherAuthorization", referenced from:
          _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_2dc0a81d98f461bd0c0b7c8749d3689a.o)
         (maybe you meant: _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate, _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport )
      "_OBJC_CLASS_$_GTMKeychain", referenced from:
          objc-class-ref in GoogleSignIn(GIDAuthStateMigration_425a588fcd149b383bb30d0e6a3b4322.o)
      "_OBJC_CLASS_$_GTMAppAuthFetcherAuthorization", referenced from:
          _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_2dc0a81d98f461bd0c0b7c8749d3689a.o)
          objc-class-ref in GoogleSignIn(GIDAuthentication_2dc0a81d98f461bd0c0b7c8749d3689a.o)
          objc-class-ref in GoogleSignIn(GIDSignIn_2f842adf59cff94dba6bfcb1043c2758.o)
          objc-class-ref in GoogleSignIn(GIDAuthStateMigration_425a588fcd149b383bb30d0e6a3b4322.o)
         (maybe you meant: _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport, _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate )
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

Error launching application on... iPhone.```


Make sure you follow all the instructions on the Start integrating Google Sign In into your iOS App .确保您遵循开始将 Google 登录集成到您的 iOS 应用程序中的所有说明。

This includes:这包括:

  1. Adding the GoogleSignIn pod添加GoogleSignIn窗格
  2. Adding a URL scheme to your project将 URL 方案添加到您的项目
  3. Possibly configure the GIDSignIn shared instance following the instructions on the next page of the link.可能按照链接下一页上的说明配置GIDSignIn共享实例。

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

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