social_share icon indicating copy to clipboard operation
social_share copied to clipboard

[BUG] SocialShare.shareSms crashes on iOS

Open mihail-varbanov opened this issue 1 year ago • 0 comments

Invoke on iOS platform: SocialShare.shareSms('Rev Spring 2024 Ready-to-Wear\n', url: 'https://www.vogue.com/fashion-shows/spring-2024-ready-to-wear/rev/slideshow/collection')

Result: app crashes producing the following log: -[NSNull length]: unrecognized selector sent to instance 0x1f809d3e0

Reason: The passed arguments:

args = {
  "message": "Rev Spring 2024 Ready-to-Wear\n",
  "urlLink": "https://www.vogue.com/fashion-shows/spring-2024-ready-to-wear/rev/slideshow/collection",
  "trailingText": null
}

come to iOS native side as:

call.arguments = @{
  @"message" : @"Rev Spring 2024 Ready-to-Wear\n",
  @"urlLink": @"https://www.vogue.com/fashion-shows/spring-2024-ready-to-wear/rev/slideshow/collection",
  @"trailingText": [NSNull null]
}

but the following line does not acknowledge the possible [NSNull null] value: NSString *trailingText = call.arguments[@"trailingText"];

mihail-varbanov avatar Nov 10 '23 08:11 mihail-varbanov