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