Describe the bug
When opening a dynamic link the iOS app does not open but instead the website is opened. On debug mode the app opens fine but on release mode it does not.
To Reproduce
Steps to reproduce the behavior:
Future<String> createShareListLink(String userWhoShared, String listId) async {
final DynamicLinkParameters parameters = DynamicLinkParameters(
uriPrefix: 'https://listwell.page.link',
link: Uri.parse('https://listwell.app/?listid=$listId'),
androidParameters: AndroidParameters(
packageName: 'com.robert.listwell',
),
iosParameters: IosParameters(
bundleId: 'bundleId',
appStoreId: "appStoreId",
),
socialMetaTagParameters: SocialMetaTagParameters(
title: '$userWhoShared shared a list with you',
description: 'Clicking on this link will let you join the list',
),
);
final ShortDynamicLink dynamicLink = await parameters.buildShortLink();
return dynamicLink.shortUrl.toString();
}
Expected behavior
The iOS app should open instead of the website.
Flutter doctor
[✓] Flutter (Channel dev, 1.20.0-0.0.pre, on Mac OS X 10.15.5 19F101, locale en-SE)
• Flutter version 1.20.0-0.0.pre at /Users/admin/Documents/flutter
• Framework revision d9653445f4 (8 days ago), 2020-06-09 18:43:03 -0400
• Engine revision e8c13aa012
• Dart version 2.9.0 (build 2.9.0-14.0.dev 5c1376615e)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/admin/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.9.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] Connected device (4 available)
• Vanessas • 5a8e4bf5a531a5209fe285d8b0c5d198406ba001 • ios • iOS 12.4.7
• macOS • macOS • darwin-x64 • Mac OS X 10.15.5 19F101
• Web Server • web-server • web-javascript • Flutter Tools
• Chrome • chrome • web-javascript • Google Chrome
83.0.4103.106
• No issues found!
pubspec.yaml
name: listwell
description: A new Flutter project.
version: 0.0.1+1
environment:
sdk: ">=2.6.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
universal_html: ^1.2.3
universal_io: ^1.0.1
url_launcher: ^5.4.10
firebase_dynamic_links: ^0.5.1
share: ^0.6.4+3
google_fonts: ^1.1.0
cupertino_icons: ^0.1.2
cloud_firestore: ^0.13.6
firebase_auth: ^0.16.1
firebase_analytics: ^5.0.15
auto_size_text: ^2.1.0
flutter_markdown: ^0.4.1
implicitly_animated_reorderable_list: ^0.2.2
animations: ^1.1.0
flushbar: ^1.10.4
provider: ^4.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.7.5
flutter_icons:
image_path_android: "assets/images/icon/icon.png"
image_path_ios: "assets/images/icon/icon.png"
android: true
ios: true
adaptive_icon_background: "assets/images/icon/icon_background.png"
adaptive_icon_foreground: "assets/images/icon/icon_foreground.png"
flutter:
uses-material-design: true
assets:
- assets/
- assets/images/
- "assets/images/icon/icon_foreground.png"
- google_fonts/
thank you @RobertBrunhage
Found the problem!
It was caused by only adding Associated Domains in xcode for Debug only.
It's a bit hidden but where you add Associated Domains they have to be added for the 3 different tabs Debug, Release and Profile if you want it to work on all three. I had it only in the Debug one.
I am going to repoen this because I still see this behavior on iOS 13. Working fine when I click the link on ios 12.4.7.
This is even tested with generating a simple link through the Firebase console.
If the app is installed via TestFlight it does not recognize that the application is installed.
Hi @RobertBrunhage, have you solved it?
Hi @RobertBrunhage, have you solved it?
It seems like the solution I wrote above is correct but you have to reinstall the application as for some reason the behavior is cached.
After reinstalling the application everything seems to work fine! :)
Hi @RobertBrunhage, have you solved it?
It seems like the solution I wrote above is correct but you have to reinstall the application as for some reason the behavior is cached.
After reinstalling the application everything seems to work fine! :)
I reinstall my app 3 times and I get the same problem :(
@vico-aguado Have no clue then. Will reopen the issue again :)
I am having the same issue on iOS 13. I think it may be related to this https://github.com/firebase/firebase-ios-sdk/issues/4914
Does anyone know how to fix this? Had an app rejected by App Store review team because the passwordless email link did not open the app 😞