From 82add048f01abcf80b619dd59857294c74170d03 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 21 May 2020 12:56:50 +0200 Subject: [PATCH] MOBILE-3401 core: Fix invalid site URL in iOS when clicking links This is caused by a bug in InAppBrowser plugin. Even with the IAB fix, the handleOpenURL function is called if there is no app to handle the URL so we'll need this check anyway --- src/app/app.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 54d49f357..434d6925b 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -191,6 +191,11 @@ export class MoodleMobileApp implements OnInit { return; } + if (!this.urlSchemesProvider.isCustomURL(url)) { + // Not a custom URL, ignore. + return; + } + this.logger.debug('App launched by URL ', url); this.lastUrls[url] = Date.now();