How do I run the Xcode project generated by Titanium?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 01:04:20

问题


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

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.

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


回答1:


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

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.

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.

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

  1. You cannot clean the Xcode project. You'll nuke all your app resources.
  2. You can only build for the same target as you built the Titanium app for in Appcelerator Studio. In other words, you will probably have issues building the Titanium app for iOS simulator, then try building it for device from Xcode. Don't do this.

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.



来源:https://stackoverflow.com/questions/35230242/how-do-i-run-the-xcode-project-generated-by-titanium

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!