InAppBrowser 在 iOS 10.2 (Xcode 8) 下无法正常打开

InAppBrowser does not open properly with iOS 10.2 (Xcode 8)

我已经使用 cordova-plugin-inappbrowser 插件很长时间了,当我在我的苹果测试设备上将软件更新到 10.2.1 时,插件无法正常工作。当我尝试打开 inappbrowser link 时,什么也没有发生,除非我单击主页按钮并 return 到该应用程序。这种情况发生在模拟器和真实设备上,如 ipad、iphone 5s、iphone 6 和 iphone 7。它在 android 设备上工作正常不是最新的 iOS。

这是我尝试过的所有内容的列表:

我似乎找不到其他任何东西可以尝试,因为我发现大多数有类似问题的帖子都没有得到解答。

下面是inappbrowser插件安装和使用的相关代码:

config.xml结构

<widget>
  <content src="index.html"/>
  <access origin="*"/>
  <allow-navigation href="*"/>
  <preference/> 
  ...
  <feature name="StatusBar">
  ...
  </feature>
  <platform name="ios">
  ... icons and splash ...
  </platform>
  <plugin name="cordova-plugin-inappbrowser" spec="~1.7.1"/>
</widget>

在控制器中使用插件

$scope.showLink = function(url){
  var options = {
   location: 'yes'
  }
  $cordovaInAppBrowser.open(url, '_blank', options)
  .then(function(event){
    // success
    console.log('inappbrowser', event);
  })
  .catch (function(event) {
   // error
   console.log('inappbrowser error', event);
  });
};

$scope.openUrl = function(url) {
  window.open(url, '_blank', 'location=no');
};

我正在使用 ionic v1.7.14,cordova:6.2.0 和 xcode 8

根据 CodeGems 的建议,在评论中,将 gap://ready 添加到您的 Content-Security-Policy 应该可以解决问题。