Navigator.notification.activityStart not working in IOS


#1

Hi,

I am new to ionic, here is my code for loading dialog on page load event in InAppBrowser. It is working fine with the android, but the same it not showing in IOS.

var ref=window.open(url, ‘_blank’);
ref.addEventListener(‘loadstart’, function() {
navigator.notification.activityStart(“Please Wait”, “It’ll only take a moment…\nPlease don`t press back button.”);
});
ref.addEventListener(‘loadstop’, function() {
navigator.notification.activityStop();
});

Please go through my code and let me know why it is not showing up in IOS only. Else is there any alternative way to show loading in between page load in InAppBrowser.


#2

Have you got the solution for this problem? I am also facing similar issue. If you got the solution, please share with me.


#3

I got the solution
Open CDVThemeableBrowser.m from plugin of inAPPBrowsser folder

Replace below line

self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; line number 630

with

self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; line number 630

and

self.spinner.frame = CGRectMake(454.0, 231.0, 20.0, 20.0); line number 637

with

self.spinner.frame = CGRectMake(self.view.frame.size.width / 2 - 10, self.view.frame.size.height/ 2 - 10, 20, 20);

from this link http://www.ionicapp.in/2016/11/navigatornotificationactivitystart-not.html