Posted: 1st Sep 2011 17:43
Was a vibration method left out for any reason? I typically use it when an object explodes or for special events in my apps, but I don't see a method mentioned in AGK. If I just missed it could someone point it out to me please.

the method I have used in my apps in the past is
+ Code Snippet
- (void)playVibration {
	AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);
}


It's a bit rudimentary, but it worked for my purposes. Since AppGameKit uses the OpenAL, AVfoundation, and audio toolbox frameworks, I can't see a reason this method isn't in there in some form.
Posted: 1st Sep 2011 18:29
We wanted to make the initial command set as cross platform as possible, and since not all platforms have vibration it was left out. But I can see us adding more specific commands in future, at some point.
Posted: 1st Sep 2011 18:48
Thanks for the fast reply Paul.

Rumor has it that iOS 5 has a new set of vibration features. I haven't messed with 5 yet, I'm not big on beta versions, but the new features look like they could be very useful.
http://http://forums.macrumors.com/showthread.php?t=1166825

That said, you are correct, and apple will reject you in a heartbeat if you try to use vibration on a non-supported device. I learned that one the hard way. Now I always check for which device is being used first.

+ Code Snippet
	NSString *deviceType = [[UIDevice currentDevice] model];
	
	BOOL canVibrate = NO;
		if ([deviceType isEqualToString:@"iPhone"]) {
			canVibrate = YES;
		}
		else if ([deviceType isEqualToString:@"iPhone 3G"]) {
			canVibrate = YES;
		}
		else if ([deviceType isEqualToString:@"iPhone 3G S"]) {
			canVibrate = YES;
		}
		else if ([deviceType isEqualToString:@"iPhone 4"]) {
			canVibrate = YES;
		}


The downside is that every time Apple releases a new supported device, I have to update all of my apps.
Posted: 5th Sep 2011 4:55
New devices are often backwards compatible so the back catalogue of apps they have continue to work. Not even Apple would have their 250,000 apps suddenly fail with iPhone 5

The closest we would do for AppGameKit is a vibrate command that would be ignored by non-vibration hardware. This way it would allow your app to run on everything, but only vibrating devices would give you a buzz. If you really want this feature, try adding it to our new feature issues board here:

http://code.google.com/p/agk/issues/list

Remember to mark it as a feature rather than a defect.