Skip to content

Commit

Permalink
add class method for getting current app state
Browse files Browse the repository at this point in the history
- background
- inactive
- active
  • Loading branch information
ianlin committed Oct 16, 2016
1 parent b47ecd1 commit 746a24a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/RNVoipPushNotification/RNVoipPushNotificationManager.h
Expand Up @@ -17,5 +17,6 @@
- (NSDictionary *)checkPermissions;
+ (void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type;
+ (void)didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type;
+ (NSString *)getCurrentAppBackgroundState;

@end
5 changes: 5 additions & 0 deletions ios/RNVoipPushNotification/RNVoipPushNotificationManager.m
Expand Up @@ -138,6 +138,11 @@ - (NSDictionary *)checkPermissions

}

+ (NSString *)getCurrentAppBackgroundState
{
return RCTCurrentAppBackgroundState();
}

+ (void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type
{
NSLog(@"[RNVoipPushNotificationManager] didUpdatePushCredentials credentials.token = %@, type = %@", credentials.token, type);
Expand Down

0 comments on commit 746a24a

Please sign in to comment.