flutter: ❌ [signInWithGoogle] 알 수 없는 오류 발생: PlatformException(google_sign_in, Your app is missing support for the following URL schemes: com.googleusercontent.apps.883859608601-mmdhmi1vsbbqfm1, NSInvalidArgumentException, null)
오류 메시지를 보면 앱이 GoogleSignIn을 위한 URL Scheme을 지원하지 않아서 발생하는 문제입니다.
해결하려면 Info.plist에 올바른 URL Scheme을 추가해야 합니다.
Xcode에서 ios/Runner/Info.plist를 엽니다.
아래 내용을 추가합니다.
"YOUR_REVERSED_CLIENT_ID" 부분을 GoogleService-Info.plist에서 확인한 값으로 변경합니다.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>YOUR_REVERSED_CLIENT_ID</string>
</array>
</dict>
</array>
ios/Runner/GoogleService-Info.plist 파일을 열고,
REVERSED_CLIENT_ID 값을 확인합니다.
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.883859608601-mmdhmi1d41ea3vr3h6p72abvvsbbqfm1</string>
위의 예제에서 "com.googleusercontent.apps.883859608601-mmdhmi16p72abvvsbbqfm1" 값을 Info.plist에 추가해야 합니다.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.883859608601-mmdhmi1d2abvvsbbqfm1</string>
</array>
</dict>
</array>