In IOS-Ionic Network doesnt works on application start

I am using Network.onConnect() and Network.onDisconnect() to detect the network connection.
On opening my application- it detects the network connection in Android devices but in IOS devices it doesnt.

I have a Online/Offline Login which i need to detect using the network availabilty.

Please can someone help me regarding how to detect the network connection in IOS devices while app start.

Thanks,
Josel

Where do these methods come from? Some plugin? Provide a link please.

Also: What is your ionic info output?

These methods i refered from the below link:

IONIC info
@ionic/cli-utils : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:
cordova (Cordova CLI) : 7.0.1

local packages:
@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 browser
Ionic Framework : ionic-angular 3.8.0

The Code should paste into the platform.ready() method and try.

1 Like

Resolved the issue.

I was calling the platform.ready() method inside a base class where all the network methods where written it was working fine for android but for IOS the platform.ready was not getting fired.
I changed the platform.ready from base class to child-class and now its working fine for me.

Dont know why this is not working in base class?

Thanks for the support

Regards,
Josel

Good! Please give like/ correct answer, if it was helpful to you :slight_smile: