2016-09-30 2 views
0

IOS에서 작동하지 않는 플러그인이 :이온 코르도바 네트워크 정보 내가 코르도바 - 플러그인 - 네트워크 정보 입력을 설치 한

cordova plugin add cordova-plugin-network-information 

플러스 내 index.html을에 NG-cordova.min.js을 추가했다. 플러그인은 안드로이드에서 잘 작동합니다 :

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 (ionic emulate ios)에서는 앱이로드되지 않습니다. 어떤 생각?

+0

오류 추적을 게시 해 봅니다. 그렇지 않으면 ios 기기에 앱을 설치하고 콘솔 오류 추적을 위해 사파리를 검사 해주세요 – Gandhi

답변

0

다음 단계를 수행해야합니다. 아마도 플러그인 프로젝트

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

의 루트에 업데이트되지되어 어쩌면 이것은 당신을 도울 것입니다 :)

+0

요점은 플러그인이 android에서 작동한다는 것입니다. – ai20

+0

좋아, 안드로이드를 플랫폼으로 썼다. –

+0

예 Android에서 실행됩니다. – ai20

관련 문제