We observe a retain cycle between OAuth2Authorizer and OAuth2SFViewControllerDelegate.
This happens because the safari view controller delegate method is not called when the view controller is dismissed programmatically so that safariViewDelegate is not set to nil.
Apple's documentation states that safariViewControllerDidFinish() is only called when the Done button is tapped.
We called open func authorizeEmbedded(from context: AnyObject, params: OAuth2StringDict? = nil, callback: @escaping ((_ authParameters: OAuth2JSON?, _ error: OAuth2Error?) -> Void)) on OAuth2.
We've checked both cases of authorizeEmbeddedAutoDismiss: true and false.
What did you expect to happen?
safariViewDelegate is set to nil when the safari view controller is dismissed programmatically to resolve the retain cycle.
What happened instead?
Safari View Controller is dismissed, but safariViewControllerDidFinish() is not called.
Environment
Xcode Version: 12.5.1 (12E507)
OAuth2: 5.2.0
Deployment Target: iOS 11.4
Base SDK: 14.5
Method of Integration: Swift Package Manager
What did you do?
We observe a retain cycle between
OAuth2Authorizer
andOAuth2SFViewControllerDelegate
. This happens because the safari view controller delegate method is not called when the view controller is dismissed programmatically so thatsafariViewDelegate
is not set to nil. Apple's documentation states thatsafariViewControllerDidFinish()
is only called when the Done button is tapped.We called
open func authorizeEmbedded(from context: AnyObject, params: OAuth2StringDict? = nil, callback: @escaping ((_ authParameters: OAuth2JSON?, _ error: OAuth2Error?) -> Void))
on OAuth2.We've checked both cases of
authorizeEmbeddedAutoDismiss
: true and false.What did you expect to happen?
safariViewDelegate
is set to nil when the safari view controller is dismissed programmatically to resolve the retain cycle.What happened instead?
Safari View Controller is dismissed, but
safariViewControllerDidFinish()
is not called.Environment
Xcode Version: 12.5.1 (12E507) OAuth2: 5.2.0 Deployment Target: iOS 11.4 Base SDK: 14.5 Method of Integration: Swift Package Manager