Skip to content

Commit

Permalink
Bump to v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stleamist committed Sep 18, 2020
2 parents 59321b2 + 3c3e54c commit a4a8590
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v2.2.2](https://github.com/stleamist/BetterSafariView/releases/tag/v2.2.2) (2020-09-19)
### Fixed
- Fixed an issue where the changes of `SafariView` and `WebAuthenticationSession` is not applied after an initialization.

## [v2.2.1](https://github.com/stleamist/BetterSafariView/releases/tag/v2.2.1) (2020-08-26)
### Fixed
- Fixed an issue where the package could not be compiled on Swift 5.2 or earlier.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct ContentView: View {
Add the following line to the `dependencies` in your [`Package.swift`](https://developer.apple.com/documentation/swift_packages/package) file:

```swift
.package(url: "https://github.com/stleamist/BetterSafariView.git", .upToNextMajor(from: "2.2.1"))
.package(url: "https://github.com/stleamist/BetterSafariView.git", .upToNextMajor(from: "2.2.2"))
```

Next, add `BetterSafariView` as a dependency for your targets:
Expand All @@ -170,7 +170,7 @@ import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(url: "https://github.com/stleamist/BetterSafariView.git", .upToNextMajor(from: "2.2.1"))
.package(url: "https://github.com/stleamist/BetterSafariView.git", .upToNextMajor(from: "2.2.2"))
],
targets: [
.target(name: "MyTarget", dependencies: ["BetterSafariView"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ struct SafariViewPresenter<Item: Identifiable>: UIViewControllerRepresentable {
}

func updateUIViewController(_ uiViewController: UIViewController, context: Context) {

// Keep the coordinator updated with a new presenter struct.
context.coordinator.parent = self
context.coordinator.item = item
}
}
Expand All @@ -30,7 +33,7 @@ extension SafariViewPresenter {

// MARK: Parent Copying

private var parent: SafariViewPresenter
var parent: SafariViewPresenter

init(parent: SafariViewPresenter) {
self.parent = parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ struct WebAuthenticationPresenter<Item: Identifiable>: UIViewControllerRepresent
// INFO: `SFAuthenticationViewController` is a private subclass of `SFSafariViewController`.
context.coordinator.setInteractiveDismissalDelegateIfPossible()

// Keep the coordinator updated with a new presenter struct.
context.coordinator.parent = self
context.coordinator.item = item
}
}
Expand All @@ -36,7 +38,7 @@ extension WebAuthenticationPresenter {

// MARK: Parent Copying

private var parent: WebAuthenticationPresenter
var parent: WebAuthenticationPresenter

init(parent: WebAuthenticationPresenter) {
self.parent = parent
Expand Down

0 comments on commit a4a8590

Please sign in to comment.