Open iPhone app from terminal

Can I open an iPhone app or Xcode project from the terminal? I've already tried:

open /path/to/project.app

But this returns a warning and exits unexpectedly due to an image load error when running the simulator. Anyone have any suggestions?

+1


source to share


3 answers


You cannot launch an iPhone app from the terminal. When you create an Xcode project, part of its action "installs" the application onto the iPhone simulator, just like in a real environment. For example, if you delete the Xcode project and all files and then run the simulator, you will still find your application. It is designed to emulate the real environment as much as possible. However, you can use xcodebuild

from terminal to create and update a project file and then run the simulator app yourself.

For a regular Mac OS X application, you can launch them from the terminal, but you must keep in mind that project.app is just a directory shell that the Crawler pretends to be a single file application for the user. Your actual executable is in /path/to/project.app/Contents/MacOS/project

. So, for example, if I have a project that generates the application Foo.app, I would launch it from the terminal itself:



$ /path/to/project/Foo.app/Contents/MacOS/Foo

+5


source


Kudos

      

You can launch the iPhone application from the terminal. Thanks idevice.



fooobar.com/questions/2516500 / ...

Check this link.

+1


source


You can use to control iOS simulators from command line (Terminal). For example, to install a file inside the simulator, use simctl

.app

xcrun simctl install booted <path_to_file.app>

      

Or run the application that was installed

xcrun simctl launch booted <app_bundle_identifier>

      

Please read more here

0


source







All Articles