app_links_lego 1.0.1
app_links_lego: ^1.0.1 copied to clipboard
lego that apply app_links.
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) myapp
- [your.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.]
- 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.
- 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.
});