diff --git a/Gigya.podspec b/Gigya.podspec
index f4e630ca..5e26ae26 100644
--- a/Gigya.podspec
+++ b/Gigya.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'Gigya'
- spec.version = '1.5.4'
+ spec.version = '1.5.5'
spec.license = 'Apache 2.0'
spec.homepage = 'https://developers.gigya.com/display/GD/Swift+SDK'
spec.author = 'Gigya SAP'
@@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
your Swift application
DESC
- spec.source = { :git => 'https://github.com/SAP/gigya-swift-sdk.git', :tag => 'core/v1.5.4' }
+ spec.source = { :git => 'https://github.com/SAP/gigya-swift-sdk.git', :tag => 'core/v1.5.5' }
spec.module_name = 'Gigya'
spec.swift_version = '5.3'
diff --git a/GigyaNss/Flutter/Debug/App.xcframework/Info.plist b/GigyaNss/Flutter/Debug/App.xcframework/Info.plist
index 87cb5cef..cb9b79f4 100644
--- a/GigyaNss/Flutter/Debug/App.xcframework/Info.plist
+++ b/GigyaNss/Flutter/Debug/App.xcframework/Info.plist
@@ -19,6 +19,18 @@
SupportedPlatformVariant
simulator
+
+ LibraryIdentifier
+ ios-arm64
+ LibraryPath
+ App.framework
+ SupportedArchitectures
+
+ arm64
+
+ SupportedPlatform
+ ios
+
CFBundlePackageType
XFWK
diff --git a/GigyaSwift.xcodeproj/project.pbxproj b/GigyaSwift.xcodeproj/project.pbxproj
index 1c703c0e..34f23b74 100644
--- a/GigyaSwift.xcodeproj/project.pbxproj
+++ b/GigyaSwift.xcodeproj/project.pbxproj
@@ -2590,7 +2590,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
- MARKETING_VERSION = 1.5.4;
+ MARKETING_VERSION = 1.5.5;
MODULEMAP_FILE = "";
MODULEMAP_PRIVATE_FILE = "";
ONLY_ACTIVE_ARCH = NO;
@@ -2651,7 +2651,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
- MARKETING_VERSION = 1.5.4;
+ MARKETING_VERSION = 1.5.5;
MODULEMAP_FILE = "";
MODULEMAP_PRIVATE_FILE = "";
ONLY_ACTIVE_ARCH = NO;
diff --git a/GigyaSwift/Gigya/GigyaCore.swift b/GigyaSwift/Gigya/GigyaCore.swift
index 69cbe74f..122745b9 100644
--- a/GigyaSwift/Gigya/GigyaCore.swift
+++ b/GigyaSwift/Gigya/GigyaCore.swift
@@ -399,6 +399,17 @@ public final class GigyaCore: GigyaInstanceProtocol {
businessApiService.removeConnection(providerName: provider, completion: completion)
}
+ /**
+ Remove a social connection from current account.
+
+ - Parameter params: Request parameters.
+ - Parameter completion: Login response `GigyaApiResult`.
+ */
+
+ public func removeConnection(params: [String: Any] = [:], completion: @escaping (GigyaApiResult) -> Void) {
+ businessApiService.removeConnection(params: params, completion: completion)
+ }
+
/**
Get Schema api.
diff --git a/GigyaSwift/Global/Api/BusinessApiService.swift b/GigyaSwift/Global/Api/BusinessApiService.swift
index 3dfb6b0e..1525527e 100644
--- a/GigyaSwift/Global/Api/BusinessApiService.swift
+++ b/GigyaSwift/Global/Api/BusinessApiService.swift
@@ -272,6 +272,13 @@ class BusinessApiService: NSObject, BusinessApiServiceProtocol {
}
}
+ func removeConnection(params: [String: Any], completion: @escaping (GigyaApiResult) -> Void) {
+ GigyaLogger.log(with: self, message: "[removeConnection]: params: \(params)")
+
+ let model = ApiRequestModel(method: GigyaDefinitions.API.removeConnection, params: params)
+ apiService.send(model: model, responseType: GigyaDictionary.self, completion: completion)
+ }
+
func removeConnection(providerName: GigyaSocialProviders, completion: @escaping (GigyaApiResult) -> Void) {
let params = ["provider": providerName.rawValue]
@@ -287,6 +294,7 @@ class BusinessApiService: NSObject, BusinessApiServiceProtocol {
let model = ApiRequestModel(method: GigyaDefinitions.API.logout, params: [:])
apiService.send(model: model, responseType: GigyaDictionary.self) { [weak self] result in
self?.sessionService.clear()
+ self?.sessionService.clearCookies()
self?.biometricService.clearBiometric()
switch result {
diff --git a/GigyaSwift/Global/Api/BusinessApiServiceProtocol.swift b/GigyaSwift/Global/Api/BusinessApiServiceProtocol.swift
index a6322f22..87eda64f 100644
--- a/GigyaSwift/Global/Api/BusinessApiServiceProtocol.swift
+++ b/GigyaSwift/Global/Api/BusinessApiServiceProtocol.swift
@@ -54,6 +54,8 @@ protocol BusinessApiServiceProtocol {
func addConnection(provider: GigyaSocialProviders, viewController: UIViewController, params: [String: Any], dataType: T.Type, completion: @escaping (GigyaApiResult) -> Void)
+ func removeConnection(params: [String: Any], completion: @escaping (GigyaApiResult) -> Void)
+
func removeConnection(providerName: GigyaSocialProviders, completion: @escaping (GigyaApiResult) -> Void)
func logout(completion: @escaping (GigyaApiResult) -> Void)
diff --git a/GigyaSwift/Global/Plugins/GigyaWebBridge.swift b/GigyaSwift/Global/Plugins/GigyaWebBridge.swift
index 5db2582e..f265ca58 100644
--- a/GigyaSwift/Global/Plugins/GigyaWebBridge.swift
+++ b/GigyaSwift/Global/Plugins/GigyaWebBridge.swift
@@ -84,6 +84,11 @@ final public class GigyaWebBridge: NSObject, WKScriptMe
}
GigyaLogger.log(with: self, message: "JS Interface:\n\(JSInterface)")
+
+ if #available(iOS 16.4, *), GigyaLogger.isDebug() {
+ self.webView?.isInspectable = true
+ }
+
}
func load(html: String) {
@@ -372,8 +377,8 @@ final public class GigyaWebBridge: NSObject, WKScriptMe
private func sendRemoveConnectionRequest(callbackId: String, params: [String: String]) {
GigyaLogger.log(with: self, message: "sendRemoveConnectionRequest: with params:\n\(params)")
- if let provider = params["provider"], let providerType = GigyaSocialProviders(rawValue: provider) {
- businessApiService.removeConnection(providerName: providerType) { [weak self] result in
+ if let provider = params["provider"], let _ = GigyaSocialProviders(rawValue: provider) {
+ businessApiService.removeConnection(params: params) { [weak self] result in
guard let self = self else { return }
switch result {
case .success(let data):
diff --git a/GigyaSwift/Global/Session/SessionService.swift b/GigyaSwift/Global/Session/SessionService.swift
index 0adb64e7..c936838f 100644
--- a/GigyaSwift/Global/Session/SessionService.swift
+++ b/GigyaSwift/Global/Session/SessionService.swift
@@ -297,9 +297,6 @@ class SessionService: SessionServiceProtocol {
// clear account from cach
accountService.clear()
- // clear all cookies created in WKWebView
- clearCookies()
-
// clear session from memory
self.session = nil
}
@@ -317,7 +314,7 @@ class SessionService: SessionServiceProtocol {
}
}
- private func clearCookies() {
+ func clearCookies() {
if clearCookiesEnable {
DispatchQueue.main.async {
HTTPCookieStorage.shared.removeCookies(since: .distantPast)
diff --git a/GigyaSwift/Global/Session/SessionServiceProtocol.swift b/GigyaSwift/Global/Session/SessionServiceProtocol.swift
index b8822696..58898392 100644
--- a/GigyaSwift/Global/Session/SessionServiceProtocol.swift
+++ b/GigyaSwift/Global/Session/SessionServiceProtocol.swift
@@ -27,6 +27,8 @@ public protocol SessionServiceProtocol {
func clear(completion: @escaping () -> Void)
func clearSession()
+
+ func clearCookies()
func setClearCookies(to value: Bool)
diff --git a/GigyaSwift/Models/Config/InternalConfig.swift b/GigyaSwift/Models/Config/InternalConfig.swift
index 55d93a41..cd2c65b6 100644
--- a/GigyaSwift/Models/Config/InternalConfig.swift
+++ b/GigyaSwift/Models/Config/InternalConfig.swift
@@ -10,7 +10,7 @@ import Foundation
struct InternalConfig {
struct General {
- internal static let version = "\(GigyaDefinitions.versionPrefix ?? "")ios_swift_1.5.4"
+ internal static let version = "\(GigyaDefinitions.versionPrefix ?? "")ios_swift_1.5.5"
internal static let sdkDomain = "com.gigya.GigyaSDK"
internal static let defaultLang = "en"
}
diff --git a/GigyaSwiftTests/Services/SessionServiceMock.swift b/GigyaSwiftTests/Services/SessionServiceMock.swift
index f315975e..1654a27f 100644
--- a/GigyaSwiftTests/Services/SessionServiceMock.swift
+++ b/GigyaSwiftTests/Services/SessionServiceMock.swift
@@ -43,5 +43,7 @@ class SessionServiceMock: SessionServiceProtocol {
}
-
+ func clearCookies() {
+
+ }
}