我为我的应用程序配置了动态链接,但它在Android上运行得很好,但它只引导我到应用程序商店,而不是实际的应用程序。
- Flutter 医生-v**
[!] Flutter (Channel stable, 3.7.3, on macOS 13.1 22C65 darwin-arm64, locale en-KR)
• Flutter version 3.7.3 on channel stable at /Users/hyungilkang/fvm/versions/3.7.3
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.7/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/hyungilkang/fvm/versions/3.7.3. Consider adding /Users/hyungilkang/fvm/versions/3.7.3/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9944297138 (13 days ago), 2023-02-08 15:46:04 -0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/hyungilkang/Library/Android/sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Zulu17.38+21-CA (build 17.0.5+8-LTS)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] VS Code (version 1.75.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (2 available)
• iPhone (mobile) • 00008110-001E2D4A220A401E • ios • iOS 16.1.1 20B101
• macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm64
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 3 categories.
- 安卓清单. xml**
....
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="incle.page.link"
android:scheme="https" />
<data
android:host="incle.page.link"
android:scheme="http" />
</intent-filter>
....
- iOS配置**
- 信息列表**
...
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://incle.page.link/share</string>
</array>
...
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>Bundle ID</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.incle.incleClientApp</string>
</array>
</dict>
</array>
...
- 跑步者权利**
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applink:incle.page.link</string>
</array>
</dict>
</plist>
- 我创建动态链接的方式**
Future<void> onClickShare(String storeID) async {
final dynamicLinkParams = DynamicLinkParameters(
link: Uri.parse(
"https://incle.page.link/share?route=${StoreDetailScreen.routeName}&argument=$storeID"),
uriPrefix: "https://incle.page.link",
androidParameters:
const AndroidParameters(packageName: "com.incle.incle_client_app"),
iosParameters:
const IOSParameters(bundleId: "com.incle.incleClientApp"),
socialMetaTagParameters: SocialMetaTagParameters(
description: storeInfoState.value!.data!.storeDescription,
imageUrl: Uri.parse(storeInfoState.value!.data!.storeImage.isEmpty
? ''
: storeInfoState.value!.data!.storeImage.first),
title: storeInfoState.value!.data!.storeName));
final dynamicLink = await FirebaseDynamicLinks.instance.buildShortLink(
dynamicLinkParams,
shortLinkType: ShortDynamicLinkType.short);
Share.share(dynamicLink.shortUrl.toString());
}
我相信我详细阐述了所有需要的配置,使Firebase动态链接在Flutter上工作。它在Android上的工作就像魔术一样。
但在iOS上,当我点击预览页面中的"打开链接"按钮时,它只会将我重定向到应用商店。我不知道如果我用带调试器的应用测试它是否有问题,但至少它不适用于Testflight安装的应用。
请帮助我,拯救我的一天大师们!非常感谢。
1条答案
按热度按时间bvjveswy1#
其实这是一个极其简单的问题。
applink:incle.page.link
应已修复为applinks:incle.page.link
希望没有人会犯同样的错误,像我一样遭受几天的痛苦!