react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h
Andrew Imm 89a1e94a15 Add an event for remote notification registration, and improve permissions request
Summary:
In order to add Push support to the Parse JS SDK in React Native, we need a way to receive the APNS device token from the JS context. This adds another event to PushNotificationIOS, so that code can respond to a successful registration.

Additionally, I've updated the `requestPermissions` call to accept an optional map of parameters. This way, developers can request a subset of user notification types.
Closes https://github.com/facebook/react-native/pull/1304
Github Author: Andrew Imm <andrewi@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-03 14:06:44 -08:00

21 lines
804 B
Objective-C

/**
* 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.
*/
#import <UIKit/UIKit.h>
#import "RCTBridgeModule.h"
@interface RCTPushNotificationManager : NSObject <RCTBridgeModule>
+ (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;
+ (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
+ (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification;
@end