Varun Chaudhary
Varun Chaudhary

Reputation: 357

Start a process in background by shaking the phone in iOS

I want to start a process in background when my iPhone is shaked. Lets say i have my iPhone which is on home screen. I shake it and a background process starts. How can I do this??

Thanks in advance :)

Upvotes: 0

Views: 244

Answers (1)

Rushi
Rushi

Reputation: 4500

@Varun you can't have background process. Unless you're app is active you can't do any process.

As you've asked when user is on the home screen. I'd like to tell you that when user is on the home screen. You don't have any control on your app. iOS doesn't allow any background process other then apple apps.

Other way of doing it is using the push notification or local notification. When user check them, you can open your app and do whatever you want to.

Upvotes: 2

Related Questions