0

Im trying to reset the iOS-Simulator using AppleScript. When I just run a script to Reset Content and Settings it just resets the current version of the iOS-Simulator (e.g. 6.0). I need to reset each iOS version in the iOS Simulator to remove all the apps. I can only use Applescript and cant delete the apps from the Simulator using bash (deleting the app folders)

Thanks

Johan de Klerk
  • 2,515
  • 3
  • 25
  • 35
  • Or there is an alternative, delete all folders present inside Users/User/Library/Application Support/iPhone Simulator/6.1. Hope it helps you.. – P.J Mar 04 '13 at 08:49
  • I can only do it using AppleScipts because this will be runnning on our build server. cant delete it manually – Johan de Klerk Mar 04 '13 at 08:51
  • Can't you create AppleScript to make contents of particular folder empty? – P.J Mar 04 '13 at 08:53

2 Answers2

2

I present,

The Definitive iOS Simulator Reset Script (link)

enter image description here

Based on Oded Regev's code from this SO question (which was based on Jacob Rus's fine "menu_click" code)

Community
  • 1
  • 1
Stian Høiland
  • 3,625
  • 2
  • 27
  • 32
  • Is this meant for simulator only or it is applicable to devices also? Currently i am looking for an similar solution which will clear all installed applications and browser cache from iOS devices, any suggestion.Thanks – raaz Jul 03 '13 at 04:22
  • You should post a new question for that, raaz :) – Stian Høiland Jul 05 '13 at 13:19
0

Stian's script has not been updated for iOS 7 and the dialog isn't necessarily useful for build scripts. I've borrowed heavily from his code and written a version that is relatively future-proof to new devices and iOS versions.

https://github.com/michaelpatzer/ResetAllSimulators

M-P
  • 4,909
  • 3
  • 25
  • 31