diff --git a/CHANGELOG.md b/CHANGELOG.md index f02e962..9082953 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.2.0 +* Add configurations in example. + ## 0.1.0+2 * Update README.md. diff --git a/README.md b/README.md index a569ed9..c1980f5 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler. This plugin allows you to: -- catch HTTPS URLs to open your app instead of the browser (App Links / Universal Links). -- catch custom schemes to open your app (Deep Links / Custom URL schemes). +- catch HTTPS URLs to open your app instead of the browser (App Link / Universal Link). +- catch custom schemes to open your app (Deep Link / Custom URL scheme). ## Getting Started @@ -43,7 +43,7 @@ Android notes: - Intent action is filtered by `Intent.ACTION_VIEW` (for now). - By default, flutter Activity is set with `android:launchMode="singleTop"`. -This is perfectly fine and expected, but this launches another instance of your app, specifically for the requested view. +This is perfectly fine and expected, but this launches another instance of your app, specifically for the requested view. If you don't want this behaviour, you can set `android:launchMode="singleInstance"` in your `AndroidManifest.xml` and avoid another flutter warmup. ## Tests diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index e085c94..6b2cda9 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -16,6 +16,25 @@ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> + + + + + + + + + + + + + + + + + + + CFBundleURLTypes + + + + CFBundleURLSchemes + + app + + + CFBundleURLName + open.my.app + + + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable diff --git a/example/ios/Runner/Runner.entitlements b/example/ios/Runner/Runner.entitlements new file mode 100644 index 0000000..010ff7e --- /dev/null +++ b/example/ios/Runner/Runner.entitlements @@ -0,0 +1,11 @@ + + + + + + com.apple.developer.associated-domains + + applinks:www.example.com + + + \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index e067cf5..6d55e2f 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,32 +1,26 @@ import 'package:flutter/material.dart'; +/////////////////////////////////////////////////////////////////////////////// +/// This example does nothing. +/// +/// Please take a look at: +/// - example/android/app/main/AndroidManifest.xml for Android. +/// +/// - example/ios/Runner/Runner.entitlements for Universal Link sample. +/// - example/ios/Runner/Info.plist for Custom URL scheme sample. +/////////////////////////////////////////////////////////////////////////////// + void main() { runApp(MyApp()); } -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - String _platformVersion = 'Unknown'; - - @override - void initState() { - super.initState(); - } - +class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( - appBar: AppBar( - title: const Text('Plugin example app'), - ), - body: Center( - child: Text('Running on: $_platformVersion\n'), - ), + appBar: AppBar(title: const Text('Plugin example app')), + body: Center(child: Text('Foo')), ), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index f7d47f7..f1c4b03 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: path: ".." relative: true source: path - version: "0.1.0+2" + version: "0.2.0" async: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ab0d906..1e010f4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: app_links description: Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter. -version: 0.1.0+2 +version: 0.2.0 homepage: https://github.com/llfbandit/app_links environment: