Skip to content

Commit 3b9e652

Browse files
authored
fix(ios): update shareSingle method to check if inAppBaseUrl can be opened instead of checking only for Twitter (#1659)
1 parent 790e7e4 commit 3b9e652

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/GenericShare.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ - (void)shareSingle:(NSDictionary *)options
1717
inAppBaseUrl:(NSString *)inAppBaseUrl {
1818

1919
NSLog(@"Try open view");
20-
if([serviceType isEqualToString:@"com.apple.social.twitter"]) {
20+
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:inAppBaseUrl]]) {
2121
SLComposeViewController *composeController = [SLComposeViewController composeViewControllerForServiceType:serviceType];
2222

2323
NSURL *URL = [RCTConvert NSURL:options[@"url"]];

0 commit comments

Comments
 (0)