前提・実現したいこと
cognitoによるFacebook認証処理を実装したい
発生している問題・エラーメッセージ
Use of unresolved identifier 'AWSCognitoLoginProviderKey'
該当のソースコード
swift
1override func viewDidAppear(_ animated: Bool) { 2 3 let token = FBSDKAccessToken.current() 4 if (nil != token) { 5 FBSDKGraphRequest( 6 graphPath: "me", parameters: ["fields": "name"] 7 ).start(completionHandler: { (connection, result, error) -> Void in 8 if (nil == error) { 9 guard let data = result as? [String:Any] else { return } 10 self.myName = data["name"] as! String 11 print("myName:", self.myName) 12 } else { 13 print("Error:", error?.localizedDescription as Any) 14 //前の画面に戻る 15 self.dismiss(animated: true, completion: nil) 16 } 17 }) 18 } else { 19 // トークンが取得できなかった場合 20 self.dismiss(animated: true, completion: nil) 21 } 22 23 let credentialsProvider = AWSCognitoCredentialsProvider( regionType: self.REGION_TYPE, identityPoolId: self.IDENTITY_POOL_ID) 24 let configuration = AWSServiceConfiguration ( region: self.REGION_TYPE, credentialsProvider: credentialsProvider) 25 AWSServiceManager.default().defaultServiceConfiguration = configuration 26 credentialsProvider.logins = [AWSCognitoLoginProviderKey.Facebook.rawValue: token.tokenString] //←エラー「Use of unresolved identifier 'AWSCognitoLoginProviderKey'」 27 28 }
補足情報(FW/ツールのバージョンなど)
xcode Version 9.3
ios 11.3
cocoapods 1.5.0
↓導入したPods
AWSAuthCore (2.6.16)
AWSAuthUI (2.6.16)
AWSCognitoIdentityProvider (2.6.16)
AWSCognitoIdentityProviderASF (1.0.1)
AWSCore (2.6.16)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/17 10:44
2018/04/17 11:11
2018/04/20 11:57
2018/04/20 21:53
2018/04/20 22:05