我创建了一个新的 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 而不是应用程序中打开我的网址。
为什么会发生这种情况?
谢谢 :)
我错过的是添加以下行:
<allow-navigation href="*" />
Run Code Online (Sandbox Code Playgroud)
在config.xml文件中,在标签 下<widget>。
| 归档时间: |
|
| 查看次数: |
1034 次 |
| 最近记录: |