react-native/Libraries/AdSupport/AdSupportIOS.js
Karin Wefald b12677b797 Update AdSupportIOS.js
Summary:
Looks like RN unlinked the RCTAdSupport module from the React project because it triggers some automatic detection from Apple. (from this thread facebook/react-native#1303). So this includes the instructions to manually add RCTAdSupport files from node_modules.

See: https://github.com/facebook/react-native/issues/12623
Closes https://github.com/facebook/react-native/pull/12657

Differential Revision: D4962321

Pulled By: hramos

fbshipit-source-id: ed9aed3b4c16e72d1f9557f5c16fcdadfdd743ea
2017-04-28 06:34:21 -07:00

39 lines
1.3 KiB
JavaScript

/**
* 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.
*
* @providesModule AdSupportIOS
* @flow
*/
'use strict';
var AdSupport = require('NativeModules').AdSupport;
/**
* `AdSupport` provides access to the "advertising identifier". If you link this library
* in your project, you may need to justify your use for this identifier when submitting
* your application to the App Store.
*
* In order to use `AdSupport` in your project, you must link the `RCTAdSupport` library.
* In Xcode, you can manually add the `RCTAdSupport.m` and `RCTAdSupport.h` files from
* `node_modules/react-native/Libraries/AdSupport/` to the `Libraries/React/Base/` folder
* of your current project.
*
* You can refer to [Linking](docs/linking-libraries-ios.html) for help.
*
*/
module.exports = {
getAdvertisingId: function(onSuccess: Function, onFailure: Function) {
AdSupport.getAdvertisingId(onSuccess, onFailure);
},
getAdvertisingTrackingEnabled: function(onSuccess: Function, onFailure: Function) {
AdSupport.getAdvertisingTrackingEnabled(onSuccess, onFailure);
},
};