[英]Ionic cordova network information plugin not working in ios
我已经安装了cordova-plugin-network-information键入:
cordova plugin add cordova-plugin-network-information
另外,我在index.html中添加了ng-cordova.min.js。 该插件在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),该应用甚至无法加载。 任何想法?
您应该尝试这些步骤。 也许您的插件未在项目的根目录中更新
cordova plugin remove cordova-plugin-network-information
cordova plugin add cordova-plugin-network-information
cordova build.
ionic run ios
也许这会帮助您:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.