【Flutter】Sign in with Appleで「com.apple.AuthenticationServices.AuthorizationError error 1000.」の対処法

記事内に商品プロモーションを含む場合があります

技術メモ

Flutter にてSign in with Appleを実装する際に以下のエラーで詰まったのでメモしておきます。

 

flutter: Sign in failed: The operation couldn’t be completed. (com.apple.AuthenticationServices.AuthorizationError error 1000.)

 

 

Appleログインを実装する場合は以下のパッケージを利用します。

 

apple_sign_in | Flutter package
Sign in With Apple for Flutter. Native API bindings and a Flutter implementation of the sign in button.

 

 

実装は以下の記事を参考にしました。

めちゃくちゃわかりやすいです。

 

Flutter + Firebase: Sign in with Apple
Firebase Auth 0.15.3 brings support for ‘Sign In with Apple’.

 

開発環境

  • MacBook Pro (macOS Catalina バージョン10.15.1)
  • Flutter 1.12.13+hotfix.5 channel stable
  • Dart 2.7.0

 

 

Sign in with Appleでログインする際に「com.apple.AuthenticationServices.AuthorizationError error 1000」が発生

 

実装完了後に確認のためログインしようとしたところ、

 

 

エラーが発生。

 

flutter: Sign in failed: The operation couldn’t be completed. (com.apple.AuthenticationServices.AuthorizationError error 1000.)

 

解決方法

結論から言うと、XcodeにてCapabilityに[Sign In With Apple]を追加する事で解決しました。

 

XcodeのCapabilityをクリックします。

(個人的にPush通知を使用しているので、すでに[Push Notifications]が登録されていますが無視してください)

 

「sign」と検索して表示される[Sign In with Apple]をダブルクリックして登録します。

 

登録が完了した後は、All、Debug、Release、Profile全てに[Sign In with Apple]が登録されているか確認してください。

※私の場合は手違いで[Sign In with Apple]の登録漏れがあったために、com.apple.AuthenticationServices.AuthorizationError error 1000. が発生していました。

 

これでflutter runして確認してみると、

 

 

問題なくサインインできました。

 

FlutterのエラーはiOSシミュレータ側で起こることも多いので、注意が必要です。

エラー原因がFlutter特有のものなのか、シミュレータ側なのか冷静に切り分けましょう。

技術メモ
スポンサーリンク
スポンサーリンク
のすけをフォローする
やばブロ!

コメント