xcodebuild install path?

女生的网名这么多〃 提交于 2019-12-21 02:48:10

问题


I am developing an iphone app using xcode. I would like to automate the "build and run" process, and so want to know if there is any way to install the built app on simulator or device.

There is xcodebuild install command but i don't know how to set the installation directory DSTROOT to simulator/device. Please help me there.

I have looked through many forums where people suggest just to use xcode GUI to do the stuff, and I do that too, but I would really like to know the command-line way.

Thanks


回答1:


All you need to do is copy the built .app from wherever XCode puts it to ~/Library/Application Support/iPhone Simulator/User/Applications/[somefolder]/, with a file named [somefolder].sb (alongside the folder, not in it) containing the following:

(version 1)
(debug deny)
(allow default)

Then launch /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator. And select your App. Without Jailbreaking it's NOT possible to install it from outside the GUI.




回答2:


The install build action for Xcode will only copy the built product to the install path specified in the xcode project.

This is used for frameworks and libraries that need installing after being built so that other apps can link against them from a common location.

I don't think you'll be able to use this build action to automate the Build and Run process - that is going to have to be done manually by each developer. There is no way to push apps onto a device without using Xcode, iTunes or the iPhone Configuration utility. As for the Simulator, it's as woodleader says. But for the device, without jailbreaking and writing your own code, you can't do this.

What you can do is use xcodebuild to generate daily/nightly builds for continuous integration. You can write a script that checks out the source form version control, runs xcodebuild and puts the built product in an easy to reach location. The installtion onto devices will still need to be done manually however.



来源:https://stackoverflow.com/questions/4861102/xcodebuild-install-path

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