SDKsiOSEnterprise
Restore a pending invitation
Restore an unresolved call invitation received before app startup with the OpenIM iOS SDK.
Recover pending, unanswered call invitations after an iOS cold app launch using getSignalingInvitationInfoStartAppWithOnSuccess:onFailure:. This method requires no input parameters.
Code example
[[OIMManager manager]
getSignalingInvitationInfoStartAppWithOnSuccess:^(OIMSignalingInfo * _Nullable info) {
if (info.invitation.roomID.length > 0) {
[self restoreIncomingCall:info];
}
}
onFailure:^(NSInteger code, NSString * _Nullable message) {
[self showCallError:code message:message ?: @"Failed to restore call invitation"];
}];Return value
The onSuccess callback delivers an OIMSignalingInfo object representing the invitation pending at application launch. If no invitation is pending, the callback returns nil. Always verify that both info and info.invitation.roomID are non-empty before presenting the incoming call UI.
State changes after the call
- Snapshot restoration: This query restores an instantaneous snapshot of the unresolved invitation.
- Asynchronous event tracking: After rendering the incoming call screen, observe ongoing state updates (such as cancellation, timeout, remote acceptance, or hangup) via
OIMSignalingListenerdelegate callbacks (see Handle call events).
Was this page helpful?