Skip to content

Commit

Permalink
Updating CHANGELOG.md + README.md + VERSION + LICENSE for 2.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
rnine committed Sep 18, 2019
1 parent 04f5a0e commit 5df82cd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 34 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Change Log
==========

Version 2.2 *(2019-09-18)*
----------------------------

- Added iOS 13 compatibility.
- Added support for both light and dark appearances to the picker (iOS 13 only.)
- `Client` upload functions now return types based on protocols, such as `Uploadable`, `DeferredAdd`, `Cancellable`, `Monitorizable` or combinations of these.
- Likewise, the functions `folderList(provider:path:pageToken:queue:completionHandler:)` and `store(provider:path:storeOptions:queue:completionHandler:)` now return a `Cancellable`.
- Improved collection view's layout reflowing in the picker to better adapt to larger presentation styles.
- Improved upload monitor so it now indicates the number of files being uploaded and how many of them are pending upload at any given time.
- Added redo action to image editor.
- Bugfix: Explicitly ask for authorization before accessing Photos library.
- Bugfix: Fallback to `JPEG` export if `HEIC` is not available on the device.
- Bugfix: Fixing zipping of certain types of directories that were not properly detected as such (i.e., bundles.)

Version 2.1.1 *(2019-09-06)*
----------------------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015–2016 Filestack (https://www.filestack.com/)
Copyright (c) 2015–2019 Filestack (https://www.filestack.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 12 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ guard let security = try? Security(policy: policy, appSecret: "YOUR-APP-SECRET")
// Create `Config` object.
let config = Filestack.Config()

// Make sure to assign an app scheme URL that matches the one configured in your info.plist.
config.appURLScheme = "filestackdemo"
// Make sure to assign a callback URL scheme that is handled by your app.
config.callbackURLScheme = "filestackdemo"

let client = Filestack.Client(apiKey: "YOUR-API-KEY", security: security, config: config)
```
Expand Down Expand Up @@ -211,19 +211,6 @@ client.folderList(provider: .googleDrive, path: "/", pageToken: nil) { response
}
```

Remember also to add this piece of code to your `AppDelegate` so the auth flow can complete:

```swift
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
if url.scheme == "YOUR-APP-URL-SCHEME" && url.host == "Filestack" {
return true
}

// Here we just state that any other URLs should not be handled by this app.
return false
}
```

### Storing contents from a cloud provider into a store location

```swift
Expand All @@ -248,7 +235,7 @@ Please make sure to authenticate against the cloud provider first by using the `

### Launching picker UI

This is a code fragment broken into pieces taken from the [Demo app](https://github.com/filestack/filestack-ios/tree/master/Demo) describing the process of launching the picker UI using some of the most relevant config options:
This is a code fragment broken into pieces taken from the demo app (included in this repository) describing the process of launching the picker UI using some of the most relevant config options:

#### 1. Setting up Policy and Security objects

Expand All @@ -275,7 +262,7 @@ guard let security = try? Security(policy: policy, appSecret: "YOUR-APP-SECRET-H
// Create `Config` object.
// IMPORTANT: - Make sure to assign an app scheme URL that matches the one(s) configured in your info.plist
let config = Filestack.Config.builder
.with(appURLScheme: "YOUR-APP-URL-SCHEME")
.with(callbackURLScheme: "YOUR-APP-URL-SCHEME")
.with(videoQuality: .typeHigh)
.with(imageURLExportPreset: .current)
.with(maximumSelectionLimit: 10)
Expand Down Expand Up @@ -316,6 +303,7 @@ And implement the `PickerNavigationControllerDelegate` protocol in your view con

```swift
extension ViewController: PickerNavigationControllerDelegate {
/// Called when the picker finishes storing a file originating from a cloud source into the destination storage location.
func pickerStoredFile(picker: PickerNavigationController, response: StoreResponse) {
if let contents = response.contents {
// Our cloud file was stored into the destination location.
Expand All @@ -326,6 +314,7 @@ extension ViewController: PickerNavigationControllerDelegate {
}
}

/// Called when the picker finishes uploading a file originating from the local device into the destination storage location.
func pickerUploadedFile(picker: PickerNavigationController, response: NetworkJSONResponse?) {
if let contents = response?.json {
// Our local file was stored into the destination location.
Expand All @@ -335,6 +324,11 @@ extension ViewController: PickerNavigationControllerDelegate {
print("Error uploading file: \(error)")
}
}

/// Called when the picker reports progress during a file or set of files being uploaded.
func pickerReportedUploadProgress(picker: PickerNavigationController, progress: Float) {
print("Picker \(picker) reported upload progress: \(progress)")
}
}
```

Expand All @@ -344,23 +338,9 @@ extension ViewController: PickerNavigationControllerDelegate {
yourViewController.present(picker, animated: true)
```

Finally, remember that you'll need this piece of code in your `AppDelegate` for the auth flow to complete:

```swift
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {

if url.scheme == "YOUR-APP-URL-SCHEME" && url.host == "Filestack" {
return true
}

// Here we just state that any other URLs should not be handled by this app.
return false
}
```

## Demo

Check the [Demo app](https://github.com/filestack/filestack-ios/tree/master/Demo) for an example on how to launch the picker UI with all the settings and options discussed above.
Check the demo app included in this repository showcasing all the topics discussed above.

## Versioning

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.1
2.2

0 comments on commit 5df82cd

Please sign in to comment.