Xcode PhoneGap navigator.connection Undefined

后端 未结 2 511
心在旅途
心在旅途 2021-01-06 19:07

Trying to port my PhoneGap javascript code into Xcode for debugging in iOS. Using Cordova-3.0.0.

When I call:

navigator.connection.type
2条回答
  •  执念已碎
    2021-01-06 19:47

    If you simply want to know if you are connected or not try using navigator.onLine in your js instead. Works for me on IOS 8 & Android 2.3 and doesn't require any plugins

提交回复
热议问题