現在、iOSアプリをGoogle公式サイトの「Google Sign-In for iOS」を参照して実施しています。
プロジェクトは新規に何度もトライしていますが、どうもうまく行きません。
公式サイト:https://developers.google.com/identity/sign-in/ios/sign-in?ver=swift
AppDelegate.swift
Swift
1func application(application: UIApplication, 2 didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 3 // Initialize sign-in 4 var configureError: NSError? 5 GGLContext.sharedInstance().configureWithError(&configureError) 6 assert(configureError == nil, "Error configuring Google services: (configureError)") 7 8 GIDSignIn.sharedInstance().delegate = self 9 10 return true 11}
サイトの通り、上記を記載するのですが、Podfileで追加モジュールを、'GoogleSignIn'の新しいモジュールを用いると、定義がないためGGLContextのエラーが発生「Use of unresolved identifier 'GGLContext'」します。
そのため、'Google/SignIn'を追加しています。
Podfile
1 pod 'Google/SignIn'
で、エラーを回復(AppDelegate.swiftにimport Googleも追加し)させ、コンパイルすると、GTMOAuth2がないため、以下エラーがでます。
clang: error: linker command failed with exit code 1 (use -vto see invocation)
そのため、GTMOAuth2をPod Installしますが、それでもコンパイルできません。
色々試していますが、うまくいきません。
iOSでGoogleアカウントでログインしたいだけなんですが、本件の修正方法や、他のオススメのやり方などあれば、自由にご意見をお願いします。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。