From 3a5c5679d6b96081f668c6f665bea24c91799ed4 Mon Sep 17 00:00:00 2001 From: cclv Date: Sat, 4 Apr 2015 20:32:49 +0800 Subject: [PATCH 1/3] Update AdSupportIOS.js better var { AdSupportIOS, } = React; --- Libraries/AdSupport/AdSupportIOS.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/AdSupport/AdSupportIOS.js b/Libraries/AdSupport/AdSupportIOS.js index d9d315a1dfcc..e1ce46375e32 100644 --- a/Libraries/AdSupport/AdSupportIOS.js +++ b/Libraries/AdSupport/AdSupportIOS.js @@ -13,7 +13,7 @@ var AdSupport = require('NativeModules').AdSupport; -module.exports = { +var AdSupportIOS = { getAdvertisingId: function(onSuccess: Function, onFailure: Function) { AdSupport.getAdvertisingId(onSuccess, onFailure); }, @@ -22,3 +22,5 @@ module.exports = { AdSupport.getAdvertisingTrackingEnabled(onSuccess, onFailure); }, }; + +module.exports = AdSupportIOS; From 8edd262c3c9fa825c77849a6109103f659133d02 Mon Sep 17 00:00:00 2001 From: cclv Date: Sat, 4 Apr 2015 20:36:05 +0800 Subject: [PATCH 2/3] Update AdSupportIOSExample.js --- Examples/UIExplorer/AdSupportIOSExample.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Examples/UIExplorer/AdSupportIOSExample.js b/Examples/UIExplorer/AdSupportIOSExample.js index ef7f076bfa80..c33aee7d433b 100644 --- a/Examples/UIExplorer/AdSupportIOSExample.js +++ b/Examples/UIExplorer/AdSupportIOSExample.js @@ -15,13 +15,12 @@ */ 'use strict'; -var AdSupportIOS = require('AdSupportIOS'); - var React = require('react-native'); var { StyleSheet, Text, View, + AdSupportIOS, } = React; exports.framework = 'React'; From be12a3ddb9718e995e2bd11e8d95b81dc5780bcf Mon Sep 17 00:00:00 2001 From: cclv Date: Sat, 4 Apr 2015 21:55:06 +0800 Subject: [PATCH 3/3] Update react-native.js --- Libraries/react-native/react-native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/react-native/react-native.js b/Libraries/react-native/react-native.js index 46148bd86d27..d20a624410c3 100644 --- a/Libraries/react-native/react-native.js +++ b/Libraries/react-native/react-native.js @@ -40,6 +40,7 @@ var ReactNative = Object.assign(Object.create(require('React')), { WebView: require('WebView'), // APIs + AdSupportIOS: require('AdSupportIOS'), AlertIOS: require('AlertIOS'), Animation: require('Animation'), AppRegistry: require('AppRegistry'),