Good day,
I've bee trying to make it work for iOS but it always returns "No app installed that can handle URI".
tried to use the sample but it doesn't seem to work also even though I have the fb app installed on my iPad
window.plugins.launcher.launch({uri:'fb://profile'}, successCallback, errorCallback);function successCallback(data){ alert('success');}function errorCallback(errMsg){ alert(errMsg);}
Hi Royce,
I know remember that I've created this plugin:
https://www.outsystems.com/forge/component/3079/edit-plist-file-plugin/
In order to accomplish what you also want! Apple needs to know beforehand what apps your app need to know. That plugin comes with some apps already white-listed, but you should fork it (github link), and change the plugin.xml file to include the apps that you'll need to check/open, like this:
commit the changes, then in the plugin extensibility, you need to change the plugin url from:
https://github.com/kelter-antunes/cordova-plugin-edit-plist-file.git
to your forked version. After that, republish, generate and reinstall the app and you should be ready to go!
Let me know if this help you!
Cheers,Miguel
Miguel 'Kelter' Antunes wrote:
Hi Miguel,
Figured it out as well by looking into the docs, urlScheme is now properly working. however my android version of the app wont continue with its build it says "In Android on 2018-05-08 at 18:54:46 - There was a timeout while building the the app. Please try again", also how do I implement the checkIfPluginExist?
Thank you,
My experience with this plugin using URI was great on Android but on iOS didn't work.
Also I try to puts on Extensibility Configuration this tag and not work.
Test on Safari the URI and works, but using my app to call that, not work as well
{ "name": "LSApplicationQueryStrings", "value": [ "waze", "comgooglemaps", "maps.apple.com"] }
Marcel M. Falcão wrote:
I have a big problem as I am unable to test this on iOS (don't have a device and don't have anyone to ask for).If someone can help with this and want to be part of the team, I am planning a new version of it.
Eduardo Jauch wrote:
Eduardo did you test on iOS?Has something that I can try or test?
Hello Royce,
I don't have an iOS to test this.I'll see what I can do.
As soon as I have an answer (if no one else is able to help before), I'll come back here.
Cheers.
EDIT:
Did you tried this format? fb://profile/<profileid>
Hi Eduardo,
Thanks for your quick reply, Tried it also but to no avail. even the canLaunch function doesn't work. Hoping that we can resolve this asap :)
have you installed the app in your iPad before adding the plugin?
Whenever you add a new plugin to your app, a new build must be done and the app must be reinstalled, could this be the problem?
You can also read more about this here.
Yes, I did re-build and re-install the app. plugin is properly working for Android but not on iOS when i'm trying to open URL Schemes.
Hi Guys,
I noticed this from the plugin documentation, I tried applying it to the extensibility config but still doesn't work. maybe there's just something wrong on how I applied it to the config. looking forward for your inputs on this.
without going and checking, the plugin itself, I can tell you your preferences do not have the right syntax. The property "LSApplicationQueryStrings" should be assigned an array with the values of the app schemes you want to whitelisted (able to be launched from your app), in this case customSchemeName:// and fb://:
"preferences": { "ios": [{ "name": "LSApplicationQueryStrings", "value": [ "customSchemeName", "fb"] }] }
Could you try it and see if it works?
you just need to add a reference to that action, and place it somewhere in the code of your application. This will allow the app builder to attach the plugin in the building phase of the app. It is really just for that, since the plugin usage is in the building phase and not in runtime as most of the other plugins.
The action reference is clear for me, however what if the build on the users phone is not the latest one, the action will be there but the plugin components are not.
Right, I see your point...
Like I said, at runtime there's no way to know if the user have the plugin (edit-plist-file-plugin) or not. What you can do is to normally call CheckAppLauncherPlugin action, to check the user has that plugin. User with the previous version, will probably have it, but since they don't have the new build with both plugins, you can call the CanLaunch, and assume that if the user can't launch it, it's because he don't have both plugins. And after that, suggest the user to update the application.
Does it makes sense?