Reputation: 251
I want to fire a method(Display alert) in my app when user is shaking the iphone.This should be work even if user is not using the app.How can I do it ?
Upvotes: 1
Views: 149
Reputation: 11444
If your app isn't running in the foreground you can't access the accelerometer. You can't do what you're planning to do with iOS, at least not unless you jailbreak.
Upvotes: 3