title: My app is being opened by a URL scheme in iOS, how do I get the complete url?
body: <p>In my iOS app, I'm opening an InAppBrowser with another app and ask a question. Then this second app is calling my app again with the scheme I configured (like myapp://), the complete url is something like myapp://something/:answer. I managed to open the app in the InAppBrowser and then my app reopen when it calls myapp://, but I need the full url so I can get the answer.</p>
  
  <p>So far I tried everything I found with some examples, like <a href="https://ionicframework.com/docs/native/deeplinks" rel="nofollow noreferrer">https://ionicframework.com/docs/native/deeplinks</a> and <a href="https://github.com/EddyVerbruggen/Custom-URL-scheme" rel="nofollow noreferrer">https://github.com/EddyVerbruggen/Custom-URL-scheme</a> but with no luck.</p>
  
  <p>With deeplinks, I've tried to follow the doc but the subscribe is never called and I can't see the console logs.</p>
  
  <pre><code>openSecondApp() {
    this.platform.ready().then( () =&gt; {
      if (this.platform.is('ios')) {
        const url = 'secondapp://link/question';
  
        const options: InAppBrowserOptions = {
          location : 'no',
          hidden : 'no',
          clearcache : 'yes',
          clearsessioncache : 'yes',
          closebuttoncaption : 'Close',
          disallowoverscroll : 'no',
          presentationstyle : 'pagesheet',
        };
  
        const browser = this.inAppBrowser.create(url, '_system');
  
        this.deeplinks.route({
          '/': 'ThisPage'
        }).subscribe(match =&gt; {
          console.log(match);
        }, nomatch =&gt; {
          console.log(nomatch);
        });
      }
    });
  }
  </code></pre>
  
  <p>With custom url scheme I didn't understand where to put the handleOpenURL function. I tried to put it at the end of the <code>&lt;head&gt;</code> tag in index.html:</p>
  
  <pre><code>function handleOpenURL(url) {
    console.log("url: " + url);
  }
  </code></pre>
  
  <p>but it never gets called.</p>
  
  <p>(I'm on iOS, I'm using Ionic4 with capacitor.)</p>
  
  <p>Can someone share an example on how to do this?</p>