从终端机,我可以使用
深度链接到 Android 设备或模拟器adb shell am start -a android.intent.action.VIEW -d "myurl"
对于 iOS,以下内容可以深度链接到模拟器
xcrun simctl openurl booted "myurl"
iOS设备连接终端怎么样?我搜索并找不到任何说明的地方。
在玩了一下 devicectl 之后,我发现了一种几乎可以按需要工作的方法!
我发现可以在设备上启动一个带有 url 的应用程序,这给了我们两个选项:
xcrun devicectl device process launch --device xxx --terminate-existing --payload-url https://example.com com.apple.mobilesafari
xcrun devicectl device process launch --device xxx --terminate-existing --payload-url https://example.com your.app.bundle.id