Skip to content

Commit 872d95b

Browse files
author
Adam Harris
committed
Merge pull request #22 from cedriclombardot/patch-1
Fix #21 - IOS 7 and later for empty recipient
2 parents 22368da + 5ec0843 commit 872d95b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/ios/Sms.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ - (void)send:(CDVInvokedUrlCommand*)command {
3434

3535
NSArray* recipients = [command.arguments objectAtIndex:0];
3636
if (recipients != nil) {
37+
if ([recipients.firstObject isEqual: @""]) {
38+
[recipients replaceObjectAtIndex:0 withObject:@"?"];
39+
}
40+
3741
[composeViewController setRecipients:recipients];
3842
}
3943

@@ -79,4 +83,4 @@ - (void)messageComposeViewController:(MFMessageComposeViewController *)controlle
7983
}
8084
}
8185

82-
@end
86+
@end

0 commit comments

Comments
 (0)