mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
f8ab8415d5
Summary: * Exposed as `VibrationIOS.vibrate();` * Included a UI Explorer example. * Vibration patterns are currently unsupported as there is no API to produce a vibration of less than 1 second on iOS. Closes https://github.com/facebook/react-native/pull/154 Github Author: Joe Stanton <joe.stanton@red-badger.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
16 lines
251 B
Objective-C
16 lines
251 B
Objective-C
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#import "RCTVibration.h"
|
|
|
|
#import <AudioToolbox/AudioToolbox.h>
|
|
|
|
@implementation RCTVibration
|
|
|
|
- (void)vibrate
|
|
{
|
|
RCT_EXPORT();
|
|
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
|
|
}
|
|
|
|
@end
|