File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
ios/RNVoipPushNotification Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,16 @@ export default class RNVoipPushNotification {
125125 RNVoipPushNotificationManager . requestPermissions ( requestedPermissions ) ;
126126 }
127127
128+ /**
129+ * Register for voip token
130+ *
131+ * @static
132+ * @memberof RNVoipPushNotification
133+ */
134+ static registerVoipToken ( ) {
135+ RNVoipPushNotificationManager . registerVoipToken ( ) ;
136+ }
137+
128138 /**
129139 * You will never need to instantiate `RNVoipPushNotification` yourself.
130140 * Listening to the `notification` event and invoking
Original file line number Diff line number Diff line change @@ -197,10 +197,19 @@ - (void)handleRemoteNotificationReceived:(NSNotification *)notification
197197 }
198198 dispatch_async (dispatch_get_main_queue (), ^{
199199 [self registerUserNotification: permissions];
200- [self voipRegistration ];
201200 });
202201}
203202
203+ RCT_EXPORT_METHOD (registerVoipToken)
204+ {
205+ if (RCTRunningInAppExtension ()) {
206+ return ;
207+ }
208+ dispatch_async (dispatch_get_main_queue (), ^{
209+ [self voipRegistration ];
210+ });
211+ }
212+
204213RCT_EXPORT_METHOD (checkPermissions:(RCTResponseSenderBlock)callback)
205214{
206215 if (RCTRunningInAppExtension ()) {
You can’t perform that action at this time.
0 commit comments