Opening Testflight App from Another App and Deep Link to Specific App

How to handle opening a URL to load a specific app screen?

Here's my solution to this issue:

struct myApp: App {
@ObservedObject var authenticator = Authenticator.shared
@State var route: URL?
@State var urlToken: String?

var body: some Scene {
WindowGroup {
RootView(url: route)
.onOpenURL { url in
self.route = url
if url.pathComponents.contains("reset"), let token = url.queryDictionary?["token"] {
self.urlToken = token
}
}
.fullScreenCover(item: $urlToken) { _ in
NavigationView {
PasswordResetView(viewModel: .init(onFinish: {
route = nil
urlToken = nil
}))
.onAppear {
self.authenticator.accessToken = urlToken
}
}
}
}
}
}

struct RootView: View {
@ObservedObject var authenticator = Authenticator.shared

var body: some View {
if authenticator.accessToken != nil {
MainTabView()
} else {
NavigationView {
FirstView()
}
}
}
}

What is deep link and how i can create it for App Store?

This is known as 'deferred deep linking'. It's complicated to build — I don't recommend trying to do it yourself. Take a look at free services like Branch.io (full disclosure: I'm on the Branch team) or Firebase Dynamic Links.

Firebase dynamic link not working with Testflight IOS

Hey I had the same problem. Have a look at your associated domains (Xcode build settings) for all configurations and make sure they match Firebase.
Mine had a wrong one for DevRelease configuration(which is TestFlight)



Related Topics



Leave a reply



Submit