From 2d50d920fa07647a968a67ce93b1d14f945eba0f Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Tue, 24 Mar 2015 09:26:16 -0700 Subject: [PATCH] Updates from Tue 24 Mar - [ReactNative] Open Source PushNotifications and move Badge Number methods and permission into it | Tadeu Zagallo - [react-packager] Fix regression with transform errors | Amjad Masad - Flowify TextStylePropTypes and fix a bug with unsupported props | Marshall Roch - [ReactNative] Remove `arc build` instructions from require | Alex Kotliarskyi - Flowify Library/Utilities/ | Marshall Roch - [react-packager] Default to index.js from main if it's a dir | Amjad Masad --- Examples/UIExplorer/AppStateExample.js | 67 ----- .../UIExplorer/PushNotificationIOSExample.js | 152 +++++++++++ .../UIExplorer.xcodeproj/project.pbxproj | 30 ++ Examples/UIExplorer/UIExplorerList.js | 2 +- Libraries/AppState/AppState.js | 28 -- .../PushNotificationIOS.js | 44 ++- .../project.pbxproj | 256 ++++++++++++++++++ .../RCTPushNotificationManager.h | 9 +- .../RCTPushNotificationManager.m | 156 +++++++++++ Libraries/Text/TextStylePropTypes.js | 11 +- Libraries/Utilities/Dimensions.js | 5 +- Libraries/Utilities/MessageQueue.js | 34 ++- Libraries/Utilities/PixelRatio.js | 3 +- Libraries/Utilities/Platform.ios.js | 1 + Libraries/Utilities/RCTLog.js | 3 +- Libraries/Utilities/RCTRenderingPerf.js | 8 +- Libraries/Utilities/TimerMixin.js | 15 +- .../Utilities/createStrictShapeTypeChecker.js | 20 +- .../deepFreezeAndThrowOnMutationInDev.js | 5 +- Libraries/Utilities/differ/insetsDiffer.js | 13 +- Libraries/Utilities/differ/pointsDiffer.js | 8 +- Libraries/Utilities/groupByEveryN.js | 3 +- Libraries/Utilities/logError.js | 1 + Libraries/Utilities/mergeFast.js | 3 +- Libraries/Utilities/mergeIntoFast.js | 3 +- .../Utilities/nativeModulePrefixNormalizer.js | 5 +- Libraries/Utilities/truncate.js | 13 +- Libraries/Vibration/VibrationIOS.ios.js | 1 + Libraries/react-native/react-native.js | 2 +- ReactKit/Base/RCTConvert.h | 6 +- ReactKit/Modules/RCTAppState.m | 22 -- ReactKit/Modules/RCTPushNotificationManager.m | 71 ----- ReactKit/Views/RCTShadowView.h | 3 +- .../__tests__/DependencyGraph-test.js | 63 +++++ .../haste/DependencyGraph/index.js | 6 + .../haste/polyfills/require.js | 2 +- .../src/Server/__tests__/Server-test.js | 1 + packager/react-packager/src/Server/index.js | 7 +- 38 files changed, 837 insertions(+), 245 deletions(-) delete mode 100644 Examples/UIExplorer/AppStateExample.js create mode 100644 Examples/UIExplorer/PushNotificationIOSExample.js delete mode 100644 Libraries/AppState/AppState.js rename Libraries/{Utilities => PushNotificationIOS}/PushNotificationIOS.js (66%) create mode 100644 Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj/project.pbxproj rename {ReactKit/Modules => Libraries/PushNotificationIOS}/RCTPushNotificationManager.h (52%) create mode 100644 Libraries/PushNotificationIOS/RCTPushNotificationManager.m delete mode 100644 ReactKit/Modules/RCTPushNotificationManager.m diff --git a/Examples/UIExplorer/AppStateExample.js b/Examples/UIExplorer/AppStateExample.js deleted file mode 100644 index 04a58c5e80cfb4..00000000000000 --- a/Examples/UIExplorer/AppStateExample.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @flow - */ -'use strict'; - -var React = require('react-native'); -var { - AppState, - StyleSheet, - Text, - TouchableHighlight, - View, -} = React; - -var Button = React.createClass({ - render: function() { - return ( - - - {this.props.label} - - - ); - } -}); - -var styles = StyleSheet.create({ - button: { - padding: 10, - alignItems: 'center', - justifyContent: 'center', - }, - buttonLabel: { - color: 'blue', - }, -}); - -exports.title = 'AppState'; -exports.description = 'App background status and badge value'; -exports.examples = [ -{ - title: 'Set Badge Number', - render: function() { - return ( - -