Skip to content

Commit 2bb03b3

Browse files
Merge pull request #96 from xendit/release/3.10.3
Fix memory leak on WebViewController
2 parents dc8b5bd + 1d8c7e3 commit 2bb03b3

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Note that starting version 3.10.0, it requires minimum version of iOS 11. If you
1919
Add this to your Podfile.
2020

2121
```ruby
22-
pod 'Xendit', '~> 3.10.2'
22+
pod 'Xendit', '~> 3.10.3'
2323
```
2424

2525
**Important:** Import SDK in Objective-C project with CocoaPods integration, you can do as following

Sources/Xendit/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.10.2</string>
18+
<string>3.10.3</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Sources/Xendit/WebViewController/AuthenticationWebviewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class AuthenticationProvider: AuthenticationProviderProtocol {
1919
func authenticate(fromViewController: UIViewController, URL: String, authentication: XenditAuthentication, completion: @escaping (XenditAuthentication?, XenditError?) -> Void) {
2020
let webViewController = AuthenticationWebViewController(URL: URL)
2121
webViewController.authentication = authentication
22-
webViewController.authenticateCompletion = { updatedAuthentication, error in
23-
webViewController.dismiss(animated: true, completion: nil)
22+
webViewController.authenticateCompletion = { [weak webViewController] updatedAuthentication, error in
23+
webViewController?.dismiss(animated: true, completion: nil)
2424
completion(updatedAuthentication, error)
2525
}
2626
DispatchQueue.main.async {

Sources/Xendit/WebViewController/WebViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class CardAuthenticationProvider: CardAuthenticationProviderProtocol {
2020
let webViewController = WebViewController(URL: URL)
2121

2222
webViewController.token = authenticatedToken
23-
webViewController.authenticateCompletion = { (token, error) -> Void in
24-
webViewController.dismiss(animated: true, completion: nil)
23+
webViewController.authenticateCompletion = { [weak webViewController] (token, error) -> Void in
24+
webViewController?.dismiss(animated: true, completion: nil)
2525
guard error == nil else {
2626
return completion(nil, error)
2727
}

Sources/Xendit/XDTApiClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class XDTApiClient {
3838
internal static let CLIENT_TYPE = "SDK";
3939
internal static let CLIENT_API_VERSION = "2.0.0";
4040
internal static let CLIENT_IDENTIFIER = "Xendit iOS SDK";
41-
internal static let CLIENT_SDK_VERSION = "3.10.2";
41+
internal static let CLIENT_SDK_VERSION = "3.10.3";
4242

4343
private static let WEBAPI_FLEX_BASE_URL = "https://sandbox.webapi.visa.com"
4444

Xendit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Xendit'
3-
s.version = '3.10.2'
3+
s.version = '3.10.3'
44
s.license = 'MIT'
55
s.homepage = 'https://www.xendit.co'
66
s.author = { 'Juan Gonzalez’' => '[email protected]' }

0 commit comments

Comments
 (0)