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.
Files changed (2) hide show
  1. package/ios/RNShare.m +7 -2
  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 = [[UIDocumentPickerViewController alloc] initWithURLs:urls inMode:UIDocumentPickerModeExportToService];
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-share",
3
3
  "description": "Social share, sending simple data to other apps.",
4
- "version": "7.3.8",
4
+ "version": "7.3.9",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/react-native-community/react-native-share.git"