From caf85d403a27fbd5484d6405de6c9d3bd94ce846 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Thu, 14 Feb 2019 05:33:50 -0800 Subject: [PATCH] Remove VibrationIOS Summary: This module has been deprecated for two years. There is `Vibration`, backed by the same native module, with cross platform support. Reviewed By: rickhanlonii Differential Revision: D14080979 fbshipit-source-id: 7bf60cfdca9517c6858b3c7f8a2b16eab0ce8e80 --- Libraries/Vibration/VibrationIOS.android.js | 25 ----------- Libraries/Vibration/VibrationIOS.ios.js | 44 ------------------- .../react-native-implementation.js | 3 -- 3 files changed, 72 deletions(-) delete mode 100644 Libraries/Vibration/VibrationIOS.android.js delete mode 100644 Libraries/Vibration/VibrationIOS.ios.js diff --git a/Libraries/Vibration/VibrationIOS.android.js b/Libraries/Vibration/VibrationIOS.android.js deleted file mode 100644 index f87869a6b3daa0..00000000000000 --- a/Libraries/Vibration/VibrationIOS.android.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * Stub of VibrationIOS for Android. - * - * @format - */ - -'use strict'; - -const warning = require('fbjs/lib/warning'); - -const VibrationIOS = { - vibrate: function() { - warning( - false, - 'VibrationIOS is deprecated, and will be removed. Use Vibration instead.', - ); - }, -}; - -module.exports = VibrationIOS; diff --git a/Libraries/Vibration/VibrationIOS.ios.js b/Libraries/Vibration/VibrationIOS.ios.js deleted file mode 100644 index 5e6a0f46d551e6..00000000000000 --- a/Libraries/Vibration/VibrationIOS.ios.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const RCTVibration = require('NativeModules').Vibration; - -const invariant = require('invariant'); -const warning = require('fbjs/lib/warning'); - -/** - * 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. - */ - -const VibrationIOS = { - /** - * @deprecated - */ - vibrate: function() { - warning( - false, - 'VibrationIOS is deprecated and will be removed. Please use Vibration instead.', - ); - invariant(arguments[0] === undefined, 'Vibration patterns not supported.'); - RCTVibration.vibrate(); - }, -}; - -module.exports = VibrationIOS; diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 0d7c955f076491..9bf402ffc460d1 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -330,9 +330,6 @@ module.exports = { get Vibration() { return require('Vibration'); }, - get VibrationIOS() { - return require('VibrationIOS'); - }, get YellowBox() { return require('YellowBox'); },