Always redirecting to iOS App Store
bismarabia opened this issue · 12 comments
Have you added
<key>LSApplicationQueriesSchemes</key>
<array>
<string>dashboss</string> // url scheme name of the app
</array>
in the info.plist file?
Yes I did @sarika01
but still getting this the following logs
flutter: installed -> 0
flutter: App not found in the device
@sarika01 all of the tests are done in the simulator btw...
@sarika01 any update on this? I need this for an urgent task...
@bismarabia
Can you check for ios app store link once ?
Also try to set
openStore:false
In main.dart file and test the case.
it still says flutter: App not found in the device
this is from the app I want to launch.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>pulsesecure</string>
</array>
and this is from the app I'm launching from
await LaunchApp.openApp(
androidPackageName: '{packageID}',
iosUrlScheme: 'pulsesecure://',
openStore: false,
);
I tried this in iOS from a simulator (debug mode).
@sarika01 @GayathrideviGA any update on this?
@bismarabia
Try to check the case with a real device as some times simulator could not able to open up App Store link it results app not found exception. Also it seems it works well with android device so try to debug it with real device with openStore: true
.
The code should be like,
await LaunchApp.openApp(
androidPackageName: 'net.pulsesecure.pulsesecure',
iosUrlScheme: 'pulsesecure://',
appStoreLink:
'https://apps.apple.com/in/app/pulse-secure/id945832041',
openStore: true);
@GayathrideviGA This issue keeps happening, seems like the library is only working Android
, but not working on iOS
.
@bismarabia Were you able to fix it in the end, I would really appreciate some help on this, otherwise, I will need to find another library :/
It works fine on Android. I tested it....
for iPhone. it doesn't work on simulator at all. I tested it on a real iPhone release mode and it always directs to AppStore even thought the app is installed.
For me, it's ok, at least at this point, I'm gonna leave it like this since the user can open the app from AppStore, it will say "OPEN" if installed, "GET" otherwise.
Looking forward to seeing a fix for this issue. @jaiswalshubham84 @Gayathri-GA
To overcome this issue, I'm using this package (2.0.2) along with url_launcher 6.0.18:
if (Platform.isAndroid) {
if (await LaunchApp.isAppInstalled(androidPackageName: appId)) {
await LaunchApp.openApp(
androidPackageName: appId
);
} else {
launch(storeUrl);
}
} else if (Platform.isIOS) {
if (await canLaunch(appId)) {
launch(appId);
} else {
launch(storeUrl);
}
}
The support is now available in external_app_launcher: ^3.0.0