Is there a way to simulate shake on iPhone? I am NOT talking about the simulator. I was wondering if I could simulate a shake on my actual iphone (by plugging it into computer and connected to xcode).

Is there a way to do this?
Open System Preferences
Go to General > Accessibility > Assistive Touch 
Turn assistive touch on
Then, an icon that looks like: 




Will pop up somewhere on you screen. Tap it. Then:


Tap device
Tap more
and finally tap shake


Hope that helps!