react-native/Libraries
zxcpoiu 2cfe774a56 Ios: complete iOS vibration pattern supports (js)
Summary:
This is a revised follow up version from #8574 ( originally implemented in `objc` )
This PR change the implementation in JS suggested by javache

**motivation**

To supports vibration pattern like android.

The [iOS vibration implementation link](http://stackoverflow.com/questions/12966467/are-there-apis-for-custom-vibrations-in-ios/13047464#13047464) mentioned by skv-headless at https://github.com/facebook/react-native/pull/6061#discussion_r54062592, which will not be accepted by apple since that implementation uses a private API. Thus, I use pure public API `NSTimer` to implement it.

**Note**

Since vibration time on iOS is not configurable, there are slightly differences with android.
for example:

**Android Usage:**
`Vibration.vibrate([0, 500, 200, 500])`
==> V(0.5s) --wait(0.2s)--> V(0.5s)

`Vibration.vibrate([300, 500, 200, 500])`
==> --wait(0.3s)--> V(0.5s) --wait(0.2s)--> V(0.5s)

**iOS Usage:**
if first argument is 0, it will not be included in pattern array.
( vibration
Closes https://github.com/facebook/react-native/pull/9233

Differential Revision: D3775085

Pulled By: javache

fbshipit-source-id: 370495857d5581399de32d2bed1ea1bcce193e9d
2016-08-25 18:28:38 -07:00
..
ART Move font helpers to RCTFont 2016-08-05 12:44:20 -07:00
ActionSheetIOS Documentation typo 2016-08-24 02:58:32 -07:00
AdSupport
Animated Add AnimatedDiffClamp node 2016-08-23 14:13:52 -07:00
AppRegistry Auto-fix lint errors 2016-08-09 06:43:46 -07:00
AppState Auto-fix lint errors 2016-08-09 06:43:46 -07:00
BatchedBridge Update the native CLC for relay queries 2016-08-15 12:13:45 -07:00
BugReporting Unrevert D3518381 2016-07-06 12:58:41 -07:00
CameraRoll check for NSPhotoLibraryUsageDescription in plist 2016-08-18 07:28:43 -07:00
Components Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
CustomComponents Allow the disabling of navigation gestures. 2016-08-21 13:13:46 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Devtools Get server host in setupDevtools for Android 2016-07-19 05:58:29 -07:00
EventEmitter Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Experimental Incremental: Fix require of performanceNow 2016-08-25 17:43:48 -07:00
Fetch Fixed what fetch.js exports 2016-07-14 11:13:27 -07:00
Geolocation check for NSPhotoLibraryUsageDescription in plist 2016-08-18 07:28:43 -07:00
Image Rename RCTImageView source to imageSources 2016-08-23 11:28:42 -07:00
Inspector Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Interaction Incremental: Fix require of performanceNow 2016-08-25 17:43:48 -07:00
JavaScriptAppEngine Add todo about broken check 2016-08-25 08:58:33 -07:00
LayoutAnimation Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Fix warning on unused return values in RCTSRWebSocket 2016-08-16 07:28:28 -07:00
Modal Fix Popover problem for RTL 1/n 2016-07-19 10:43:29 -07:00
NativeAnimation Add support for value listener 2016-08-11 18:13:31 -07:00
NavigationExperimental NavigationExperimental: Add documentation for NavigationStateUtils. 2016-08-14 23:13:23 -07:00
Network Add some defensive cleanup of cancelBlock in RCTImageLoader 2016-08-19 10:46:09 -07:00
PermissionsAndroid Change Android Permission Module to use promises 2016-08-16 12:58:39 -07:00
PushNotificationIOS Fix misleading docstring on getInitialNotification 2016-08-03 12:28:41 -07:00
QuickPerformanceLogger AdsManager now uses new react native QPL identifiers 2016-07-20 07:28:36 -07:00
RCTTest Fix snapshottests under iOS10 2016-08-17 10:44:01 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS JS1: Fix Scrolling in YellowBox 2016-08-16 16:13:51 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage Auto-fix lint errors 2016-08-09 06:43:46 -07:00
StyleSheet Updated documentation for hairlineWidth 2016-08-25 08:00:24 -07:00
Text Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
Utilities Remove legacy bridge config conversion 2016-08-22 06:59:03 -07:00
Vibration Ios: complete iOS vibration pattern supports (js) 2016-08-25 18:28:38 -07:00
WebSocket Fix warning on unused return values in RCTSRWebSocket 2016-08-16 07:28:28 -07:00
react-native Create a RTLExample for OSS 2016-08-18 20:58:39 -07:00
vendor Cleanup clear/set/throwImmediate 2016-08-12 07:28:38 -07:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00