expo-sharing 11.3.1 → 11.4.0

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/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 11.4.0 — 2023-05-08
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 11.3.2 — 2023-04-20
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - On iOS, fix crash when share menu is presented on iPad. ([#22193](https://github.com/expo/expo/pull/22193) by [@alanjhughes](https://github.com/alanjhughes))
22
+
13
23
  ## 11.3.1 — 2023-04-14
14
24
 
15
25
  ### 🐛 Bug fixes
package/README.md CHANGED
@@ -18,7 +18,7 @@ For bare React Native projects, you must ensure that you have [installed and con
18
18
  ### Add the package to your npm dependencies
19
19
 
20
20
  ```
21
- expo install expo-sharing
21
+ npx expo install expo-sharing
22
22
  ```
23
23
 
24
24
  ### Configure for iOS
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '11.3.1'
6
+ version = '11.4.0'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -74,7 +74,7 @@ android {
74
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
75
75
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
76
76
  versionCode 16
77
- versionName '11.3.1'
77
+ versionName '11.4.0'
78
78
  }
79
79
  lintOptions {
80
80
  abortOnError false
@@ -36,6 +36,20 @@ public final class SharingModule: Module {
36
36
  throw MissingCurrentViewControllerException()
37
37
  }
38
38
 
39
+ // Apple docs state that `UIActivityViewController` must be presented in a
40
+ // popover on iPad https://developer.apple.com/documentation/uikit/uiactivityviewcontroller
41
+ if UIDevice.current.userInterfaceIdiom == .pad {
42
+ let viewFrame = currentViewcontroller.view.frame
43
+ activityController.popoverPresentationController?.sourceRect = CGRect(
44
+ x: viewFrame.midX,
45
+ y: viewFrame.maxY,
46
+ width: 0,
47
+ height: 0
48
+ )
49
+ activityController.popoverPresentationController?.sourceView = currentViewcontroller.view
50
+ activityController.modalPresentationStyle = .pageSheet
51
+ }
52
+
39
53
  currentViewcontroller.present(activityController, animated: true)
40
54
  }
41
55
  .runOnQueue(.main)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-sharing",
3
- "version": "11.3.1",
3
+ "version": "11.4.0",
4
4
  "description": "ExpoSharing standalone module",
5
5
  "main": "build/Sharing.js",
6
6
  "types": "build/Sharing.d.ts",
@@ -37,5 +37,5 @@
37
37
  "peerDependencies": {
38
38
  "expo": "*"
39
39
  },
40
- "gitHead": "5d628076915823cbe56e281ec17c3a34cc0c1fc6"
40
+ "gitHead": "4ba50c428c8369bb6b3a51a860d4898ad4ccbe78"
41
41
  }