Wondering what code in objective-c should I use to shake the iPhone continuously...
Find My iPhone Feature And if you already know its somewhere in your home itself, then all you need to do is tap on the dot on your iPhone. A box will then come up on your screen with three options—click on the 'play sound' option. This will enable your phone to ping loudly, even if its on vibrate or silent.
You may want to use the code from "How do you make the iPhone vibrate for arbitrary durations?":
extern void * _CTServerConnectionCreate( CFAllocatorRef, int (*)(void *, CFStringRef, CFDictionaryRef, void *), int *);
extern int _CTServerConnectionSetVibratorState(int *, void *, int, int, float, float, float);
// Initialize
connection = _CTServerConnectionCreate(kCFAllocatorDefault, &vibratecallback, &x);
// Start Vibration
_CTServerConnectionSetVibratorState(&x, connection, 3, intensity, 0, 0, 0);
// End Vibration
_CTServerConnectionSetVibratorState(&x, connection, 0, 0, 0, 0, 0);
I bet this will make it quite difficult for your application to get approved for AppStore! Check out the Unofficial App Store Rejection Criteria.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With