EddyVerbruggen / Custom-URL-scheme

:link: Launch your Cordova/PhoneGap app by a Custom URL scheme like mycoolapp://
1.03k stars 367 forks source link

Cold start does not work on IOS #209

Closed srameshr closed 7 years ago

srameshr commented 7 years ago
index.html

<body>
  <script>
      function handleOpenURL(url) {
        alert(url)
        setTimeout(function() {
          window.localStorage.setItem("externalLoad", JSON.stringify(url));
        }, 0);
      }
    </script>
</body>

app.js

$ionicPlatform.ready(() => {
  function navigateEv() {
    alert("From cold start")
  }
  $timeout(() => {
     navigateEv();
   }, 750);
})

The problem is handleOpenURL does not fire from cold start.

IOS Version: 10.0
Cordova version: 6.3.1
IOS Cordova: 4.2.1
leandroguimaraes commented 7 years ago

Try "Handling Custom URLs" from here https://medium.com/angularjs-articles/deep-linking-in-ionic-mobile-applications-44d8b4685bb3#.p1ap2r6oo

srameshr commented 7 years ago

Solved it. It was CSP issue.

henkkelder commented 7 years ago

Could you please describe your solution?

srameshr commented 7 years ago

I removed the CSP (the whole meta tag) and enabled key chain access as I was developing on IOS 10 via xcode.

If you dont know how to enable keychain access, please google it