离子科尔多瓦网络信息插件不是IOS

问题描述:

我已经安装了科尔多瓦 - 插件网络信息打字工作:离子科尔多瓦网络信息插件不是IOS

cordova plugin add cordova-plugin-network-information 

加我加了NG-cordova.min.js在我的index.html。该插件使用工作在Android精品:

if(navigator.connection.type == "none"){ 
     $ionicLoading.hide() 
     $ionicPopup.alert({ 
      title: "Internet Disconnected", 
      content: "There is no internet connection. Please check the connection and try again." 
     }) 
     .then(function(result) { 
      ionic.Platform.exitApp(); 
     }); 
    } 

但在IOS(通过离子模拟IOS)的应用程序甚至不负载。任何想法?

+0

尝试张贴的错误跟踪。否则尝试在ios设备上安装应用程序,并在safari中检查任何控制台错误跟踪 – Gandhi

您应该尝试这些步骤。也许你的插件没有得到项目

cordova plugin remove cordova-plugin-network-information 
cordova plugin add cordova-plugin-network-information 
cordova build. 
ionic run ios 

的根更新也许这将帮助你:)

+0

问题的关键是该插件在android – ai20

+0

中的工作好吧,我写了Android作为平台我的不好..你试过吗? –

+0

是的,它在android上运行 – ai20