Cordova 在 Safari 中而不是在应用程序中打开 startPage

Rot*_*kov 1 ios cordova

我创建了一个新的 Cordova 项目并将我的 URL 放入 AppDelegate.m 中:

// Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
// If necessary, uncomment the line below to override it.
self.viewController.startPage = @"http://mySite/";
Run Code Online (Sandbox Code Playgroud)

当我在模拟器中启动应用程序时,它会启动,然后在 safari 而不是应用程序中打开我的网址。

为什么会发生这种情况?

谢谢 :)

Rot*_*kov 5

我错过的是添加以下行:

<allow-navigation href="*" />
Run Code Online (Sandbox Code Playgroud)

config.xml文件中,在标签 下<widget>