ionic-team / ionic-team/capacitor-plugins
bug: Deferred Deeplink not working and `App.getLaunchUrl()` return undefined.
- Dominant language
- Java
- Stars
- 678
- Forks
- 685
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 3
Description
## Bug Report
### Capacitor Version
```
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 4.7.3
@capacitor/core: 4.7.3
@capacitor/android: 4.7.3
@capacitor/ios: 4.7.3
Installed Dependencies:
@capacitor/cli: 3.2.2
@capacitor/core: 3.2.2
@capacitor/ios: 3.2.2
@capacitor/android: 3.2.2
[success] iOS looking great! 👌
[success] Android looking great! 👌
```
### Platform(s)
Android
iOS
### Current Behavior
`App.getLaunchUrl()` return undefined.
### Expected Behavior
it should return deferred deeplink when coming from playstore or app store after installing application.
### Code Reproduction
```
async getAppLaunch(){
const launchUrl = await App.getLaunchUrl();
console.log(launchUrl)
if (launchUrl && launchUrl.url) {
// parse the launchUrl URL to extract the deep link data
const deepLinkData = new URLSearchParams(launchUrl.url.split('?')[1]);
console.log(deepLinkData.get('ddl')); // prints "mydeeplinkdata"
}
}
```
### Other Technical Details
I am implementing deferred deeplink when user clicks on my link it and they dont have app installed it will take them to respective store after installation `App.getLaunchUrl()` is not returning original clicked link.
User clicks on this link which takes them to playstore:
`https://play.google.com/store/apps/details?id=com.example.myapp&deeplinkdata=mydeeplinkdata`
after installation how can i get data in my app?
Normal deeplinks are working. if user have app installed and click any link it open my app and takes them to respective content / page.
`npm --version` output: 9.3.1
`node --version` output: v16.13.1
`pod --version` output (iOS issues only): 1.11.3
### Additional Context
i tried to setup `play.google.com` as my intent filter.
tried this ADC Command
`adb shell am start -W -a android.intent.action.VIEW -d "https://play.google.com/store/apps/details?id=com.example.myapp&ddl=mydeeplinkdata" com.example.myapp
`
Nothing is working. haven't tried on ios but i need this for iOS Too.
Contributor guide
Assessment
This issue has not been assessed yet.