Skip to content

Commit

Permalink
Merge branch 'bug/CXCDC-7076-link-crashed' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sagishm committed Mar 5, 2023
2 parents 65f1f8e + 9af339c commit 58d9a7c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Gigya.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'

Expand Down
4 changes: 2 additions & 2 deletions GigyaSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions GigyaSwift/Gigya/GigyaCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,10 @@ public final class GigyaCore<T: GigyaAccountProtocol>: GigyaInstanceProtocol {
*/

public func showScreenSet(with name: String, viewController: UIViewController, params: [String: Any] = [:], completion: @escaping (GigyaPluginEvent<T>) -> Void) {
var webBridge = createWebBridge()
let webBridge = createWebBridge()

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
Expand Down
3 changes: 0 additions & 3 deletions GigyaSwift/Global/Plugins/PluginViewWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class PluginViewWrapper<T: GigyaAccountProtocol>: PluginViewWrapperProtocol {

var eventHandler: ((GigyaPluginEvent<T>) -> Void)?

var didFinish: () -> Void = { }

init(config: GigyaConfig, persistenceService: PersistenceService, sessionService: SessionServiceProtocol, businessApiService: BusinessApiServiceProtocol, webBridge: GigyaWebBridge<T>,
plugin: String, params: [String: Any], completion: @escaping (GigyaPluginEvent<T>) -> Void) {
self.config = config
Expand Down Expand Up @@ -76,7 +74,6 @@ class PluginViewWrapper<T: GigyaAccountProtocol>: PluginViewWrapperProtocol {
self?.webBridge?.viewController = nil
self?.webBridge = nil
self?.completion(result)
self?.didFinish()
default:
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ protocol WebBridgeInterruptionResolverFactoryProtocol {

class WebBridgeInterruptionManager: WebBridgeInterruptionResolverFactoryProtocol {
private let busnessApi: BusinessApiDelegate

private let accountService: AccountServiceProtocol

private var resolver: WebBridgeResolver?

Expand All @@ -31,12 +33,14 @@ class WebBridgeInterruptionManager: WebBridgeInterruptionResolverFactoryProtocol
}
}

init(busnessApi: BusinessApiDelegate) {
init(busnessApi: BusinessApiDelegate, accountService: AccountServiceProtocol) {
self.busnessApi = busnessApi
self.accountService = accountService
}

func responseManager<T: GigyaAccountProtocol>(apiMethod: String, params: [String: String], data: T, completion: @escaping (GigyaPluginEvent<T>) -> Void) {
guard let resolver = resolver else {
accountService.account = data
completion(.onLogin(account: data))
return
}
Expand Down
3 changes: 2 additions & 1 deletion GigyaSwift/Global/Utils/GigyaIOCContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ final class GigyaIOCContainer<T: GigyaAccountProtocol>: 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<T>.self) { resolver in
Expand Down
2 changes: 1 addition & 1 deletion GigyaSwift/Models/Config/InternalConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 58d9a7c

Please sign in to comment.