diff --git a/intercom-plugin/src/ios/IntercomBridge.m b/intercom-plugin/src/ios/IntercomBridge.m index 0a6c2d8..fc2f1bc 100644 --- a/intercom-plugin/src/ios/IntercomBridge.m +++ b/intercom-plugin/src/ios/IntercomBridge.m @@ -172,7 +172,10 @@ - (void)presentContent:(CDVInvokedUrlCommand*)command { } - (void)presentMessageComposer:(CDVInvokedUrlCommand*)command { - NSString *initialMessage = command.arguments[0]; + NSString *initialMessage = nil; + if (command.arguments.count > 0 && command.arguments[0] != [NSNull null]) { + initialMessage = command.arguments[0]; + } [Intercom presentMessageComposer:initialMessage]; [self sendSuccess:command]; }