Skip to content

Commit

Permalink
Merge pull request #96 from xendit/release/3.10.3
Browse files Browse the repository at this point in the history
Fix memory leak on WebViewController
  • Loading branch information
ahmadAlfhajri authored Dec 24, 2024
2 parents dc8b5bd + 1d8c7e3 commit 2bb03b3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Note that starting version 3.10.0, it requires minimum version of iOS 11. If you
Add this to your Podfile.

```ruby
pod 'Xendit', '~> 3.10.2'
pod 'Xendit', '~> 3.10.3'
```

**Important:** Import SDK in Objective-C project with CocoaPods integration, you can do as following
Expand Down
2 changes: 1 addition & 1 deletion Sources/Xendit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.10.2</string>
<string>3.10.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class AuthenticationProvider: AuthenticationProviderProtocol {
func authenticate(fromViewController: UIViewController, URL: String, authentication: XenditAuthentication, completion: @escaping (XenditAuthentication?, XenditError?) -> Void) {
let webViewController = AuthenticationWebViewController(URL: URL)
webViewController.authentication = authentication
webViewController.authenticateCompletion = { updatedAuthentication, error in
webViewController.dismiss(animated: true, completion: nil)
webViewController.authenticateCompletion = { [weak webViewController] updatedAuthentication, error in
webViewController?.dismiss(animated: true, completion: nil)
completion(updatedAuthentication, error)
}
DispatchQueue.main.async {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Xendit/WebViewController/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class CardAuthenticationProvider: CardAuthenticationProviderProtocol {
let webViewController = WebViewController(URL: URL)

webViewController.token = authenticatedToken
webViewController.authenticateCompletion = { (token, error) -> Void in
webViewController.dismiss(animated: true, completion: nil)
webViewController.authenticateCompletion = { [weak webViewController] (token, error) -> Void in
webViewController?.dismiss(animated: true, completion: nil)
guard error == nil else {
return completion(nil, error)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Xendit/XDTApiClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class XDTApiClient {
internal static let CLIENT_TYPE = "SDK";
internal static let CLIENT_API_VERSION = "2.0.0";
internal static let CLIENT_IDENTIFIER = "Xendit iOS SDK";
internal static let CLIENT_SDK_VERSION = "3.10.2";
internal static let CLIENT_SDK_VERSION = "3.10.3";

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

Expand Down
2 changes: 1 addition & 1 deletion Xendit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Xendit'
s.version = '3.10.2'
s.version = '3.10.3'
s.license = 'MIT'
s.homepage = 'https://www.xendit.co'
s.author = { 'Juan Gonzalez’' => '[email protected]' }
Expand Down

0 comments on commit 2bb03b3

Please sign in to comment.