1. First run our app on the simulator
2. Execute the following command:
Ditto-ck--sequesterrsrc--keepparent ' ls-1 -d-t ~/library/developer/xcode/deriveddata/*/ Build/products/*-iphonesimulator/*.app | Head-n 1 '/users/czc/desktop/app.zip
(1) The Last Path (/users/ydz/desktop/app.zip) of the above command is the file compression package output path
(2) Again, the question of the * in the order. When we open our local ~/library/developer/xcode/deriveddata/, this path will find that it is loaded with apps running on our local simulator. The front is the bundle Identifier of the app, followed by a bunch of strings. The path in the ditto with * is to dynamically match an address, and this is also a wildcard character. The following head explains the matching rules. The head is actually the path to the most recent app we ran the emulator on.
3, decompression app.zip out, will get an app file, this is the debug package
4, Os-sim is a tool that can control iOS simulator in command. With this command, we can launch an emulator, install the app, launch the app, and query the iOS SDK. It allows us to do the same as automated testing without having to open Xcode. Install Ios-sim:
NPM Install Ios-sim-g
5. Execute the following command
Ios-sim Launch/users/czc/desktop/app.app--devicetypeid iphone-6s
Among them,/users/czc/desktop/app.app this is the path after the designer receives the app. The--devicetypeid parameter is followed by the version of the given emulator.
Only need to send the above command to the designer, no brain paste to the command line, install the app simulator will automatically start, open the app.
IOS simulator "Install" app