在标准的Ionic 2应用程序中,firebase onAuthStatChanged只需1分钟即可在Ios上执行 . 它在浏览器上的毫秒内工作,但当部署到ios时,它总是需要一分钟 .

const unsubscribe = firebase.auth().onAuthStateChanged((user) => {
        console.log("   onAuthStateChanged handler called after 1 minute..."); ...

我尝试使用angularfire2并得到了相同的结果 .

this.authState = auth$.getAuth();
    auth$.subscribe((state: FirebaseAuthState) => {
      console.log("authState received after 1 minute", state);

我尝试重建离子应用程序,访问原点设置是*,allow-navigation href是* .

Cordova CLI:6.5.0 Ionic Framework版本:3.0.1 Ionic CLI版本:2.2.3 Ionic App Lib版本:2.2.1 Ionic App脚本版本:1.3.0 ios-deploy版本:1.9.1 ios-sim版本:5.0 .11操作系统:macOS Sierra Node版本:v6.9.2 Xcode版本:Xcode 8.3.1构建版本8E1000a