How to build Xcode project from the command line?

前端 未结 1 599
迷失自我
迷失自我 2021-02-05 12:42

I\'ve tried reading the Xcode Tools documentation Apple provides, so that I can use the Terminal to build a .app file and run the resulting app on the Simulator. Es

相关标签:
1条回答
  • 2021-02-05 13:40

    After having a working configuration in Xcode, open a shell and navigate to the directory, where your <NAME>.xcodeproj resides.

    After running:

    xcodebuild -list -project <NAME>.xcodeproj/
    

    you see a list of Schemes.

    Copy the desired scheme name and run:

    xcodebuild -scheme <SCHEME NAME> build
    

    You can install ios-deploy i.e. via:

    npm install -g ios-deploy
    

    Copy the app path from the end of the xcodebuild output and run:

    ios-deploy --debug --bundle <APP PATH>
    

    Now the app should be launched on i.e. a connected device.

    0 讨论(0)
提交回复
热议问题