Skip to content

Commit 746a24a

Browse files
committed
add class method for getting current app state
- background - inactive - active
1 parent b47ecd1 commit 746a24a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ios/RNVoipPushNotification/RNVoipPushNotificationManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
- (NSDictionary *)checkPermissions;
1818
+ (void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type;
1919
+ (void)didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type;
20+
+ (NSString *)getCurrentAppBackgroundState;
2021

2122
@end

ios/RNVoipPushNotification/RNVoipPushNotificationManager.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ - (NSDictionary *)checkPermissions
138138

139139
}
140140

141+
+ (NSString *)getCurrentAppBackgroundState
142+
{
143+
return RCTCurrentAppBackgroundState();
144+
}
145+
141146
+ (void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type
142147
{
143148
NSLog(@"[RNVoipPushNotificationManager] didUpdatePushCredentials credentials.token = %@, type = %@", credentials.token, type);

0 commit comments

Comments
 (0)