react-native-share 7.3.8 → 7.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/RNShare.m +7 -2
- package/package.json +1 -1
package/ios/RNShare.m
CHANGED
|
@@ -246,10 +246,15 @@ RCT_EXPORT_METHOD(open:(NSDictionary *)options
|
|
|
246
246
|
RCTLogError(@"No `urls` to save in Files");
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
|
-
if (@available(iOS 11.0, *)) {
|
|
249
|
+
if (@available(iOS 11.0, macCatalyst 13.1, *)) {
|
|
250
250
|
resolveBlock = successCallback;
|
|
251
251
|
rejectBlock = failureCallback;
|
|
252
|
-
UIDocumentPickerViewController *documentPicker =
|
|
252
|
+
UIDocumentPickerViewController *documentPicker = nil;
|
|
253
|
+
if (@available(iOS 15.0, macCatalyst 15.0, *)) {
|
|
254
|
+
documentPicker = [[UIDocumentPickerViewController alloc] initForExportingURLs:urls asCopy:YES];
|
|
255
|
+
} else {
|
|
256
|
+
documentPicker = [[UIDocumentPickerViewController alloc] initWithURLs:urls inMode:UIDocumentPickerModeExportToService];
|
|
257
|
+
}
|
|
253
258
|
[documentPicker setDelegate:self];
|
|
254
259
|
[controller presentViewController:documentPicker animated:YES completion:nil];
|
|
255
260
|
return;
|
package/package.json
CHANGED