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

Deep link not working in IOS in Flutter #155

Closed
MohammedHussein05 opened this issue Jul 2, 2022 · 6 comments
Closed

Deep link not working in IOS in Flutter #155

MohammedHussein05 opened this issue Jul 2, 2022 · 6 comments

Comments

@MohammedHussein05
Copy link

MohammedHussein05 commented Jul 2, 2022

Iv configure everything but it just works in android not IOS ,as I saw in the package there were permissions in the info.plist file to keep which I kept already

<key>FlutterDeepLinkingEnabled</key>
        <true />
        <key>CFBundleURLTypes</key>
        <array>
            <dict>
                <key>CFBundleTypeRole</key>
                <string>Editor</string>
                <key>CFBundleURLName</key>
                <string>smartassistrsa.page.link</string>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>customscheme</string>
                </array>
            </dict>
        </array>

And here is My configuration in Dashboard, This function is being called in initState.

Future<void> _handleInitialUri(CsaMemberResClass m) async {
print("inside _handleInitialUri");
try {
  final Uri uri = await getInitialUri();
  print("Uri is $uri");

  if (uri == null) {
    print('url is nullllllll in if');
  } else {
    final String id = uri.toString().split('?').last;

    print("id 1 is $id");
    Default.longftoast("id 1 is $id");

    globalId = id.toString();

    SharedPreferences.getInstance().then((preference) {
      preference.setString(Default.hasUri, "true");
      preference.setString(Default.uriId, globalId.toString());
    });

    Navigator.pushNamed(
      context,
      ActivationNumberOptions.routeName,
      arguments: m,
    );
  }
  if (!mounted) return;
} on PlatformException {
  // Platform messages may fail but we ignore the exception
} on FormatException {
  if (!mounted) return;
}
}
@MohammedHussein05 MohammedHussein05 changed the title Deep link not working in IOS using uni-Link package in Flutter Deep link not working in IOS in Flutter Jul 2, 2022
@yadsbah
Copy link

yadsbah commented Jul 6, 2022

can you please say how did you fix it?
I am facing the same issue

@MohammedHussein05
Copy link
Author

can you please say how did you fix it? I am facing the same issue

Actually after i started using uniLinks package i had'nt removed other packages of deeplink. idk what was the issue but after i removed it started working. can u mention ur problem or show ur code. Are u using same package?

@yadsbah
Copy link

yadsbah commented Jul 6, 2022

can you please say how did you fix it? I am facing the same issue

Actually after i started using uniLinks package i had'nt removed other packages of deeplink. idk what was the issue but after i removed it started working. can u mention ur problem or show ur code. Are u using same package?

I have a similar problem with custom schema not working. The app closes instantly when Launch from a custom schema but works fine with universal URL
#154

here is my info.plist

<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLName</key>
			<string>com.****.****</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>dail</string>
			</array>
		</dict>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>com.googleusercontent.apps........</string>
			</array>
		</dict>
	</array>
<key>FlutterDeepLinkingEnabled</key>
	<true/>

@MohammedHussein05
Copy link
Author

can you please say how did you fix it? I am facing the same issue

Actually after i started using uniLinks package i had'nt removed other packages of deeplink. idk what was the issue but after i removed it started working. can u mention ur problem or show ur code. Are u using same package?

I have a similar problem with custom schema not working. The app closes instantly when Launch from a custom schema but works fine with universal URL
#154

here is my info.plist

<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLName</key>
			<string>com.****.****</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>dail</string>
			</array>
		</dict>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>com.googleusercontent.apps........</string>
			</array>
		</dict>
	</array>
<key>FlutterDeepLinkingEnabled</key>
	<true/>

Iv not worked on custom links but when il be free il see this

@Djihanegh
Copy link

I have the same problem, i used custom schema, it works well on android but on iOS it doesnt not redirect to the app.

@ShahabShahab
Copy link

@Djihanegh
hello
I have the same problem as you on ios, can I find a solution?

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

4 participants