NOTE: VibrationIOS is being deprecated. Use Vibration instead.

The Vibration API is exposed at VibrationIOS.vibrate(). On iOS, calling this function will trigger a one second vibration. The vibration is asynchronous so this method will return immediately.

There will be no effect on devices that do not support Vibration, eg. the iOS simulator.

Vibration patterns are currently unsupported.

Methods

static vibrate()

@deprecated

Examples

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
'use strict';
 
var React = require('react');
var ReactNative = require('react-native');
var {
  StyleSheet,
  View,
  Text,
  TouchableHighlight,
  VibrationIOS
} = ReactNative;
 
exports.framework = 'React';
exports.title = 'VibrationIOS';
exports.description = 'Vibration API for iOS';
exports.examples = [{
  title: 'VibrationIOS.vibrate()',
  render() {
    return (
      <TouchableHighlight
        style={styles.wrapper}
        onPress={() => VibrationIOS.vibrate()}>
        <View style={styles.button}>
          <Text>Vibrate</Text>
        </View>
      </TouchableHighlight>
    );
  },
}];
 
var styles = StyleSheet.create({
  wrapper: {
    borderRadius: 5,
    marginBottom: 5,
  },
  button: {
    backgroundColor: '#eeeeee',
    padding: 10,
  },
});
PushNotificationIOS.cancelAllLocalNotifications()
  • References/JavaScript/React Native/APIs

static cancelAllLocalNotifications() Cancels all scheduled localNotifications

2025-01-10 15:47:30
Animated.event()
  • References/JavaScript/React Native/APIs

static event(argMapping, config?) Takes an array of mappings and extracts

2025-01-10 15:47:30
Animated.sequence()
  • References/JavaScript/React Native/APIs

static sequence(animations) Starts an array of animations in order, waiting

2025-01-10 15:47:30
PushNotificationIOS.presentLocalNotification()
  • References/JavaScript/React Native/APIs

static presentLocalNotification(details) Schedules the localNotification

2025-01-10 15:47:30
AppRegistry.getAppKeys()
  • References/JavaScript/React Native/APIs

static getAppKeys()

2025-01-10 15:47:30
AsyncStorage.mergeItem()
  • References/JavaScript/React Native/APIs

static mergeItem(key, value, callback?) Merges existing value with input

2025-01-10 15:47:30
VibrationIOS.vibrate()
  • References/JavaScript/React Native/APIs

static vibrate() @deprecated

2025-01-10 15:47:30
AppRegistry.registerRunnable()
  • References/JavaScript/React Native/APIs

static registerRunnable(appKey, func)

2025-01-10 15:47:30
Clipboard.getString()
  • References/JavaScript/React Native/APIs

static getString() Get content of string type, this method returns a Promise

2025-01-10 15:47:30
ToastAndroid.show()
  • References/JavaScript/React Native/APIs

static show(message, duration)

2025-01-10 15:47:30