如何运行由 Titanium 生成的 Xcode 项目? [英] How do I run the Xcode project generated by Titanium?

查看:28
本文介绍了如何运行由 Titanium 生成的 Xcode 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确信以前可以这样做,但我似乎无法在 Xcode 中运行由 Titanium 生成的 Xcode 项目.该应用程序安装在模拟器中并启动但立即停止并出现以下运行时错误:

I'm sure it used to be possible to do this but I don't seem to be able to run the Xcode project generated by Titanium in Xcode. The app installs in the simulator and starts but immediately stops with the following runtime error:

Could not find the file app.js

我使用 appc cli 5.1.0/ti CLI 5.0.5 运行 Xcode 7.2.1.该应用使用 5.1.2.GA 构建.

I'm running Xcode 7.2.1 with appc cli 5.1.0 / ti CLI 5.0.5. The app is built with 5.1.2.GA.

在 Xcode 中运行应用程序将提供对仪器的访问,并且可能更好地了解本机级别的崩溃等.

Running the app in Xcode would provided access to instruments and perhaps better insight in native level crashes etc.

推荐答案

官方不支持您尝试执行的操作,但有可能.

What you are trying to do isn't officially supported, but it is possible.

首先,从 Appcelerator Studio(或命令行)干净地构建您的 Titanium 应用程序.然后从 build/iphone 目录中打开 Xcode 项目.

First, do a clean build of your Titanium app from Appcelerator Studio (or the command line). Then open the Xcode project from the build/iphone directory.

接下来,打开 Xcode 的首选项并转到位置"选项卡.单击派生数据"字段下的高级"按钮.将构建位置设置为自定义"和相对于工作区".最后将Products"位置设置为build/Products,将Intermediates"位置设置为build/Intermediates.单击完成"并关闭首选项对话框.您只需执行此操作一次.

Next, open Xcode's preferences and go to the "Locations" tab. Click the "Advanced" button under the "Derived Data" field. Set the build location to "Custom" and "Relative to Workspace". Lastly set the "Products" location to build/Products and the "Intermediates" location to build/Intermediates. Click "Done" and close the preferences dialog. You only need to do this once.

您现在可以从 Xcode 构建您的应用程序,但有一些问题:

You can now build your app from Xcode, but there are a few gotchas:

  1. 您无法清理 Xcode 项目.您将耗尽所有应用资源.
  2. 您只能为与在 Appcelerator Studio 中构建 Titanium 应用程序相同的目标构建.换句话说,您可能会在为 iOS 模拟器构建 Titanium 应用程序时遇到问题,然后尝试从 Xcode 为设备构建它.不要这样做.

同样,目前不支持此功能.我正在努力极大地改善这种开发人员体验,但这需要一段时间.同时,希望以上内容有所帮助.

Again, this is currently not supported. I'm working on greatly improving this developer experience, but it's going to take a while. In the meantime, I hope the above helps.

这篇关于如何运行由 Titanium 生成的 Xcode 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆