apps-sdk 1.0.69 → 1.0.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -148,13 +148,13 @@ class Storage {
148
148
  async handleDownloadImageToGallery(imageURI) {
149
149
  try {
150
150
  const { status } = await MediaLibrary.requestPermissionsAsync();
151
- if(status !== 'granted') {
152
- return;
151
+ if(status === 'granted') {
152
+ return await MediaLibrary.createAssetAsync(imageURI);
153
153
  }
154
- return await MediaLibrary.createAssetAsync(imageURI);
155
154
  } catch(error) {
156
155
  console.error('Error al guardar la imagen en la galería:', error);
157
156
  }
157
+ return false;
158
158
  }
159
159
 
160
160
  async getCreations() {
package/types/index.d.ts CHANGED
@@ -89,7 +89,7 @@ declare module 'apps-sdk' {
89
89
  getCreations(): Promise<any>;
90
90
  deleteCreation(dirName: string): Promise<void>;
91
91
  deleteAllCreations(): Promise<void>;
92
- handleDownloadImageToGallery(imageURI: string): Promise<void>;
92
+ handleDownloadImageToGallery(imageURI: string): Promise<string>;
93
93
  handleRequestGalleryPermission(): Promise<string>;
94
94
  setTrackingPermissionGranted(value: boolean): void;
95
95
  }