You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the index.d.ts file claim that getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]>; this shuould return this format.
but It's not!!!!!!
If I'm using this code in my project
this.photoLibrary.requestAuthorization().then(()=>{this.photoLibrary.getLibrary().subscribe({next: library=>{library.forEach(function(libraryItem){console.log(libraryItem.id);// ID of the photoconsole.log(libraryItem.photoURL);// Cross-platform access to photoconsole.log(libraryItem.thumbnailURL);// Cross-platform access to thumbnailconsole.log(libraryItem.fileName);console.log(libraryItem.width);console.log(libraryItem.height);console.log(libraryItem.creationDate);console.log(libraryItem.latitude);console.log(libraryItem.longitude);console.log(libraryItem.albumIds);// array of ids of appropriate AlbumItem, only of includeAlbumsData was used});},error: err=>{console.log('could not get photos');},complete: ()=>{console.log('done getting photos');}});}).catch(err=>console.log('permissions weren\'t granted'));
And here is what Error I've got
"Uncaught TypeError: library.forEach is not a function"
"@ionic-native/photo-library": "^5.12.0",
"cordova-plugin-photo-library": "^2.2.1",
"@angular/common": "~8.1.2",
"@capacitor/core": "^1.1.1",
"@ionic/angular": "^4.8.0",
In the
index.d.ts
file claim thatgetLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]>;
this shuould return this format.but It's not!!!!!!
If I'm using this code in my project
Then I will see this in my console
I/Capacitor/Plugin/Console: {"library":[.....]}
Witch is not right in the declearion
this my couse app crash when I use
libaryItem.forEach()
The text was updated successfully, but these errors were encountered: