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

时间:2020-05-25 16:44:21

标签: ios xcode flutter google-signin

当我将 googlesignin插件与flutter一起使用时,IOS的构建失败。它适用于android。包括以下错误。我已经尝试了干净的扑朔迷离,并且还尝试过一个新的项目。

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.```


1 个答案:

答案 0 :(得分:0)

确保遵循Start integrating Google Sign In into your iOS App上的所有说明。

这包括:

  1. 添加GoogleSignIn窗格
  2. 为您的项目添加URL方案
  3. 可能按照链接下一页上的说明配置GIDSignIn共享实例。