app_links_lego
lego that apply app_links.
Installation
- open terminal in the lego project root directory, enter the following command for install cli. and create a new lego project if you don't have one.
flutter pub global activate lego_cli
lego create
- in terminal, enter the following command for add lego to project.
lego add app_links_lego
- apply all step in app_links_guide
Configuration
App Configuration
- If the juneflow project doesn't exist, please create it by following this guide.
- open terminal in the juneflow project root directory, enter the following command.
june add app_links_lego
WebSite Configuration
- use this template, create new repository in your github account.
- clone the repository to your local computer.
- go to cloudflare, login and select Workers & Pages > Overview > Create application > Pages Tap > Connect to Git > select the repository you just created. > Begin setup > Save and Deploy.
- open cloned project, go to index.html file, replace the content with the following code.
your_scheme
-> your app scheme name. ex) myappyour.app.package
-> your app package name. ex) com.example.myapp
1.android part setting
- get sha-256 fingerprint from your app
- if you want get debug fingerprint on mac, enter the following command in terminal.
- if your computer not installed java, please install it first.
- go to install page, download and install
macOS x64 Installer.
- go to install page, download and install
- if your computer not installed java, please install it first.
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
- if you want get debug fingerprint on windows, enter the following command in terminal.
- if your computer not installed java, please install it first.
- go to install page, download and install
Windows x64 Installer.
- go to settings > system > about > advanced system settings > environment variables > system variables > path > edit > new > paste the path.
- ex) C:\Program Files\Java\jdk-16\bin
- create new android project and run once to generate the debug.keystore file.
- go to install page, download and install
- if your computer not installed java, please install it first.
keytool -list -v -keystore "C:\Users\[UserName]\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
- if you want get release fingerprint, create appbundle and upload to google play store, then you can find the sha-256 fingerprint in app signing section in google play console.
flutter build appbundle
- replace
11:22:33:44:55:66...
in.well-known/assetlinks.json
file with the sha-256 fingerprint you just got. - replace
your.package.name
in.well-known/assetlinks.json
file with your app package name. ex) com.example.myapp
2. ios part setting
-
replace
apple team id
in.well-known/apple-app-site-association
file with your apple team id.- you can find your apple team id membership section in apple developer account.
-
replace [
app bundle id
] in.well-known/apple-app-site-association
file with your app package name. ex) com.example.myapp -
commit and push to github for update cloudflare pages.
Android Configuration
- add the app link and deep link code inside .MainActivity activity in android/app/src/main/AndroidManifest.xml file.
- replace
your_scheme
with your app scheme name. ex) myapp - replace
your.app.package
with your app package name. ex) com.example.myapp - replace
your.web.site
with your web site url that you created in step 5.
<!-- App Link -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="[your.web.site]" />
<data android:scheme="https" android:host="[your.web.site]" />
</intent-filter>
<!-- Deep Link -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Add optional android:host to distinguish your app
from others in case of conflicting scheme name -->
<data android:scheme="[your_scheme]" android:host="[your.app.package]" />
<!-- <data android:scheme="sample" /> -->
</intent-filter>
iOS Configuration
- open xcode in /ios/Runner.xcworkspace, go to Runner > Info > URL Types > add new URL Type. > add URL Schemes with your app scheme name. ex) sample
- go to Signing & Capabilities > + Capability > Associated Domains > add new Associated Domain. > add your web site url with applinks prefix. ex) applinks:your.web.site
- Warning
- when write applinks prefix, do not add https:// prefix. ex) applinks:your.web.site
- do not add / at the end of the url. ex) applinks:your.web.site
- Warning
MacOS Configuration
- open xcode in /macos/Runner.xcworkspace, go to Runner > Info > URL Types > add new URL Type. > add URL Schemes with your app scheme name. ex) sample
- go to Signing & Capabilities > + Capability > Associated Domains > add new Associated Domain. > add your web site url with applinks prefix. ex) applinks:your.web.site
- Warning: when write applinks prefix, do not add https:// prefix. ex) applinks:your.web.site
- do not add / at the end of the url. ex) applinks:your.web.site
Usage
EasyEventBus.on('receive_app_links_uri', (url) {
print(url); // write your code here.
});
Libraries
- main
- util/_/build_app/function/before_material_app/_
- util/_/build_app/function/before_material_app/app_links_lego/_
- util/_/build_app/function/before_material_app/bot_toast_lego/_
- util/_/build_app/function/before_run_app/_
- util/_/build_app/function/before_run_app/app_links_lego/_
- util/_/build_app/widget/material_app/_
- util/_/build_app/widget/material_app/app_links_lego/_
- util/_/build_app/widget/material_app/bot_toast_lego/_
- util/_/build_app/widget/my_app/_
- util/_/build_app/widget/my_app/app_links_lego/_
- util/_/build_app/widget/run_app/_
- util/_/build_app/widget/run_app/app_links_lego/_
- util/_/build_app/widget/run_app/screenutil_lego/_
- util/_/module_functions/app_links_lego/_
- util/_/shared_params/_/material_app
- util/_/shared_params/_/start_app_params
- util/_/shared_params/app_links_lego/_
- util/_/shared_params/bot_toast_lego/_
- util/config/app_links_lego/_
- util/usage/app_links_lego/usage
- util/usage/app_links_lego/usage_view
- widget_book/app_links_lego.bottom_sheet/_/_
- widget_book/app_links_lego.bottom_sheet/bottom_sheet
- widget_book/app_links_lego.bottom_sheet/usage
- widget_book/app_links_lego.dialog/_/_
- widget_book/app_links_lego.dialog/dialog
- widget_book/app_links_lego.dialog/usage
- widget_book/app_links_lego.in_app_notification/_/_
- widget_book/app_links_lego.in_app_notification/in_app_notification
- widget_book/app_links_lego.in_app_notification/usage
- widget_book/app_links_lego.snackbar/_/_
- widget_book/app_links_lego.snackbar/snackbar
- widget_book/app_links_lego.snackbar/usage
- widget_book/app_links_lego.toast/_/_
- widget_book/app_links_lego.toast/toast
- widget_book/app_links_lego.toast/usage
- widget_book/app_links_lego/_/_