Commit 0b9170e5 authored by Lidan Hifi's avatar Lidan Hifi

rename package

parent 1ee9741b
......@@ -2,7 +2,7 @@
#import "RCTBridgeModule.h"
@interface SmartNotifications : NSObject <RCTBridgeModule>
@interface RNNotifications : NSObject <RCTBridgeModule>
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification;
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification;
......
......@@ -2,18 +2,18 @@
#import <UIKit/UIKit.h>
#import "RCTBridge.h"
#import "RCTEventDispatcher.h"
#import "SmartNotifications.h"
#import "RNNotifications.h"
#import "RCTUtils.h"
NSString *const SmartNotificationCreateAction = @"CREATE";
NSString *const SmartNotificationClearAction = @"CLEAR";
NSString *const RNNotificationCreateAction = @"CREATE";
NSString *const RNNotificationClearAction = @"CLEAR";
NSString *const SmartNotificationReceivedForeground = @"SmartNotificationReceivedForeground";
NSString *const SmartNotificationReceivedBackground = @"SmartNotificationReceivedBackground";
NSString *const SmartNotificationOpened = @"SmartNotificationOpened";
NSString *const RNNotificationReceivedForeground = @"RNNotificationReceivedForeground";
NSString *const RNNotificationReceivedBackground = @"RNNotificationReceivedBackground";
NSString *const RNNotificationOpened = @"RNNotificationOpened";
@implementation SmartNotifications
@implementation RNNotifications
RCT_EXPORT_MODULE()
......@@ -29,20 +29,20 @@ static NSString* username;
- (void)setBridge:(RCTBridge *)bridge
{
_bridge = bridge;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleNotificationReceivedForeground:)
name:SmartNotificationReceivedForeground
name:RNNotificationReceivedForeground
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleNotificationReceivedBackground:)
name:SmartNotificationReceivedBackground
name:RNNotificationReceivedBackground
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleNotificationOpened:)
name:SmartNotificationOpened
name:RNNotificationOpened
object:nil];
}
......@@ -52,7 +52,7 @@ static NSString* username;
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification
{
UIApplicationState state = [UIApplication sharedApplication].applicationState;
if (state == UIApplicationStateActive) {
[self didReceiveNotificationOnForegroundState:notification];
} else if (state == UIApplicationStateInactive) {
......@@ -65,7 +65,7 @@ static NSString* username;
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification
{
UIApplicationState state = [UIApplication sharedApplication].applicationState;
if (state == UIApplicationStateInactive) {
NSString* notificationId = [notification.userInfo objectForKey:@"notificationId"];
if (notificationId) {
......@@ -80,7 +80,7 @@ static NSString* username;
*/
+ (void)didReceiveNotificationOnForegroundState:(NSDictionary *)notification
{
[[NSNotificationCenter defaultCenter] postNotificationName:SmartNotificationReceivedForeground
[[NSNotificationCenter defaultCenter] postNotificationName:RNNotificationReceivedForeground
object:self
userInfo:notification];
}
......@@ -94,24 +94,24 @@ static NSString* username;
if (action) {
// create or delete notification
if ([action isEqualToString: SmartNotificationCreateAction]
if ([action isEqualToString: RNNotificationCreateAction]
&& notificationId
&& alert) {
[self dispatchLocalNotificationFromNotification:notification];
} else if ([action isEqualToString: SmartNotificationClearAction] && notificationId) {
} else if ([action isEqualToString: RNNotificationClearAction] && notificationId) {
[self clearNotificationFromNotificationsCenter:notificationId];
}
}
[[NSNotificationCenter defaultCenter] postNotificationName:SmartNotificationReceivedBackground
[[NSNotificationCenter defaultCenter] postNotificationName:RNNotificationReceivedBackground
object:self
userInfo:notification];
}
+ (void)didNotificationOpen:(NSDictionary *)notification
{
[[NSNotificationCenter defaultCenter] postNotificationName:SmartNotificationOpened
[[NSNotificationCenter defaultCenter] postNotificationName:RNNotificationOpened
object:self
userInfo:notification];
}
......@@ -126,27 +126,27 @@ static NSString* username;
NSDictionary* alert = [customData objectForKey:@"alert"];
NSString* action = [customData objectForKey:@"action"];
NSString* notificationId = [customData objectForKey:@"notificationId"];
if ([action isEqualToString: SmartNotificationCreateAction]
if ([action isEqualToString: RNNotificationCreateAction]
&& notificationId
&& alert) {
// trigger new client push notification
UILocalNotification* note = [[UILocalNotification alloc] init];
note.alertTitle = [alert objectForKey:@"title"];
note.alertBody = [alert objectForKey:@"body"];
note.userInfo = customData;
note.soundName = [customData objectForKey:@"sound"];
NSLog(@"Presenting local notification...");
[[UIApplication sharedApplication] presentLocalNotificationNow:note];
// Serialize it and store so we can delete it later
NSData* data = [NSKeyedArchiver archivedDataWithRootObject:note];
NSString* notificationKey = [self buildNotificationKeyfromNotification:notificationId];
[[NSUserDefaults standardUserDefaults] setObject:data forKey:notificationKey];
[[NSUserDefaults standardUserDefaults] synchronize];
NSLog(@"Local notification was triggered: %@", notificationKey);
}
}
......@@ -158,11 +158,11 @@ static NSString* username;
if (data) {
UILocalNotification* notification = [NSKeyedUnarchiver unarchiveObjectWithData: data];
NSLog(@"Remove local notification: %@", notificationKey);
// delete the notification
[[UIApplication sharedApplication] cancelLocalNotification:notification];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:notificationKey];
return;
}
}
......@@ -193,12 +193,12 @@ static NSString* username;
RCT_EXPORT_METHOD(dispatchLocalNotificationFromNotification:(NSDictionary *)notification)
{
[SmartNotifications dispatchLocalNotificationFromNotification:notification];
[RNNotifications dispatchLocalNotificationFromNotification:notification];
}
RCT_EXPORT_METHOD(clearNotificationFromNotificationsCenter:(NSString *)notificationId)
{
[SmartNotifications clearNotificationFromNotificationsCenter:notificationId];
[RNNotifications clearNotificationFromNotificationsCenter:notificationId];
}
@end
......@@ -7,7 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
13BE3DEE1AC21097009241FE /* SmartNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BE3DED1AC21097009241FE /* SmartNotifications.m */; };
D8A2F7551CB57F1A002CC8F5 /* RNNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = D8A2F7541CB57F1A002CC8F5 /* RNNotifications.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
......@@ -23,9 +23,9 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
134814201AA4EA6300B7C361 /* libSmartNotifications.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSmartNotifications.a; sourceTree = BUILT_PRODUCTS_DIR; };
13BE3DEC1AC21097009241FE /* SmartNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartNotifications.h; sourceTree = "<group>"; };
13BE3DED1AC21097009241FE /* SmartNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SmartNotifications.m; sourceTree = "<group>"; };
134814201AA4EA6300B7C361 /* libRNNotifications.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNotifications.a; sourceTree = BUILT_PRODUCTS_DIR; };
D8A2F7541CB57F1A002CC8F5 /* RNNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNotifications.m; sourceTree = "<group>"; };
D8A2F7561CB57F28002CC8F5 /* RNNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNotifications.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -42,7 +42,7 @@
134814211AA4EA7D00B7C361 /* Products */ = {
isa = PBXGroup;
children = (
134814201AA4EA6300B7C361 /* libSmartNotifications.a */,
134814201AA4EA6300B7C361 /* libRNNotifications.a */,
);
name = Products;
sourceTree = "<group>";
......@@ -50,8 +50,8 @@
58B511D21A9E6C8500147676 = {
isa = PBXGroup;
children = (
13BE3DEC1AC21097009241FE /* SmartNotifications.h */,
13BE3DED1AC21097009241FE /* SmartNotifications.m */,
D8A2F7561CB57F28002CC8F5 /* RNNotifications.h */,
D8A2F7541CB57F1A002CC8F5 /* RNNotifications.m */,
134814211AA4EA7D00B7C361 /* Products */,
);
sourceTree = "<group>";
......@@ -59,9 +59,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
58B511DA1A9E6C8500147676 /* SmartNotifications */ = {
58B511DA1A9E6C8500147676 /* RNNotifications */ = {
isa = PBXNativeTarget;
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "SmartNotifications" */;
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNNotifications" */;
buildPhases = (
58B511D71A9E6C8500147676 /* Sources */,
58B511D81A9E6C8500147676 /* Frameworks */,
......@@ -71,9 +71,9 @@
);
dependencies = (
);
name = SmartNotifications;
name = RNNotifications;
productName = RCTDataManager;
productReference = 134814201AA4EA6300B7C361 /* libSmartNotifications.a */;
productReference = 134814201AA4EA6300B7C361 /* libRNNotifications.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
......@@ -90,7 +90,7 @@
};
};
};
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "SmartNotifications" */;
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNNotifications" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
......@@ -102,7 +102,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
58B511DA1A9E6C8500147676 /* SmartNotifications */,
58B511DA1A9E6C8500147676 /* RNNotifications */,
);
};
/* End PBXProject section */
......@@ -112,7 +112,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13BE3DEE1AC21097009241FE /* SmartNotifications.m in Sources */,
D8A2F7551CB57F1A002CC8F5 /* RNNotifications.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -204,7 +204,7 @@
);
LIBRARY_SEARCH_PATHS = "";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = SmartNotifications;
PRODUCT_NAME = RNNotifications;
SKIP_INSTALL = YES;
};
name = Debug;
......@@ -220,7 +220,7 @@
);
LIBRARY_SEARCH_PATHS = "";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = SmartNotifications;
PRODUCT_NAME = RNNotifications;
SKIP_INSTALL = YES;
};
name = Release;
......@@ -228,7 +228,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "SmartNotifications" */ = {
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNNotifications" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58B511ED1A9E6C8500147676 /* Debug */,
......@@ -237,7 +237,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "SmartNotifications" */ = {
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNNotifications" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58B511F01A9E6C8500147676 /* Debug */,
......
......@@ -81,7 +81,7 @@ android {
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.smartnotificationsapp"
applicationId "com.notifications-example-app"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
......
......@@ -15,7 +15,7 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "SmartNotificationsApp";
return "NotificationsExampleApp";
}
/**
......
<resources>
<string name="app_name">SmartNotificationsApp</string>
<string name="app_name">NotificationsExampleApp</string>
</resources>
rootProject.name = 'SmartNotificationsApp'
rootProject.name = 'NotificationsExampleApp'
include ':app'
......@@ -11,12 +11,12 @@ import React, {
View
} from 'react-native';
class SmartNotificationsApp extends Component {
class NotificationsExampleApp extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
Welcome to React Native Notifications Demo App!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
......@@ -48,4 +48,4 @@ const styles = StyleSheet.create({
},
});
AppRegistry.registerComponent('SmartNotificationsApp', () => SmartNotificationsApp);
AppRegistry.registerComponent('NotificationsExampleApp', () => NotificationsExampleApp);
......@@ -12,17 +12,17 @@ import React, {
PushNotificationIOS
} from 'react-native';
import SmartNotificationsIOS from 'react-native-smart-notifications';
import NotificationsIOS from 'react-native-notifications';
class SmartNotificationsApp extends Component {
class NotificationsExampleApp extends Component {
constructor() {
super();
PushNotificationIOS.addEventListener('register', this.onPushRegistered.bind(this));
// PushNotificationIOS.addEventListener('notification', this.onPushNotification.bind(this));
SmartNotificationsIOS.addEventListener('notificationReceivedForeground', this.onNotificationReceivedForeground.bind(this));
SmartNotificationsIOS.addEventListener('notificationReceivedBackground', this.onNotificationReceivedBackground.bind(this));
SmartNotificationsIOS.addEventListener('notificationOpened', this.onNotificationOpened.bind(this));
NotificationsIOS.addEventListener('notificationReceivedForeground', this.onNotificationReceivedForeground.bind(this));
NotificationsIOS.addEventListener('notificationReceivedBackground', this.onNotificationReceivedBackground.bind(this));
NotificationsIOS.addEventListener('notificationOpened', this.onNotificationOpened.bind(this));
}
onPushRegistered(deviceToken) {
......@@ -51,7 +51,7 @@ class SmartNotificationsApp extends Component {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to Smart Notifications Demo App!
Welcome to React Native Notifications Demo App!
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
......@@ -65,9 +65,9 @@ class SmartNotificationsApp extends Component {
}
componentWillUnmount() {
SmartNotificationsIOS.removeEventListener('notificationReceivedForeground', this.onNotificationReceivedForeground.bind(this));
SmartNotificationsIOS.removeEventListener('notificationReceivedBackground', this.onNotificationReceivedBackground.bind(this));
SmartNotificationsIOS.removeEventListener('notificationOpened', this.onNotificationOpened.bind(this));
NotificationsIOS.removeEventListener('notificationReceivedForeground', this.onNotificationReceivedForeground.bind(this));
NotificationsIOS.removeEventListener('notificationReceivedBackground', this.onNotificationReceivedBackground.bind(this));
NotificationsIOS.removeEventListener('notificationOpened', this.onNotificationOpened.bind(this));
}
_onNotification(notification) {
......@@ -101,4 +101,4 @@ const styles = StyleSheet.create({
},
});
AppRegistry.registerComponent('SmartNotificationsApp', () => SmartNotificationsApp);
AppRegistry.registerComponent('NotificationsExampleApp', () => NotificationsExampleApp);
......@@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "SmartNotificationsApp.app"
BlueprintName = "SmartNotificationsApp"
ReferencedContainer = "container:SmartNotificationsApp.xcodeproj">
BuildableName = "NotificationsExampleApp.app"
BlueprintName = "NotificationsExampleApp"
ReferencedContainer = "container:NotificationsExampleApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
......@@ -29,9 +29,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "SmartNotificationsAppTests.xctest"
BlueprintName = "SmartNotificationsAppTests"
ReferencedContainer = "container:SmartNotificationsApp.xcodeproj">
BuildableName = "NotificationsExampleAppTests.xctest"
BlueprintName = "NotificationsExampleAppTests"
ReferencedContainer = "container:NotificationsExampleApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
......@@ -47,9 +47,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "SmartNotificationsAppTests.xctest"
BlueprintName = "SmartNotificationsAppTests"
ReferencedContainer = "container:SmartNotificationsApp.xcodeproj">
BuildableName = "NotificationsExampleAppTests.xctest"
BlueprintName = "NotificationsExampleAppTests"
ReferencedContainer = "container:NotificationsExampleApp.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
......@@ -57,9 +57,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "SmartNotificationsApp.app"
BlueprintName = "SmartNotificationsApp"
ReferencedContainer = "container:SmartNotificationsApp.xcodeproj">
BuildableName = "NotificationsExampleApp.app"
BlueprintName = "NotificationsExampleApp"
ReferencedContainer = "container:NotificationsExampleApp.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
......@@ -80,9 +80,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "SmartNotificationsApp.app"
BlueprintName = "SmartNotificationsApp"
ReferencedContainer = "container:SmartNotificationsApp.xcodeproj">
BuildableName = "NotificationsExampleApp.app"
BlueprintName = "NotificationsExampleApp"
ReferencedContainer = "container:NotificationsExampleApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
......@@ -99,9 +99,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "SmartNotificationsApp.app"
BlueprintName = "SmartNotificationsApp"
ReferencedContainer = "container:SmartNotificationsApp.xcodeproj">
BuildableName = "NotificationsExampleApp.app"
BlueprintName = "NotificationsExampleApp"
ReferencedContainer = "container:NotificationsExampleApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
......
......@@ -10,7 +10,7 @@
#import "AppDelegate.h"
#import "RCTPushNotificationManager.h"
#import "RCTRootView.h"
#import "SmartNotifications.h"
#import "RNNotifications.h"
@implementation AppDelegate
......@@ -45,7 +45,7 @@
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"SmartNotificationsApp"
moduleName:@"NotificationsExampleApp"
initialProperties:nil
launchOptions:launchOptions];
......@@ -72,13 +72,13 @@
// Required for the notification event.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification
{
[SmartNotifications didReceiveRemoteNotification:notification];
[RNNotifications didReceiveRemoteNotification:notification];
}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[SmartNotifications didReceiveLocalNotification:notification];
[RNNotifications didReceiveLocalNotification:notification];
}
......
......@@ -18,7 +18,7 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SmartNotificationsApp" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NotificationsExampleApp" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
......
......@@ -29,16 +29,16 @@
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
......
......@@ -16,11 +16,11 @@
#define TIMEOUT_SECONDS 240
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
@interface SmartNotificationsAppTests : XCTestCase
@interface NotificationsExampleAppTests : XCTestCase
@end
@implementation SmartNotificationsAppTests
@implementation NotificationsExampleAppTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
......
{
"name": "SmartNotificationsApp",
"name": "NotificationsExampleApp",
"version": "0.0.1",
"private": true,
"scripts": {
......@@ -8,6 +8,6 @@
"dependencies": {
"react": "^0.14.7",
"react-native": "^0.22.2",
"react-native-smart-notifications": "../"
"react-native-notifications": "../"
}
}
/**
* @providesModule SmartNotifications
* @providesModule RNNotifications
* @flow
*/
'use strict';
import { NativeModules, DeviceEventEmitter } from 'react-native';
import Map from 'core-js/library/es6/map';
var NativeSmartNotifications = NativeModules.SmartNotifications;
var NativeRNNotifications = NativeModules.RNNotifications;
var DEVICE_NOTIFICATION_RECEIVED_FOREGROUND_EVENT = 'notificationReceivedForeground';
var DEVICE_NOTIFICATION_RECEIVED_BACKGROUND_EVENT = 'notificationReceivedBackground';
......@@ -13,7 +13,7 @@ var DEVICE_NOTIFICATION_OPENED_EVENT = 'notificationOpened';
var _notificationHandlers = new Map();
class SmartNotificationsIOS {
class NotificationsIOS {
/**
* Attaches a listener to remote notification events while the app is running
* in the foreground or the background.
......@@ -58,4 +58,4 @@ class SmartNotificationsIOS {
}
}
module.exports = SmartNotificationsIOS;
module.exports = NotificationsIOS;
......@@ -7,7 +7,7 @@
"type": "git",
"url": "https://github.com/wix-private/react-native-notifications.git"
},
"version": "0.0.1",
"version": "0.0.2",
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
"keywords": [
"react-component",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment