From 3095427f549ad509681a2642458078d443104dcc Mon Sep 17 00:00:00 2001 From: Kane Thomas Date: Fri, 11 Dec 2020 12:07:31 -0500 Subject: [PATCH] Adds ability to add summary text --- ios/EXSMS/EXSMSModule.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ios/EXSMS/EXSMSModule.m b/ios/EXSMS/EXSMSModule.m index 2d3044c..8fe60b6 100644 --- a/ios/EXSMS/EXSMSModule.m +++ b/ios/EXSMS/EXSMSModule.m @@ -90,6 +90,8 @@ - (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry // get inputs NSDictionary *urlQueryItems = imessageAttachment[@"urlQueryItems"]; NSDictionary *layoutParams = imessageAttachment[@"layoutParams"]; + NSString *summaryText = imessageAttachment[@"summaryText"]; + // Add all the url params to the query items array for (id key in urlQueryItems) { NSURLQueryItem *queryItem = [[NSURLQueryItem alloc]initWithName: key value: urlQueryItems[key]]; @@ -122,8 +124,13 @@ - (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry // [dataImage writeToURL:urlImage atomically:true]; // Add layout and url params to main imessage iMessage.URL = urlComponents.URL; + MSMessageTemplateLayout *iMessageLiveLayout = [[MSMessageLiveLayout alloc]initWithAlternateLayout: iMessageLayout]; + iMessage.layout = iMessageLiveLayout; + + iMessage.summaryText = summaryText; + _resolve = resolve; _reject = reject; MFMessageComposeViewController *messageComposeViewController = [[MFMessageComposeViewController alloc] init];