Skip to content

Commit

Permalink
Adds ability to add summary text
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbbb committed Dec 11, 2020
1 parent ba89612 commit 3095427
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ios/EXSMS/EXSMSModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ - (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry
// get inputs
NSDictionary<NSString*, NSString*> *urlQueryItems = imessageAttachment[@"urlQueryItems"];
NSDictionary<NSString*, NSString*> *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]];
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 3095427

Please sign in to comment.