auth0 / auth0-flutter

Auth0 SDK for Flutter
https://pub.dev/documentation/auth0_flutter/latest/
Apache License 2.0
57 stars 36 forks source link

Get compiler error when switching to use SFSafariViewController for iOS #456

Closed jingjiewei closed 1 month ago

jingjiewei commented 1 month ago

Checklist

Description

My app add a feature to use SFSafariViewController to open the website, so for SSO, I have to changed the web auth also using SFSafariViewController.(l) The Default auth0.webAuthentication().login() function already works in the app, so I followed the steps as this doc(https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/EXAMPLES.md#using-sfsafariviewcontroller-ios-only) described, but got an error while launching the app in debug mode:

image

Reproduction

It's an building error, no steps.

Additional context

No response

auth0_flutter version

1.7.2

Flutter version

3.16.5

Platform

iOS

Platform version(s)

Xcode v15.3, iOS 17.4

jingjiewei commented 1 month ago

Update: I manage to make it work by changing the code to, image

Please update the docs and example code(https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/example/ios/Runner/AppDelegate.swift), so other people won't be confused. After that, happy to close this issue.