-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
authorize callback was not called in SwiftUI app #28
Comments
I have 2 questions (because I'm seeing the same thing)
|
@antoniokly I figured it out! If you're running a pure SwiftUI app this is what you need to do. @main
struct MyApplication: App {
var body: some Scene {
WindowGroup {
ContentView()
.onOpenURL { url in
// This is where you handle the scene opening a URL
strava.handleAuthorizationRedirect(url)
}
}
}
} Once you set this up, you'll see the callback in |
hi, do you have a full example in SwiftUI? |
Actually, I was able to get this working 😅 we can close it. |
I had to instantiate my client using a regular |
Hi there,
I have followed all the steps, added URI types, so I am able to open the Strava app, authorise and then redirect back to my app when calling
StravaClient.sharedInstance.authorize { (result) in print(result) }
however the callback
{ (result) in print(result) }
was not called.It tried your example app, it worked! What am I still missing? I am writing my app using SwiftUI, that is the only difference I can spot.
The text was updated successfully, but these errors were encountered: