【问题标题】:Developing for iOS with Phonegap - substitute index.html使用 Phonegap 为 iOS 开发 - 替代 index.html
【发布时间】:2013-10-24 19:13:45
【问题描述】:

早上,

我使用 Phonegap-2.9.0 和 Xcode5 创建了我的第一个 iOS 应用(以前我只使用 Eclipse 为 Android 完成过)

在 Android/Eclipse 中有一个 main_activity 类,它的函数类似于: super.loadUrl("file/android_assets/www/index.html");

在我正在构建的应用程序的 Android 版本中,我将 URL 替换为基于外部 Web 的 URL。这工作得很好,比使用 InAppBrowser 更干净(没有 InAppBrowser 菜单栏等)

如何使用 Xcode 做到这一点?

【问题讨论】:

    标签: cordova xcode5


    【解决方案1】:

    打开类/AppDelegate.m

    找到下面一行

    //self.viewController.startPage = @"index.html";

    将 index.html 替换为所需的 URL。

    取消注释。

    【讨论】:

      【解决方案2】:

      在 cordova 2.9.0 中,我们有一个配置文件。在此文件中,您将在此处看到内容标记,您可以在此处提及您的启动文件名。

      <content src="index.html" />
      

      【讨论】:

        猜你喜欢
        • 2014-05-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-10-28
        • 2012-01-27
        • 2011-05-30
        • 2012-10-17
        相关资源
        最近更新 更多