Skip to content
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

The app closes instantly when launching from custom scheme url - IOS #154

Open
yadsbah opened this issue Jun 29, 2022 · 3 comments
Open

Comments

@yadsbah
Copy link

yadsbah commented Jun 29, 2022

I'm using custom scheme and am testing
on my iPhone6, iOS Simulator
which is running iOS 15

the app works fine when I launch it from https (Universal Link)
but when I try to launch it using Custom URL scheme it crashes instantly, dosent reach the main function ether.

@yadsbah yadsbah changed the title The app closes instantly when launching from custom scheme url The app closes instantly when launching from custom scheme url - IOS Jun 30, 2022
@Shuxin-Lai
Copy link

Thanks to ChatGPT. Add the following code under AppDelegate.swift file:

  override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
      if let flutterViewController = window?.rootViewController as? FlutterViewController {
          let channel = FlutterMethodChannel(name: "uni_links", binaryMessenger: flutterViewController.binaryMessenger)
          channel.invokeMethod("getInitialLink", arguments: ["url": url.absoluteString])
      }
      return true
  }

@thanhle1547
Copy link

Thanks to ChatGPT. Add the following code under AppDelegate.swift file:

It's worked, my app did launch, but when I'm continuing open another link, it's shows that uriLinkStream not working

@thanhle1547
Copy link

After I changed the version of flutterfire_cli to 0.3.0-dev.19 and re-configure, it's fixed the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants