Terminal: Install the. App method on the Xcode emulator

Source: Internet
Author: User

Sometimes, we might need to install the package (Xxx.app) of someone else's Xcode after running it on your emulator, as I'll show you how to install it through a terminal.

Realize

Get your own Xcode-generated Xxx.app

Steps 1: Print bundle paths in the project Didfinishlaunchingwithoptions: Method:

NSLog (@ "%@", [[Nsbundlemainbundle] pathforauxiliaryexecutable:@ ""]);

Steps 2: Copy the printed bundle path, and then click Go To Folder on the toolbar above the selection screen, select Go to:

Steps 3: Paste the copied path in the Go to Folder path and click Enter:

Install other Xcode-generated Xxx.app

Steps 1: Open terminal

Steps 2: In Terminal input xcrun simctl install booted Xxx.app path, click Enter. Note that the Xxx.app path is the path to the app you need to install into the emulator, and get the method to drag it directly into the terminal. Here is a tip, you can copy the Xcrun simctl install booted paste to the terminal, and then drag the Xxx.app into the terminal, between the two are separated by a space.

Tips

If the command line Tool is not installed, the system will automatically prompt for installation and click Install.

Exception issues

1, xcrun simctl install Booted/path/xxx.app

2, xcrun:error:unable to find Utility "Simctl", not a developer tool or in PATH '

Xcrun Simctl Install Booted/path/xxx.app

3, xcrun:error:active Developer Path ("/volumes/xcode/xcode.app/contents/developer") does not exist, usexcode-select– Switch Path/to/xcode.app to specify the Xcode, wish to, command line developer tools (or Seeman Xcode-selec T

No devices is booted '

These issues will cause the installation to be unsuccessful if the following actions are not performed on the installation.

Solution Solutions

Steps 1: Gets the Xcode path. Get the Xcode path by simply finding Xcode in the application and then dragging it into the terminal to get to the Xcode path.

Steps 2: Continue to enter the sudo xcode-select-switch xcode path/contents/developer in the terminal.

Tips

For example, my Xcode path is:/applications/xcode.app. Then I'll enter it in the terminal: sudo xcode-select-switch/applications/xcode.app/contents/developer

Terminal: Install the. App method on the Xcode emulator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.