expo-media-library 17.1.0-canary-20250207-8bc5146 → 17.1.0-canary-20250219-4a5dade

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.
@@ -1,22 +1,6 @@
1
- apply plugin: 'com.android.library'
2
-
3
- def useLegacyExpoModulesCorePlugin = {
4
- def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
5
- apply from: expoModulesCorePlugin
6
- applyKotlinExpoModulesCorePlugin()
7
- useCoreDependencies()
8
- useDefaultAndroidSdkVersions()
9
- useExpoPublishing()
10
- }
11
-
12
- try {
13
- apply plugin: 'expo-module-gradle-plugin'
14
- } catch (e) {
15
- if (!e instanceof UnknownPluginException) {
16
- throw e
17
- }
18
-
19
- useLegacyExpoModulesCorePlugin()
1
+ plugins {
2
+ id 'com.android.library'
3
+ id 'expo-module-gradle-plugin'
20
4
  }
21
5
 
22
6
  group = 'host.exp.exponent'
@@ -11,7 +11,8 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
13
  s.platforms = {
14
- :ios => '15.1'
14
+ :ios => '15.1',
15
+ :tvos => '15.1'
15
16
  }
16
17
  s.source = { git: 'https://github.com/expo/expo.git' }
17
18
  s.static_framework = true
@@ -65,10 +65,12 @@ public class MediaLibraryModule: Module, PhotoLibraryObserverHandler {
65
65
  }
66
66
 
67
67
  AsyncFunction("presentPermissionsPickerAsync") {
68
+ #if os(iOS)
68
69
  guard let vc = appContext?.utilities?.currentViewController() else {
69
70
  return
70
71
  }
71
72
  PHPhotoLibrary.shared().presentLimitedLibraryPicker(from: vc)
73
+ #endif
72
74
  }.runOnQueue(.main)
73
75
 
74
76
  AsyncFunction("createAssetAsync") { (uri: URL, promise: Promise) in
@@ -110,6 +112,7 @@ public class MediaLibraryModule: Module, PhotoLibraryObserverHandler {
110
112
  }
111
113
 
112
114
  AsyncFunction("saveToLibraryAsync") { (localUrl: URL, promise: Promise) in
115
+ #if os(iOS)
113
116
  if Bundle.main.infoDictionary?["NSPhotoLibraryAddUsageDescription"] == nil {
114
117
  throw MissingPListKeyException("NSPhotoLibraryAddUsageDescription")
115
118
  }
@@ -155,6 +158,7 @@ public class MediaLibraryModule: Module, PhotoLibraryObserverHandler {
155
158
  promise.reject(SaveVideoException())
156
159
  return
157
160
  }
161
+ #endif
158
162
 
159
163
  promise.reject(UnsupportedAssetException())
160
164
  }
@@ -6,6 +6,7 @@ typealias SaveToLibraryCallback = (Any?, Error?) -> Void
6
6
  class SaveToLibraryDelegate: NSObject {
7
7
  var callback: SaveToLibraryCallback?
8
8
 
9
+ #if os(iOS)
9
10
  func writeImage(_ image: UIImage, withCallback callback: @escaping SaveToLibraryCallback) {
10
11
  self.callback = callback
11
12
  UIImageWriteToSavedPhotosAlbum(
@@ -49,4 +50,5 @@ class SaveToLibraryDelegate: NSObject {
49
50
  func triggerCallback(_ asset: Any?, with error: Error?) {
50
51
  callback?(asset, error)
51
52
  }
53
+ #endif
52
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-media-library",
3
- "version": "17.1.0-canary-20250207-8bc5146",
3
+ "version": "17.1.0-canary-20250219-4a5dade",
4
4
  "description": "Provides access to user's media library.",
5
5
  "main": "build/MediaLibrary.js",
6
6
  "types": "build/MediaLibrary.d.ts",
@@ -38,10 +38,10 @@
38
38
  "preset": "expo-module-scripts"
39
39
  },
40
40
  "devDependencies": {
41
- "expo-module-scripts": "4.0.4-canary-20250207-8bc5146"
41
+ "expo-module-scripts": "4.0.5-canary-20250219-4a5dade"
42
42
  },
43
43
  "peerDependencies": {
44
- "expo": "53.0.0-canary-20250207-8bc5146",
44
+ "expo": "53.0.0-canary-20250219-4a5dade",
45
45
  "react-native": "*"
46
46
  },
47
47
  "codegenConfig": {
@@ -54,5 +54,5 @@
54
54
  }
55
55
  }
56
56
  },
57
- "gitHead": "8bc5146852ccd7033138bac9ef8d3c41ae85a211"
57
+ "gitHead": "4a5daded61d3d8b9d501059039ac74c09c25675b"
58
58
  }