Cleaning up the iPhone simulator

前端 未结 15 1475
情话喂你
情话喂你 2020-11-30 17:21

Is there a straightforward way to clean up the directory where xcode deploys an app when building for the iPhone simulator? I have a sqlite database that gets copied into t

15条回答
  •  忘掉有多难
    2020-11-30 18:15

    After iOS 5 on Mac OS X Lion, you can try:

    1. Create a script called RemoveSimulatorApps.command that contains:
      rm -rf "$HOME/Library/Application Support/iPhone Simulator/5.0/Applications/*"
      
    2. Save this script to a directory in your PATH.
    3. Make the file executable, such as:
      chmod +x RemoveSimulatorApps.command

    Assumptions

    • You may want to invoke this from a keyboard favorites buttons, such as on a Logitech or Microsoft keyboard with programmable keys (hence, saving it as a .command file instead of say, .sh)
    • You are okay with blowing away everything in the iOS simulator (ideal if you're just actively working on one app)
    • All the notes from others apply about being a good upgradable app etc. (I personally found this useful nonetheless b/c I have development mode switches that reload a database in a specific state I was trying to do some consistent robustness/error handling on)

提交回复
热议问题