简体   繁体   中英

How can I deploy an app to my iPhone from the command line?

I can already build an app with a distribution profile via the command line

xcodebuild -configuration Distribution -sdk iphoneos3.0 clean build 

However, I'd like to go one step further and install the app to the connected iPhone and execute it ( as if I'd pressed Build and Run in XCode ).

The final command listed in the build commands window ( cmd+shift+B ) is CodeSign, which as far as I know just signs the code and nothing else. So I'm not sure what command ( if any is available ) I can run from the command line to install and run the app on the iPhone.

I'm running the official SDK, not a jailbroken phone.

If you have a post build script you should be able to install it and run it using a script. If you're jailbroken you should be able to use SCP and then execute it directly.

There may be an AppleScript or automator way of solving the problem as well.

I've written a blog entry on how to install apps on a connected iPad / iPhone without using Xcode or iTunes. This method does NOT require JailBreak - any iOS device will work. Only works on the Mac though.

This method allows you to run a Terminal command to install an iPA file.

http://pervasivecode.blogspot.co.uk/2012/06/install-ios-app-ipa-file-without-xcode.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM