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 {
125
125
RNVoipPushNotificationManager . requestPermissions ( requestedPermissions ) ;
126
126
}
127
127
128
+ /**
129
+ * Register for voip token
130
+ *
131
+ * @static
132
+ * @memberof RNVoipPushNotification
133
+ */
134
+ static registerVoipToken ( ) {
135
+ RNVoipPushNotificationManager . registerVoipToken ( ) ;
136
+ }
137
+
128
138
/**
129
139
* You will never need to instantiate `RNVoipPushNotification` yourself.
130
140
* 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
197
197
}
198
198
dispatch_async (dispatch_get_main_queue (), ^{
199
199
[self registerUserNotification: permissions];
200
- [self voipRegistration ];
201
200
});
202
201
}
203
202
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
+
204
213
RCT_EXPORT_METHOD (checkPermissions:(RCTResponseSenderBlock)callback)
205
214
{
206
215
if (RCTRunningInAppExtension ()) {
You can’t perform that action at this time.
0 commit comments