Skip to content

chore(firebase_dynamic_links): update example app proving deeplink works from terminated app state #9250

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

Merged
merged 5 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/dynamic-links/receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ start the activity with this intent filter to handle the link.

1. On the Signing & Capabilities page, enable **Associated Domains** and
add the following to the Associated Domains list:

```
applinks:example.page.link
```
Expand Down Expand Up @@ -180,3 +180,8 @@ FirebaseDynamicLinks.instance.onLink.listen((dynamicLinkData) {
// Handle errors
});
```

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kevinthecheung, are you happy with this documentation update?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

### Testing A Dynamic Link On iOS Platform

To test a dynamic link on iOS, it is required that you use an actual device. You will also need to run the app in release mode (i.e. `flutter run --release`.),
if testing a dynamic link from a terminated (i.e. app has been swiped closed.) app state.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '10.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -28,6 +28,8 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://reactnativefirebase.page.link/**</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
Expand All @@ -22,7 +22,6 @@ class DefaultFirebaseOptions {
'you can reconfigure this by running the FlutterFire CLI again.',
);
}
// ignore: missing_enum_constant_in_switch
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
Expand All @@ -33,35 +32,43 @@ class DefaultFirebaseOptions {
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}

throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}

static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyCdRjCVZlhrq72RuEklEyyxYlBRCYhI2Sw',
appId: '1:406099696497:android:40da41183cb3d3ff3574d0',
messagingSenderId: '406099696497',
projectId: 'flutterfire-e2e-tests',
databaseURL:
'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app',
storageBucket: 'flutterfire-e2e-tests.appspot.com',
apiKey: 'AIzaSyCuu4tbv9CwwTudNOweMNstzZHIDBhgJxA',
appId: '1:448618578101:android:1be54ee660fd87d2ac3efc',
messagingSenderId: '448618578101',
projectId: 'react-native-firebase-testing',
databaseURL: 'https://react-native-firebase-testing.firebaseio.com',
storageBucket: 'react-native-firebase-testing.appspot.com',
);

static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyDooSUGSf63Ghq02_iIhtnmwMDs4HlWS6c',
appId: '1:406099696497:ios:e666f0a995aa455a3574d0',
messagingSenderId: '406099696497',
projectId: 'flutterfire-e2e-tests',
databaseURL:
'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app',
storageBucket: 'flutterfire-e2e-tests.appspot.com',
apiKey: 'AIzaSyAHAsf51D0A407EklG1bs-5wA7EbyfNFg0',
appId: '1:448618578101:ios:3e76955ab6d49ecaac3efc',
messagingSenderId: '448618578101',
projectId: 'react-native-firebase-testing',
databaseURL: 'https://react-native-firebase-testing.firebaseio.com',
storageBucket: 'react-native-firebase-testing.appspot.com',
androidClientId:
'406099696497-tvtvuiqogct1gs1s6lh114jeps7hpjm5.apps.googleusercontent.com',
'448618578101-a9p7bj5jlakabp22fo3cbkj7nsmag24e.apps.googleusercontent.com',
iosClientId:
'406099696497-nqjkqmm0fm17cdksju0o817aj226ooqb.apps.googleusercontent.com',
iosBundleId: 'io.flutter.plugins.firebase.dynamiclinksexample',
'448618578101-4km55qmv55tguvnivgjdiegb3r0jquv5.apps.googleusercontent.com',
iosBundleId: 'io.invertase.testing',
);
}