[英]Ionic cordova network information plugin not working in ios
I have installed the cordova-plugin-network-information typing: 我已经安装了cordova-plugin-network-information键入:
cordova plugin add cordova-plugin-network-information
plus I added the ng-cordova.min.js in my index.html. 另外,我在index.html中添加了ng-cordova.min.js。 The plugin works fine in android using:
该插件在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();
});
}
but in ios (through ionic emulate ios) the app does not even load. 但在ios中(通过离子仿真ios),该应用甚至无法加载。 Any idea?
任何想法?
You should Try these steps . 您应该尝试这些步骤。 maybe your plugin isn't get updated in the root of project
也许您的插件未在项目的根目录中更新
cordova plugin remove cordova-plugin-network-information
cordova plugin add cordova-plugin-network-information
cordova build.
ionic run ios
maybe this will help you :) 也许这会帮助您:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.