File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ v2.2.2] ( https://github.com/stleamist/BetterSafariView/releases/tag/v2.2.2 ) (2020-09-19)
4+ ### Fixed
5+ - Fixed an issue where the changes of ` SafariView ` and ` WebAuthenticationSession ` is not applied after an initialization.
6+
37## [ v2.2.1] ( https://github.com/stleamist/BetterSafariView/releases/tag/v2.2.1 ) (2020-08-26)
48### Fixed
59- Fixed an issue where the package could not be compiled on Swift 5.2 or earlier.
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ struct ContentView: View {
151151Add the following line to the ` dependencies ` in your [ ` Package.swift ` ] ( https://developer.apple.com/documentation/swift_packages/package ) file:
152152
153153``` swift
154- .package (url : " https://github.com/stleamist/BetterSafariView.git" , .upToNextMajor (from : " 2.2.1 " ))
154+ .package (url : " https://github.com/stleamist/BetterSafariView.git" , .upToNextMajor (from : " 2.2.2 " ))
155155```
156156
157157Next, add ` BetterSafariView ` as a dependency for your targets:
@@ -170,7 +170,7 @@ import PackageDescription
170170let package = Package (
171171 name : " MyPackage" ,
172172 dependencies : [
173- .package (url : " https://github.com/stleamist/BetterSafariView.git" , .upToNextMajor (from : " 2.2.1 " ))
173+ .package (url : " https://github.com/stleamist/BetterSafariView.git" , .upToNextMajor (from : " 2.2.2 " ))
174174 ],
175175 targets : [
176176 .target (name : " MyTarget" , dependencies : [" BetterSafariView" ])
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ struct SafariViewPresenter<Item: Identifiable>: UIViewControllerRepresentable {
2020 }
2121
2222 func updateUIViewController( _ uiViewController: UIViewController , context: Context ) {
23+
24+ // Keep the coordinator updated with a new presenter struct.
25+ context. coordinator. parent = self
2326 context. coordinator. item = item
2427 }
2528}
@@ -30,7 +33,7 @@ extension SafariViewPresenter {
3033
3134 // MARK: Parent Copying
3235
33- private var parent : SafariViewPresenter
36+ var parent : SafariViewPresenter
3437
3538 init ( parent: SafariViewPresenter ) {
3639 self . parent = parent
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ struct WebAuthenticationPresenter<Item: Identifiable>: UIViewControllerRepresent
2626 // INFO: `SFAuthenticationViewController` is a private subclass of `SFSafariViewController`.
2727 context. coordinator. setInteractiveDismissalDelegateIfPossible ( )
2828
29+ // Keep the coordinator updated with a new presenter struct.
30+ context. coordinator. parent = self
2931 context. coordinator. item = item
3032 }
3133}
@@ -36,7 +38,7 @@ extension WebAuthenticationPresenter {
3638
3739 // MARK: Parent Copying
3840
39- private var parent : WebAuthenticationPresenter
41+ var parent : WebAuthenticationPresenter
4042
4143 init ( parent: WebAuthenticationPresenter ) {
4244 self . parent = parent
You can’t perform that action at this time.
0 commit comments