A while ago, Stamped developer Andrew Bonventre did an ObjectiveSee interview. My favorite tidbit:
Create a key-binding for the “Simulate Memory Warning” menu action in the simulator, then simply hold down the key combination so that it’s continuously firing while you click around your app.
I found it non-obvious how to do this since the /Developer
directory has moved into the Xcode bundle. So here is how, for future reference:
- Open the directory containing the iOS Simulator app in Finder, e.g.:
$ open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications
- System menu → Recent Items1 → Move focus to iOS Simulator with arrow keys, then type
⌘ ↩
.
- Go to the Keyboard Shortcuts panel:
- Open Keyboard settings.
- Switch to Keyboard Shortcuts tab, select Application Shortcuts.
- Tap the small + button.
- Choose the iOS Simulator as the Application:
- Choose “Other…” from the Applications list. A file dialog appears.
- From the Finder window we opened in step 1, drag the iOS Simulator into the file dialog’s search box.
- Set
Simulate Memory Warning
as the Menu Title and assign a shortcut, e.g.^ ⌘ X
(better thanM
for right-handers, because you will want to keep it firing with your left hand while clicking through the app with your right hand).
There you are. Fire away!
-
You are an iOS developer, right? ↩