How to build Xcode project from the command line?

前端 未结 1 600
迷失自我
迷失自我 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 .xcodeproj resides.

    After running:

    xcodebuild -list -project .xcodeproj/
    

    you see a list of Schemes.

    Copy the desired scheme name and run:

    xcodebuild -scheme  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 
    

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

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