Reputation: 1
I'm trying to use the Custom-URL-scheme in my Ionic Application but it's not working. I am using:
Cordova-iOS Version: 3.8.0
Ionic Version: 1.4.5
Xcode Version: 4.2
I've installed the plugin using cordova cli. In the app.js of my application I've placed the handleOpenURL function in the bottom. Now if I try to open the application from another app using he following code, it doesn't work.
<button onclick="window.open('MyGreatApp://', '_system')">Open the other app</button>
or
<a href="MyGreatApp://">Open the other app</a>
I also tried changing the plugin.xml of the Custom URL plugin. But not working. Need help about this.
Upvotes: 0
Views: 1456
Reputation: 909
It might be about upper-case usage. It says use only lowercase letters for scheme name (and some other rules) here:
https://github.com/EddyVerbruggen/Custom-URL-scheme#4-url-scheme-hints
And while installing plugin you should give scheme as variable like this:
cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=mygreatapp
or if you already installed it, you can set variable in your config.xml
:
<plugin name="cordova-plugin-customurlscheme" spec="~4.2.0">
<variable name="URL_SCHEME" value="mygreatapp" />
</plugin>
Upvotes: 0