How to get the output of an OS X application on the console, or to a file?

前端 未结 4 1523
离开以前
离开以前 2020-12-04 14:44

I am writing a Cocoa application with Mono embedded. I want to run and see my debug output in Terminal. On the Cocoa side I am using NSLog(), and on the Mono s

4条回答
  •  离开以前
    2020-12-04 15:10

    Overview

    The idea is to simply run the app from command line using ios-deploy.

    Instructions

    1. Install ios-deploy
    2. Run the app from xcode (make sure it runs successfully)
    3. go to xcode menu > preferences > locations and click on arrow in derived data: enter image description here
    4. in the derived data directory, search for your .app file under Build/intermediates/Products
    5. in the terminal type the following ios-deploy --debug --bundle then drag the .app file from step 4 unto the terminal.. you should have something like this ios-deploy --debug --bundle path/to/your/applicationName.app and that's it! The app should successfully run and all the logs will go to your terminal.

提交回复
热议问题