Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 2.9 KB

DeepLinking.md

File metadata and controls

87 lines (61 loc) · 2.9 KB

Deep linking in Flutter

Deep linking in Flutter

> AndroidManifest

<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<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="spacemoon.shark.run" />
    <data android:scheme="https" />
</intent-filter>

<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="spacemoon" android:host="" />
</intent-filter>

---
adb shell am start -W -a android.intent.action.VIEW -d "spacemoon:///chat/id" run.shark.spacemoon

adb shell am start -a android.intent.action.VIEW \
    -c android.intent.category.BROWSABLE \
    -d "http://domain.name:optional_port"

adb shell 'am start -a android.intent.action.VIEW \
    -c android.intent.category.BROWSABLE \
    -d "http://spacemoon.shark.run/chat/id"'     run.shark.spacemoon

spacemoon:///chat/id/
> Info.plist

  <dict>
   <key>CFBundleTypeRole</key>
   <string>Viewer</string>
   <key>CFBundleURLName</key>
   <string></string>
   <key>CFBundleURLSchemes</key>
   <array>
    <string>spacemoon</string>
   </array>
  </dict>

  <key>FlutterDeepLinkingEnabled</key>
  <true/>


> Runner.entitlements

 <array>
  <string>applinks:spacemoon.shark.run</string>
 </array>

---
xcrun simctl openurl booted spacemoon:///chat

spacemoon:///chat/id/

xcrun simctl openurl booted https:spacemoon.shark.run/chat/id