File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed
Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 88 },
99 "dependencies" : {
1010 "jcore-react-native" : " 2.1.3" ,
11- "jpush-react-native" : " 3.0.2 " ,
11+ "jpush-react-native" : " 3.0.3 " ,
1212 "react" : " 16.8.6" ,
1313 "react-native" : " 0.60.5" ,
1414 "update" : " ^0.7.4"
Original file line number Diff line number Diff line change @@ -323,6 +323,8 @@ export default class JPush {
323323 static isNotificationEnabled ( callback ) {
324324 if ( Platform . OS == "android" ) {
325325 JPushModule . isNotificationEnabled ( callback )
326+ } else {
327+ JPushModule . isNotificationEnabled ( callback )
326328 }
327329 }
328330
Original file line number Diff line number Diff line change @@ -191,6 +191,16 @@ - (id)init
191191 }];
192192}
193193
194+ RCT_EXPORT_METHOD (isNotificationEnabled:(RCTResponseSenderBlock) callback) {
195+ [JPUSHService requestNotificationAuthorization: ^(JPAuthorizationStatus status) {
196+ if (status <= JPAuthorizationStatusDenied) {
197+ callback (@[@(NO )]);
198+ }else {
199+ callback (@[@(YES )]);
200+ }
201+ }];
202+ }
203+
194204// tag
195205RCT_EXPORT_METHOD (addTags:(NSDictionary *)params)
196206{
Original file line number Diff line number Diff line change 66 "types" : " index.d.ts" ,
77 "license" : " ISC" ,
88 "author" : " wicked.tc130" ,
9- "version" : " 3.0.2 " ,
9+ "version" : " 3.0.3 " ,
1010 "repository" : {
1111 "type" : " git" ,
1212 "url" : " https://github.com/jpush/jpush-react-native"
You can’t perform that action at this time.
0 commit comments