Skip to content

Commit

Permalink
Merge pull request #21 from zyad-yasser/feture/add-capacitor-3-support
Browse files Browse the repository at this point in the history
Add ios support by fixing issues appeared in build time
  • Loading branch information
stewones authored Jun 8, 2022
2 parents a8f4c20 + 6abbc0c commit f9efcce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ios/Plugin/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public class MediaPlugin: CAPPlugin {
func fetchAlbumsToJs(_ call: CAPPluginCall) {
var albums = [JSObject]()

let loadSharedAlbums = call.getBool("loadShared", false)!
let loadSharedAlbums = call.getBool("loadShared", false)

// Load our smart albums
var fetchResult = PHAssetCollection.fetchAssetCollections(with: .smartAlbum, subtype: .albumRegular, options: nil)
Expand Down Expand Up @@ -269,7 +269,7 @@ public class MediaPlugin: CAPPlugin {

let albumId = call.getString("albumIdentifier")

let quantity = call.getInt("quantity", MediaPlugin.DEFAULT_QUANTITY)!
let quantity = call.getInt("quantity", MediaPlugin.DEFAULT_QUANTITY)

var targetCollection: PHAssetCollection?

Expand All @@ -294,10 +294,10 @@ public class MediaPlugin: CAPPlugin {
//let after = call.getString("after")

let types = call.getString("types") ?? MediaPlugin.DEFAULT_TYPES
let thumbnailWidth = call.getInt("thumbnailWidth", MediaPlugin.DEFAULT_THUMBNAIL_WIDTH)!
let thumbnailHeight = call.getInt("thumbnailHeight", MediaPlugin.DEFAULT_THUMBNAIL_HEIGHT)!
let thumbnailWidth = call.getInt("thumbnailWidth", MediaPlugin.DEFAULT_THUMBNAIL_WIDTH)
let thumbnailHeight = call.getInt("thumbnailHeight", MediaPlugin.DEFAULT_THUMBNAIL_HEIGHT)
let thumbnailSize = CGSize(width: thumbnailWidth, height: thumbnailHeight)
let thumbnailQuality = call.getInt("thumbnailQuality", 95)!
let thumbnailQuality = call.getInt("thumbnailQuality", 95)

let requestOptions = PHImageRequestOptions()
requestOptions.isNetworkAccessAllowed = true
Expand Down

0 comments on commit f9efcce

Please sign in to comment.