harshiYL
harshiYL

Reputation: 251

How to display an alert when user shake the iPhone?(This should be work even user is not using the app)

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

Answers (1)

Richard Brown
Richard Brown

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

Related Questions