diff --git a/Gigya.podspec b/Gigya.podspec index b6b0c3d3..b4460719 100644 --- a/Gigya.podspec +++ b/Gigya.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Gigya' - spec.version = '1.5.0' + spec.version = '1.5.1' 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.0' } + spec.source = { :git => 'https://github.com/SAP/gigya-swift-sdk.git', :tag => 'core/v1.5.1' } spec.module_name = 'Gigya' spec.swift_version = '5.3' diff --git a/GigyaSwift.xcodeproj/project.pbxproj b/GigyaSwift.xcodeproj/project.pbxproj index 2a9f74a6..6fc67e05 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.0; + MARKETING_VERSION = 1.5.1; MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; ONLY_ACTIVE_ARCH = NO; @@ -2651,7 +2651,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.5.0; + MARKETING_VERSION = 1.5.1; MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; ONLY_ACTIVE_ARCH = NO; diff --git a/GigyaSwift/Gigya/GigyaCore.swift b/GigyaSwift/Gigya/GigyaCore.swift index 20b53e04..a9735ab5 100644 --- a/GigyaSwift/Gigya/GigyaCore.swift +++ b/GigyaSwift/Gigya/GigyaCore.swift @@ -438,10 +438,6 @@ public final class GigyaCore: GigyaInstanceProtocol { pluginViewWrapper = PluginViewWrapper(config: config, persistenceService: persistenceService, sessionService: sessionService, businessApiService: businessApiService, webBridge: webBridge, plugin: "accounts.screenSet", params: params, completion: completion) pluginViewWrapper?.presentPluginController(viewController: viewController, dataType: T.self, screenSet: name) - - pluginViewWrapper?.didFinish = { [weak self] in - self?.pluginViewWrapper = nil - } } // MARK: - Interruptions diff --git a/GigyaSwift/Global/Plugins/PluginViewWrapper.swift b/GigyaSwift/Global/Plugins/PluginViewWrapper.swift index 89524196..76ef6a8c 100644 --- a/GigyaSwift/Global/Plugins/PluginViewWrapper.swift +++ b/GigyaSwift/Global/Plugins/PluginViewWrapper.swift @@ -32,8 +32,6 @@ class PluginViewWrapper: PluginViewWrapperProtocol { var eventHandler: ((GigyaPluginEvent) -> Void)? - var didFinish: () -> Void = { } - init(config: GigyaConfig, persistenceService: PersistenceService, sessionService: SessionServiceProtocol, businessApiService: BusinessApiServiceProtocol, webBridge: GigyaWebBridge, plugin: String, params: [String: Any], completion: @escaping (GigyaPluginEvent) -> Void) { self.config = config @@ -76,7 +74,6 @@ class PluginViewWrapper: PluginViewWrapperProtocol { self?.webBridge?.viewController = nil self?.webBridge = nil self?.completion(result) - self?.didFinish() default: break } diff --git a/GigyaSwift/Global/Plugins/WebBridgeManager/WebBridgeInterruptionManager.swift b/GigyaSwift/Global/Plugins/WebBridgeManager/WebBridgeInterruptionManager.swift index c97eb66c..e0fe20b0 100644 --- a/GigyaSwift/Global/Plugins/WebBridgeManager/WebBridgeInterruptionManager.swift +++ b/GigyaSwift/Global/Plugins/WebBridgeManager/WebBridgeInterruptionManager.swift @@ -20,6 +20,8 @@ protocol WebBridgeInterruptionResolverFactoryProtocol { class WebBridgeInterruptionManager: WebBridgeInterruptionResolverFactoryProtocol { private let busnessApi: BusinessApiDelegate + + private let accountService: AccountServiceProtocol private var resolver: WebBridgeResolver? @@ -31,12 +33,14 @@ class WebBridgeInterruptionManager: WebBridgeInterruptionResolverFactoryProtocol } } - init(busnessApi: BusinessApiDelegate) { + init(busnessApi: BusinessApiDelegate, accountService: AccountServiceProtocol) { self.busnessApi = busnessApi + self.accountService = accountService } func responseManager(apiMethod: String, params: [String: String], data: T, completion: @escaping (GigyaPluginEvent) -> Void) { guard let resolver = resolver else { + accountService.account = data completion(.onLogin(account: data)) return } diff --git a/GigyaSwift/Global/Utils/GigyaIOCContainer.swift b/GigyaSwift/Global/Utils/GigyaIOCContainer.swift index 0493cf20..2c1aad55 100644 --- a/GigyaSwift/Global/Utils/GigyaIOCContainer.swift +++ b/GigyaSwift/Global/Utils/GigyaIOCContainer.swift @@ -185,8 +185,9 @@ final class GigyaIOCContainer: GigyaContainerProtocol { container.register(service: WebBridgeInterruptionResolverFactoryProtocol.self) { resolver in let businessService = resolver.resolve(BusinessApiDelegate.self) + let accountService = resolver.resolve(AccountServiceProtocol.self) - return WebBridgeInterruptionManager(busnessApi: businessService!) + return WebBridgeInterruptionManager(busnessApi: businessService!, accountService: accountService!) } container.register(service: GigyaCore.self) { resolver in diff --git a/GigyaSwift/Models/Config/InternalConfig.swift b/GigyaSwift/Models/Config/InternalConfig.swift index f9ee4967..61ef6d38 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.0" + internal static let version = "\(GigyaDefinitions.versionPrefix ?? "")ios_swift_1.5.1" internal static let sdkDomain = "com.gigya.GigyaSDK" internal static let defaultLang = "en" }