Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-notifications
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
冷佳娟
react-native-notifications
Commits
28a28117
Commit
28a28117
authored
Jan 11, 2018
by
Amit Davidi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade lib and demo projects to RN 0.51
parent
bd4d6b7b
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
254 additions
and
186 deletions
+254
-186
RNNotifications/RNNotifications.h
RNNotifications/RNNotifications.h
+1
-5
RNNotifications/RNNotifications.m
RNNotifications/RNNotifications.m
+5
-13
android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
.../wix/reactnativenotifications/RNNotificationsPackage.java
+1
-8
android/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java
...ctnativenotifications/core/NotificationIntentAdapter.java
+1
-2
example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainApplication.java
...com/wix/reactnativenotifications/app/MainApplication.java
+1
-1
example/android/send_notif.py
example/android/send_notif.py
+1
-0
example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj
...ple/ios/NotificationsExampleApp.xcodeproj/project.pbxproj
+218
-115
example/ios/NotificationsExampleApp.xcodeproj/xcshareddata/xcschemes/NotificationsExampleApp.xcscheme
...j/xcshareddata/xcschemes/NotificationsExampleApp.xcscheme
+12
-20
example/ios/NotificationsExampleApp.xcodeproj/xcshareddata/xcschemes/SmartNotificationsApp.xcscheme
...roj/xcshareddata/xcschemes/SmartNotificationsApp.xcscheme
+12
-20
example/package.json
example/package.json
+2
-2
No files found.
RNNotifications/RNNotifications.h
View file @
28a28117
@import
UIKit
;
@import
UIKit
;
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#import <PushKit/PushKit.h>
#import <PushKit/PushKit.h>
@interface
RNNotifications
:
NSObject
<
RCTBridgeModule
>
@interface
RNNotifications
:
NSObject
<
RCTBridgeModule
>
...
...
RNNotifications/RNNotifications.m
View file @
28a28117
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import <PushKit/PushKit.h>
#import <PushKit/PushKit.h>
#if __has_include(<React/RCTBridge.h>)
#import <React/RCTBridge.h>
#import <React/RCTBridge.h>
#import <React/RCTEventDispatcher.h>
#import <React/RCTEventDispatcher.h>
#import "RNNotifications.h"
#import "RNNotifications.h"
#import <React/RCTConvert.h>
#import <React/RCTConvert.h>
#import <React/RCTUtils.h>
#import <React/RCTUtils.h>
#else
#import "RCTBridge.h"
#import "RCTEventDispatcher.h"
#import "RNNotifications.h"
#import "RCTConvert.h"
#import "RCTUtils.h"
#endif
#import "RNNotificationsBridgeQueue.h"
#import "RNNotificationsBridgeQueue.h"
#import <UserNotifications/UserNotifications.h>
#import <UserNotifications/UserNotifications.h>
...
...
android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
View file @
28a28117
...
@@ -3,7 +3,6 @@ package com.wix.reactnativenotifications;
...
@@ -3,7 +3,6 @@ package com.wix.reactnativenotifications;
import
android.app.Application
;
import
android.app.Application
;
import
com.facebook.react.ReactPackage
;
import
com.facebook.react.ReactPackage
;
import
com.facebook.react.bridge.JavaScriptModule
;
import
com.facebook.react.bridge.NativeModule
;
import
com.facebook.react.bridge.NativeModule
;
import
com.facebook.react.bridge.ReactApplicationContext
;
import
com.facebook.react.bridge.ReactApplicationContext
;
import
com.facebook.react.uimanager.ViewManager
;
import
com.facebook.react.uimanager.ViewManager
;
...
@@ -14,8 +13,7 @@ import java.util.List;
...
@@ -14,8 +13,7 @@ import java.util.List;
public
class
RNNotificationsPackage
implements
ReactPackage
{
public
class
RNNotificationsPackage
implements
ReactPackage
{
private
final
Application
mApplication
;
final
Application
mApplication
;
public
RNNotificationsPackage
(
Application
application
)
{
public
RNNotificationsPackage
(
Application
application
)
{
mApplication
=
application
;
mApplication
=
application
;
...
@@ -26,11 +24,6 @@ public class RNNotificationsPackage implements ReactPackage {
...
@@ -26,11 +24,6 @@ public class RNNotificationsPackage implements ReactPackage {
return
Arrays
.<
NativeModule
>
asList
(
new
RNNotificationsModule
(
mApplication
,
reactContext
));
return
Arrays
.<
NativeModule
>
asList
(
new
RNNotificationsModule
(
mApplication
,
reactContext
));
}
}
// Deprecated from RN 0.47
public
List
<
Class
<?
extends
JavaScriptModule
>>
createJSModules
()
{
return
Collections
.
emptyList
();
}
@Override
@Override
public
List
<
ViewManager
>
createViewManagers
(
ReactApplicationContext
reactContext
)
{
public
List
<
ViewManager
>
createViewManagers
(
ReactApplicationContext
reactContext
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
...
...
android/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java
View file @
28a28117
...
@@ -8,12 +8,11 @@ import android.os.Bundle;
...
@@ -8,12 +8,11 @@ import android.os.Bundle;
import
com.wix.reactnativenotifications.core.notification.PushNotificationProps
;
import
com.wix.reactnativenotifications.core.notification.PushNotificationProps
;
public
class
NotificationIntentAdapter
{
public
class
NotificationIntentAdapter
{
private
static
final
int
PENDING_INTENT_CODE
=
0
;
private
static
final
String
PUSH_NOTIFICATION_EXTRA_NAME
=
"pushNotification"
;
private
static
final
String
PUSH_NOTIFICATION_EXTRA_NAME
=
"pushNotification"
;
public
static
PendingIntent
createPendingNotificationIntent
(
Context
appContext
,
Intent
intent
,
PushNotificationProps
notification
)
{
public
static
PendingIntent
createPendingNotificationIntent
(
Context
appContext
,
Intent
intent
,
PushNotificationProps
notification
)
{
intent
.
putExtra
(
PUSH_NOTIFICATION_EXTRA_NAME
,
notification
.
asBundle
());
intent
.
putExtra
(
PUSH_NOTIFICATION_EXTRA_NAME
,
notification
.
asBundle
());
return
PendingIntent
.
getService
(
appContext
,
PENDING_INTENT_CODE
,
intent
,
PendingIntent
.
FLAG_ONE_SHOT
);
return
PendingIntent
.
getService
(
appContext
,
(
int
)
System
.
currentTimeMillis
()
,
intent
,
PendingIntent
.
FLAG_ONE_SHOT
);
}
}
public
static
Bundle
extractPendingNotificationDataFromIntent
(
Intent
intent
)
{
public
static
Bundle
extractPendingNotificationDataFromIntent
(
Intent
intent
)
{
...
...
example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainApplication.java
View file @
28a28117
...
@@ -15,7 +15,7 @@ public class MainApplication extends Application implements ReactApplication {
...
@@ -15,7 +15,7 @@ public class MainApplication extends Application implements ReactApplication {
private
final
ReactNativeHost
mReactNativeHost
=
new
ReactNativeHost
(
this
)
{
private
final
ReactNativeHost
mReactNativeHost
=
new
ReactNativeHost
(
this
)
{
@Override
@Override
p
rotected
boolean
getUseDeveloperSupport
()
{
p
ublic
boolean
getUseDeveloperSupport
()
{
return
BuildConfig
.
DEBUG
;
return
BuildConfig
.
DEBUG
;
}
}
...
...
example/android/send_notif.py
100644 → 100755
View file @
28a28117
#!/usr/bin/python
from
urllib2
import
*
from
urllib2
import
*
import
json
import
json
import
sys
import
sys
...
...
example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj
View file @
28a28117
This diff is collapsed.
Click to expand it.
example/ios/NotificationsExampleApp.xcodeproj/xcshareddata/xcschemes/NotificationsExampleApp.xcscheme
View file @
28a28117
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
LastUpgradeVersion =
"0810"
LastUpgradeVersion =
"0810"
version =
"1.3"
>
version =
"1.3"
>
<BuildAction
<BuildAction
parallelizeBuildables =
"
YES
"
parallelizeBuildables =
"
NO
"
buildImplicitDependencies =
"YES"
>
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntries>
<BuildActionEntry
<BuildActionEntry
...
@@ -14,23 +14,23 @@
...
@@ -14,23 +14,23 @@
buildForAnalyzing =
"YES"
>
buildForAnalyzing =
"YES"
>
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
13B07F861A680F5B00A75B9A
"
BlueprintIdentifier =
"
83CBBA2D1A601D0E00E9B192
"
BuildableName =
"
NotificationsExampleApp.app
"
BuildableName =
"
libReact.a
"
BlueprintName =
"
NotificationsExampleApp
"
BlueprintName =
"
React
"
ReferencedContainer =
"container:
NotificationsExampleApp
.xcodeproj"
>
ReferencedContainer =
"container:
../node_modules/react-native/React/React
.xcodeproj"
>
</BuildableReference>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntry>
<BuildActionEntry
<BuildActionEntry
buildForTesting =
"YES"
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"
NO
"
buildForProfiling =
"
YES
"
buildForArchiving =
"
NO
"
buildForArchiving =
"
YES
"
buildForAnalyzing =
"YES"
>
buildForAnalyzing =
"YES"
>
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
00E356ED1AD99517003FC87E
"
BlueprintIdentifier =
"
13B07F861A680F5B00A75B9A
"
BuildableName =
"NotificationsExampleApp
Tests.xctest
"
BuildableName =
"NotificationsExampleApp
.app
"
BlueprintName =
"NotificationsExampleApp
Tests
"
BlueprintName =
"NotificationsExampleApp"
ReferencedContainer =
"container:NotificationsExampleApp.xcodeproj"
>
ReferencedContainer =
"container:NotificationsExampleApp.xcodeproj"
>
</BuildableReference>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntry>
...
@@ -40,18 +40,9 @@
...
@@ -40,18 +40,9 @@
buildConfiguration =
"Debug"
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
shouldUseLaunchSchemeArgsEnv =
"YES"
>
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
<Testables>
<TestableReference
skipped =
"NO"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"00E356ED1AD99517003FC87E"
BuildableName =
"NotificationsExampleAppTests.xctest"
BlueprintName =
"NotificationsExampleAppTests"
ReferencedContainer =
"container:NotificationsExampleApp.xcodeproj"
>
</BuildableReference>
</TestableReference>
</Testables>
</Testables>
<MacroExpansion>
<MacroExpansion>
<BuildableReference
<BuildableReference
...
@@ -69,6 +60,7 @@
...
@@ -69,6 +60,7 @@
buildConfiguration =
"Debug"
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
launchStyle =
"0"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
...
...
example/ios/NotificationsExampleApp.xcodeproj/xcshareddata/xcschemes/SmartNotificationsApp.xcscheme
View file @
28a28117
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
LastUpgradeVersion =
"0810"
LastUpgradeVersion =
"0810"
version =
"1.3"
>
version =
"1.3"
>
<BuildAction
<BuildAction
parallelizeBuildables =
"
YES
"
parallelizeBuildables =
"
NO
"
buildImplicitDependencies =
"YES"
>
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntries>
<BuildActionEntry
<BuildActionEntry
...
@@ -14,23 +14,23 @@
...
@@ -14,23 +14,23 @@
buildForAnalyzing =
"YES"
>
buildForAnalyzing =
"YES"
>
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
13B07F861A680F5B00A75B9A
"
BlueprintIdentifier =
"
83CBBA2D1A601D0E00E9B192
"
BuildableName =
"
NotificationsExampleApp.app
"
BuildableName =
"
libReact.a
"
BlueprintName =
"
NotificationsExampleApp
"
BlueprintName =
"
React
"
ReferencedContainer =
"container:
NotificationsExampleApp
.xcodeproj"
>
ReferencedContainer =
"container:
../node_modules/react-native/React/React
.xcodeproj"
>
</BuildableReference>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntry>
<BuildActionEntry
<BuildActionEntry
buildForTesting =
"YES"
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"
NO
"
buildForProfiling =
"
YES
"
buildForArchiving =
"
NO
"
buildForArchiving =
"
YES
"
buildForAnalyzing =
"YES"
>
buildForAnalyzing =
"YES"
>
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
00E356ED1AD99517003FC87E
"
BlueprintIdentifier =
"
13B07F861A680F5B00A75B9A
"
BuildableName =
"NotificationsExampleApp
Tests.xctest
"
BuildableName =
"NotificationsExampleApp
.app
"
BlueprintName =
"NotificationsExampleApp
Tests
"
BlueprintName =
"NotificationsExampleApp"
ReferencedContainer =
"container:NotificationsExampleApp.xcodeproj"
>
ReferencedContainer =
"container:NotificationsExampleApp.xcodeproj"
>
</BuildableReference>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntry>
...
@@ -40,18 +40,9 @@
...
@@ -40,18 +40,9 @@
buildConfiguration =
"Debug"
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
shouldUseLaunchSchemeArgsEnv =
"YES"
>
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
<Testables>
<TestableReference
skipped =
"NO"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"00E356ED1AD99517003FC87E"
BuildableName =
"NotificationsExampleAppTests.xctest"
BlueprintName =
"NotificationsExampleAppTests"
ReferencedContainer =
"container:NotificationsExampleApp.xcodeproj"
>
</BuildableReference>
</TestableReference>
</Testables>
</Testables>
<MacroExpansion>
<MacroExpansion>
<BuildableReference
<BuildableReference
...
@@ -69,6 +60,7 @@
...
@@ -69,6 +60,7 @@
buildConfiguration =
"Debug"
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
launchStyle =
"0"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
...
...
example/package.json
View file @
28a28117
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"babel-preset-react-native-stage-0"
:
"^1.0.1"
,
"babel-preset-react-native-stage-0"
:
"^1.0.1"
,
"react"
:
"1
5.4.1
"
,
"react"
:
"1
6.0.0
"
,
"react-native"
:
"0.
38
.0"
,
"react-native"
:
"0.
51
.0"
,
"react-native-notifications"
:
"../"
"react-native-notifications"
:
"../"
},
},
"babel"
:
{
"babel"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment