Reputation: 1791
Is it possible to shake the iphone when the home screen is displayed and make my app open?
for eg : triggering
(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
to open my app. Is it possible in ios5 using public sdk?
I am more interested in the technical aspects than the usability so please, if you think that's a horrible idea or you want to ask me what would I do such a thing, then I would say thanks but I understand that!
I dont want to hack into OS, use a jailbroken phone...but more curious to know can an app in itself have the complete logic to achieve the same?
EDIT
I accepted the answer "not possible" but then got another answer/comment from @skippy saying it might be possibel so I am going back to figuring it out mode. Will update accepted answer accordingly!
Upvotes: 2
Views: 2637
Reputation: 2020
I think it's possible, but complicated.
The first app run in background (read about required background modes).
This app must call the second app in case of shake.
It's strange behaviour, read about:
Launch an app from within another
Upvotes: 1
Reputation: 2052
Unfortunately no. You can handle shake-style events only when your application is already running.
Upvotes: 6
Reputation:
This is not possible. Even if it was its not a good idea, think about what would happen if two apps could do this...
Upvotes: 7