diff --git a/Gigya.podspec b/Gigya.podspec
index 0fbbb23a..69e44592 100644
--- a/Gigya.podspec
+++ b/Gigya.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'Gigya'
- spec.version = '1.5.10'
+ spec.version = '1.6.0'
spec.license = 'Apache 2.0'
spec.homepage = 'https://developers.gigya.com/display/GD/Swift+SDK'
spec.author = 'Gigya SAP'
@@ -10,15 +10,17 @@ Pod::Spec.new do |spec|
your Swift application
DESC
- spec.source = { :git => 'https://github.com/SAP/gigya-swift-sdk.git', :tag => 'core/v1.5.10' }
+ spec.source = { :git => 'https://github.com/SAP/gigya-swift-sdk.git', :tag => 'core/v1.6.0' }
spec.module_name = 'Gigya'
spec.swift_version = '5.3'
# spec.platform = :ios
- spec.ios.deployment_target = '10.0'
+ spec.ios.deployment_target = '11.0'
spec.source_files = 'GigyaSwift/*/*.swift', 'GigyaSwift/*/*/*.swift', 'GigyaSwift/*/*/*/*.swift', 'GigyaSwift/*/*/*/*/*.swift'
-
+ spec.resource_bundle = {
+ "Gigya_Privacy" => "GigyaSwift/PrivacyInfo.xcprivacy"
+ }
spec.framework = 'SystemConfiguration'
spec.library = 'c++', 'z'
diff --git a/GigyaAuth/PrivacyInfo.xcprivacy b/GigyaAuth/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000..172c0081
--- /dev/null
+++ b/GigyaAuth/PrivacyInfo.xcprivacy
@@ -0,0 +1,23 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPITypeReasons
+
+ CA92.1
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryUserDefaults
+
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+
+
diff --git a/GigyaSwift.xcodeproj/project.pbxproj b/GigyaSwift.xcodeproj/project.pbxproj
index 32e877e1..f10d1c85 100644
--- a/GigyaSwift.xcodeproj/project.pbxproj
+++ b/GigyaSwift.xcodeproj/project.pbxproj
@@ -61,10 +61,6 @@
E713E0FE2248C83D00181328 /* GigyaConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713E0FD2248C83D00181328 /* GigyaConfig.swift */; };
E713E1022248E41400181328 /* GigyaRequestSignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713E1012248E41400181328 /* GigyaRequestSignature.swift */; };
E713E18C224A2E5800181328 /* NetworkAdapterMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713E18B224A2E5800181328 /* NetworkAdapterMock.swift */; };
- E71611F02B54077C0054D4B7 /* App.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82328BB55240035DDEA /* App.xcframework */; };
- E71611F12B54077C0054D4B7 /* App.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82328BB55240035DDEA /* App.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- E71611F22B54077C0054D4B7 /* Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82428BB55240035DDEA /* Flutter.xcframework */; };
- E71611F32B54077C0054D4B7 /* Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82428BB55240035DDEA /* Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E719373622D32FB800CD149E /* BiometricService.swift in Sources */ = {isa = PBXBuildFile; fileRef = E719373522D32FB800CD149E /* BiometricService.swift */; };
E719373822D33F1F00CD149E /* BiometricServiceInternalProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E719373722D33F1F00CD149E /* BiometricServiceInternalProtocol.swift */; };
E719373A22D33F3700CD149E /* BiometricServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E719373922D33F3700CD149E /* BiometricServiceProtocol.swift */; };
@@ -107,6 +103,7 @@
E7337467226C538300ADEDBB /* DecodeTestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7337466226C538300ADEDBB /* DecodeTestUtils.swift */; };
E735C2F822B7DBF7007A055E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E735C2F722B7DBF7007A055E /* GoogleService-Info.plist */; };
E73A930222F974120004F93E /* Notification.Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = E73A930122F974120004F93E /* Notification.Name.swift */; };
+ E73F8BD52B9F4BB100E11B48 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = E73F8BD42B9EF71400E11B48 /* PrivacyInfo.xcprivacy */; };
E741B4CD271420AB00BF693F /* SsoLoginWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E741B4CC271420AA00BF693F /* SsoLoginWrapper.swift */; };
E741DCE12771DDF400E46223 /* TestSsoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E741DCE02771DDF400E46223 /* TestSsoApp.swift */; };
E741DCE32771DDF400E46223 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E741DCE22771DDF400E46223 /* ContentView.swift */; };
@@ -166,6 +163,10 @@
E7ACF9AE226C843100900C65 /* SessionServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ACF9AD226C843100900C65 /* SessionServiceProtocol.swift */; };
E7ACF9B0226C844A00900C65 /* AccountServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ACF9AF226C844A00900C65 /* AccountServiceProtocol.swift */; };
E7ACF9CC226F2A4100900C65 /* ProviderWrapperProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ACF9CB226F2A4100900C65 /* ProviderWrapperProtocol.swift */; };
+ E7B16EAC2BA045EE005DD81E /* App.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82328BB55240035DDEA /* App.xcframework */; };
+ E7B16EAD2BA045EE005DD81E /* App.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82328BB55240035DDEA /* App.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ E7B16EAE2BA045EE005DD81E /* Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82428BB55240035DDEA /* Flutter.xcframework */; };
+ E7B16EAF2BA045EE005DD81E /* Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E732A82428BB55240035DDEA /* Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E7B2FA9525F0FAF6002A7010 /* GigyaSchema.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2FA9425F0FAF6002A7010 /* GigyaSchema.swift */; };
E7B4D69C238329F50090E57D /* PushNotificationsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = E720D34B2382D32300446EA4 /* PushNotificationsService.swift */; };
E7B5408A23952E2200C0C8D8 /* UserNotificationCenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B5408923952E2200C0C8D8 /* UserNotificationCenterProtocol.swift */; };
@@ -318,9 +319,9 @@
E76B94F8285089D100E63E3B /* GigyaAuth.framework in Embed Frameworks */,
E732A83028BB62720035DDEA /* (null) in Embed Frameworks */,
E7A5329A2AE7B039005F3662 /* GigyaTfa.xcframework in Embed Frameworks */,
- E71611F32B54077C0054D4B7 /* Flutter.xcframework in Embed Frameworks */,
+ E7B16EAF2BA045EE005DD81E /* Flutter.xcframework in Embed Frameworks */,
E76B94FA285089EF00E63E3B /* GigyaNss.framework in Embed Frameworks */,
- E71611F12B54077C0054D4B7 /* App.xcframework in Embed Frameworks */,
+ E7B16EAD2BA045EE005DD81E /* App.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -438,6 +439,7 @@
E73C8A412430F69F0064EFE1 /* GigyaNssEngine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaNssEngine.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E73C8A442430F6B60064EFE1 /* GigyaNssEngine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaNssEngine.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E73C8A472430F6BB0064EFE1 /* GigyaNss.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaNss.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ E73F8BD42B9EF71400E11B48 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; };
E741B4CC271420AA00BF693F /* SsoLoginWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SsoLoginWrapper.swift; sourceTree = ""; };
E741DCBC2770F72F00E46223 /* GigyaTfa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaTfa.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E741DCBF2770F79B00E46223 /* GigyaTfa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaTfa.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -682,11 +684,11 @@
files = (
E7DC2C6D2280778000A13426 /* libc++.tbd in Frameworks */,
E7DC2C6C2280771700A13426 /* libz.tbd in Frameworks */,
- E71611F02B54077C0054D4B7 /* App.xcframework in Frameworks */,
+ E7B16EAC2BA045EE005DD81E /* App.xcframework in Frameworks */,
E7A532992AE7B039005F3662 /* GigyaTfa.xcframework in Frameworks */,
E76B94F7285089D100E63E3B /* GigyaAuth.framework in Frameworks */,
E76B94F9285089EF00E63E3B /* GigyaNss.framework in Frameworks */,
- E71611F22B54077C0054D4B7 /* Flutter.xcframework in Frameworks */,
+ E7B16EAE2BA045EE005DD81E /* Flutter.xcframework in Frameworks */,
E7DC2C6B228076E600A13426 /* libsqlite3.tbd in Frameworks */,
E73373F522633BDA00ADEDBB /* SafariServices.framework in Frameworks */,
E731B72D232A53AD0032E111 /* AuthenticationServices.framework in Frameworks */,
@@ -1148,6 +1150,7 @@
E7CBB03E223561A8000B6C11 /* Gigya */,
E7BE36772224219200A108D9 /* Info.plist */,
E7BE36762224219200A108D9 /* GigyaSwift.h */,
+ E73F8BD42B9EF71400E11B48 /* PrivacyInfo.xcprivacy */,
E7818A6B222445F8008117AB /* Config.xcconfig */,
);
path = GigyaSwift;
@@ -1788,6 +1791,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ E73F8BD52B9F4BB100E11B48 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1860,7 +1864,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# set framework folder name\nFRAMEWORK_FOLDER_NAME=\"${PROJECT_NAME}_XCFramework\"\n# set framework name or read it from project by this variable\nFRAMEWORK_NAME=\"GigyaSwift.xcworkspace\"\nFRAMEWORK_SCHEMA=\"Gigya\"\n\n#xcframework path\nFRAMEWORK_PATH=\"${PROJECT_DIR}/XC/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_SCHEMA}.xcframework\"\n# set path for iOS simulator archive\nSIMULATOR_ARCHIVE_PATH=\"${PROJECT_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive\"\n# set path for iOS device archive\nIOS_DEVICE_ARCHIVE_PATH=\"${PROJECT_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive\"\nrm -rf \"${PROJECT_DIR}/XC/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_SCHEMA}\"\necho \"Deleted ${FRAMEWORK_FOLDER_NAME}\"\nmkdir \"${FRAMEWORK_FOLDER_NAME}\"\necho \"Created ${FRAMEWORK_FOLDER_NAME}\"\necho \"Archiving ${FRAMEWORK_NAME}\"\n\nxcodebuild archive -workspace \"${FRAMEWORK_NAME}\" -scheme ${FRAMEWORK_SCHEMA} -destination=\"iOS Simulator\" -archivePath \"${SIMULATOR_ARCHIVE_PATH}\" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES\n\nxcodebuild archive -workspace \"${FRAMEWORK_NAME}\" -scheme ${FRAMEWORK_SCHEMA} -destination=\"iOS\" -archivePath \"${IOS_DEVICE_ARCHIVE_PATH}\" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES\n#Creating XCFramework\nxcodebuild -create-xcframework -framework ${SIMULATOR_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_SCHEMA}.framework -framework ${IOS_DEVICE_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_SCHEMA}.framework -output \"${FRAMEWORK_PATH}\"\nrm -rf \"${SIMULATOR_ARCHIVE_PATH}\"\nrm -rf \"${IOS_DEVICE_ARCHIVE_PATH}\"\nopen \"${PROJECT_DIR}/XC/${FRAMEWORK_FOLDER_NAME}\"\n\n/opt/homebrew/bin/go run \"${PROJECT_DIR}/XC/fixer/fixer.go\" \"${FRAMEWORK_PATH}\"\n";
+ shellScript = "# set framework folder name\nFRAMEWORK_FOLDER_NAME=\"${PROJECT_NAME}_XCFramework\"\n# set framework name or read it from project by this variable\nFRAMEWORK_NAME=\"GigyaSwift.xcworkspace\"\nFRAMEWORK_SCHEMA=\"Gigya\"\n\n#xcframework path\nFRAMEWORK_PATH=\"${PROJECT_DIR}/XC/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_SCHEMA}.xcframework\"\n# set path for iOS simulator archive\nSIMULATOR_ARCHIVE_PATH=\"${PROJECT_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive\"\n# set path for iOS device archive\nIOS_DEVICE_ARCHIVE_PATH=\"${PROJECT_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive\"\nrm -rf \"${PROJECT_DIR}/XC/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_SCHEMA}\"\necho \"Deleted ${FRAMEWORK_FOLDER_NAME}\"\nmkdir \"${FRAMEWORK_FOLDER_NAME}\"\necho \"Created ${FRAMEWORK_FOLDER_NAME}\"\necho \"Archiving ${FRAMEWORK_NAME}\"\n\nxcodebuild archive -workspace \"${FRAMEWORK_NAME}\" -scheme ${FRAMEWORK_SCHEMA} -destination=\"iOS Simulator\" -archivePath \"${SIMULATOR_ARCHIVE_PATH}\" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES\n\nxcodebuild archive -workspace \"${FRAMEWORK_NAME}\" -scheme ${FRAMEWORK_SCHEMA} -destination=\"iOS\" -archivePath \"${IOS_DEVICE_ARCHIVE_PATH}\" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES\n#Creating XCFramework\nxcodebuild -create-xcframework -framework ${SIMULATOR_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_SCHEMA}.framework -framework ${IOS_DEVICE_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_SCHEMA}.framework -output \"${FRAMEWORK_PATH}\"\ncodesign --timestamp -v --sign \"Apple Development: Sagi Shmuel (M54M22QGDP)\" ${FRAMEWORK_NAME}.xcframework\n\nrm -rf \"${SIMULATOR_ARCHIVE_PATH}\"\nrm -rf \"${IOS_DEVICE_ARCHIVE_PATH}\"\nopen \"${PROJECT_DIR}/XC/${FRAMEWORK_FOLDER_NAME}\"\n\n/opt/homebrew/bin/go run \"${PROJECT_DIR}/XC/fixer/fixer.go\" \"${FRAMEWORK_PATH}\"\n";
};
EB7918E424CC7E8B9A7E4C27 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
@@ -2579,7 +2583,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
- "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development: Sagi Shmuel (M54M22QGDP)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 140;
DEFINES_MODULE = YES;
@@ -2601,7 +2605,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
- MARKETING_VERSION = 1.5.10;
+ MARKETING_VERSION = 1.6.0;
MODULEMAP_FILE = "";
MODULEMAP_PRIVATE_FILE = "";
ONLY_ACTIVE_ARCH = NO;
@@ -2640,7 +2644,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
- "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development: Sagi Shmuel (M54M22QGDP)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 140;
DEFINES_MODULE = YES;
@@ -2662,7 +2666,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
- MARKETING_VERSION = 1.5.10;
+ MARKETING_VERSION = 1.6.0;
MODULEMAP_FILE = "";
MODULEMAP_PRIVATE_FILE = "";
ONLY_ACTIVE_ARCH = NO;
diff --git a/GigyaSwift.xcworkspace/xcuserdata/i507698.xcuserdatad/IDEFindNavigatorScopes.plist b/GigyaSwift.xcworkspace/xcuserdata/i507698.xcuserdatad/IDEFindNavigatorScopes.plist
new file mode 100644
index 00000000..5dd5da85
--- /dev/null
+++ b/GigyaSwift.xcworkspace/xcuserdata/i507698.xcuserdatad/IDEFindNavigatorScopes.plist
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/GigyaSwift/Gigya/GigyaCore.swift b/GigyaSwift/Gigya/GigyaCore.swift
index ebc1caa0..8993e823 100644
--- a/GigyaSwift/Gigya/GigyaCore.swift
+++ b/GigyaSwift/Gigya/GigyaCore.swift
@@ -151,7 +151,7 @@ public final class GigyaCore: GigyaInstanceProtocol {
public func isLoggedIn() -> Bool {
return sessionService.isValidSession()
}
-
+
/**
Set session.
diff --git a/GigyaSwift/Global/Api/ApiService.swift b/GigyaSwift/Global/Api/ApiService.swift
index 64c6e0f4..a007afb7 100644
--- a/GigyaSwift/Global/Api/ApiService.swift
+++ b/GigyaSwift/Global/Api/ApiService.swift
@@ -30,7 +30,12 @@ final class ApiService: ApiServiceProtocol {
func getSDKConfig() {
persistenceService.isStartSdk = true
-
+
+ if let refreshTime = persistenceService.idsRefreshTime,
+ refreshTime > Date().millisecondsSince1970 {
+ return
+ }
+
let params = ["include": "permissions,ids,appIds"]
let model = ApiRequestModel(method: GigyaDefinitions.API.getSdkConfig, params: params)
diff --git a/GigyaSwift/Global/Api/BusinessApiService.swift b/GigyaSwift/Global/Api/BusinessApiService.swift
index f0e59b38..c64d7aaa 100644
--- a/GigyaSwift/Global/Api/BusinessApiService.swift
+++ b/GigyaSwift/Global/Api/BusinessApiService.swift
@@ -125,7 +125,7 @@ class BusinessApiService: NSObject, BusinessApiServiceProtocol {
let regToken = data["regToken"]?.value ?? ""
let makeParams: [String: Any] = ["email": email, "password": password, "regToken": regToken, "finalizeRegistration": "true"].merging(params) { $1 }
- let model = ApiRequestModel(method: GigyaDefinitions.API.register, params: makeParams)
+ let model = ApiRequestModel(method: GigyaDefinitions.API.register, params: makeParams, config: self?.config)
self?.apiService.send(model: model, responseType: T.self) { result in
switch result {
@@ -232,7 +232,7 @@ class BusinessApiService: NSObject, BusinessApiServiceProtocol {
var params: [String: Any] = params
params["loginID"] = UID
- let model = ApiRequestModel(method: GigyaDefinitions.API.verifyLogin, params: params)
+ let model = ApiRequestModel(method: GigyaDefinitions.API.verifyLogin, params: params, config: config)
apiService.send(model: model, responseType: T.self) { result in
switch result {
diff --git a/GigyaSwift/Global/PersistenceService.swift b/GigyaSwift/Global/PersistenceService.swift
index 3dbf2cb8..3844decc 100644
--- a/GigyaSwift/Global/PersistenceService.swift
+++ b/GigyaSwift/Global/PersistenceService.swift
@@ -25,6 +25,12 @@ public final class PersistenceService {
return UserDefaults.standard.string(forKey: InternalConfig.Storage.UCID)
}
}
+
+ internal var idsRefreshTime: Double? {
+ get {
+ return UserDefaults.standard.double(forKey: InternalConfig.Storage.idsRefreshTime)
+ }
+ }
internal var hasRunBefore: Bool? {
get {
@@ -74,6 +80,7 @@ public final class PersistenceService {
internal func save(ids: InitSdkIdsModel) {
UserDefaults.standard.setValue(ids.gcid, forKey: InternalConfig.Storage.GMID)
UserDefaults.standard.setValue(ids.ucid, forKey: InternalConfig.Storage.UCID)
+ UserDefaults.standard.setValue(ids.refreshTime, forKey: InternalConfig.Storage.idsRefreshTime)
}
internal func setBiometricEnable(to allow: Bool) {
diff --git a/GigyaSwift/Global/Session/SessionService.swift b/GigyaSwift/Global/Session/SessionService.swift
index c936838f..25e1402e 100644
--- a/GigyaSwift/Global/Session/SessionService.swift
+++ b/GigyaSwift/Global/Session/SessionService.swift
@@ -120,7 +120,7 @@ class SessionService: SessionServiceProtocol {
gsession.sessionExpirationTimestamp = sessionExpirationTimestamp
}
- let data = NSKeyedArchiver.archivedData(withRootObject: gsession)
+ let data = try? NSKeyedArchiver.archivedData(withRootObject: gsession, requiringSecureCoding: true)
self?.keychainHelper.add(with: InternalConfig.Storage.keySession, data: data) { [weak self] err in
GigyaLogger.log(with: self, message: "[setSession]: \(err)")
@@ -182,7 +182,7 @@ class SessionService: SessionServiceProtocol {
func setSessionAs(biometric: Bool, completion: @escaping (GigyaBiometricResult) -> Void) {
guard let session = session else { return }
- let data = NSKeyedArchiver.archivedData(withRootObject: session)
+ let data = try? NSKeyedArchiver.archivedData(withRootObject: session, requiringSecureCoding: true)
var mode: KeychainMode = .regular
diff --git a/GigyaSwift/Global/Session/SessionVerificationService.swift b/GigyaSwift/Global/Session/SessionVerificationService.swift
index e4bb6c61..27691ce3 100644
--- a/GigyaSwift/Global/Session/SessionVerificationService.swift
+++ b/GigyaSwift/Global/Session/SessionVerificationService.swift
@@ -90,6 +90,7 @@ class SessionVerificationService: SessionVerificationServiceProtocol {
}
})
})
+ sessionLifeCountdownTimer?.fire()
}
func stop() {
diff --git a/GigyaSwift/Global/Utils/GeneralUtils.swift b/GigyaSwift/Global/Utils/GeneralUtils.swift
index 13dc68fd..6e81db09 100644
--- a/GigyaSwift/Global/Utils/GeneralUtils.swift
+++ b/GigyaSwift/Global/Utils/GeneralUtils.swift
@@ -87,3 +87,9 @@ extension Data {
return self.base64EncodedString().replacingOccurrences(of: "+", with: "-").replacingOccurrences(of: "/", with: "_").replacingOccurrences(of: "=", with: "")
}
}
+
+extension Date {
+ internal var millisecondsSince1970: Double {
+ Double((self.timeIntervalSince1970 * 1000.0).rounded())
+ }
+}
diff --git a/GigyaSwift/Models/Config/InitSdkResponseModel.swift b/GigyaSwift/Models/Config/InitSdkResponseModel.swift
index 419eb53b..b07a2052 100644
--- a/GigyaSwift/Models/Config/InitSdkResponseModel.swift
+++ b/GigyaSwift/Models/Config/InitSdkResponseModel.swift
@@ -15,4 +15,5 @@ struct InitSdkResponseModel: Codable {
struct InitSdkIdsModel: Codable {
let ucid: String
let gcid: String
+ let refreshTime: Double?
}
diff --git a/GigyaSwift/Models/Config/InternalConfig.swift b/GigyaSwift/Models/Config/InternalConfig.swift
index c426d8ce..77fffc05 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.10"
+ internal static let version = "\(GigyaDefinitions.versionPrefix ?? "")ios_swift_1.6.0"
internal static let sdkDomain = "com.gigya.GigyaSDK"
internal static let defaultLang = "en"
}
@@ -25,6 +25,7 @@ struct InternalConfig {
// UserDefaults objects
internal static let UCID = "com.gigya.GigyaSDK:ucid"
internal static let GMID = "com.gigya.GigyaSDK:gmid"
+ internal static let idsRefreshTime = "com.gigya.GigyaSDK:idsRefreshTime"
internal static let biometricAllow = "com.gigya.GigyaSDK:biometricAllow"
internal static let biometricLocked = "com.gigya.GigyaSDK:biometricLocked"
internal static let hasRunBefore = "com.gigya.GigyaSDK:hasRunBefore"
diff --git a/GigyaSwift/PrivacyInfo.xcprivacy b/GigyaSwift/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000..172c0081
--- /dev/null
+++ b/GigyaSwift/PrivacyInfo.xcprivacy
@@ -0,0 +1,23 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPITypeReasons
+
+ CA92.1
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryUserDefaults
+
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+
+
diff --git a/GigyaSwift/Storage/KeychainStorage.swift b/GigyaSwift/Storage/KeychainStorage.swift
index f5362a00..bef42887 100644
--- a/GigyaSwift/Storage/KeychainStorage.swift
+++ b/GigyaSwift/Storage/KeychainStorage.swift
@@ -88,7 +88,7 @@ internal class KeychainStorageFactory {
var session: T?
if #available(iOS 11.0, *) {
do {
- session = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [T.self, NSString.self], from: data) as? T
+ session = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [T.self, NSString.self, NSNumber.self], from: data) as? T
} catch (let error) {
GigyaLogger.log(with: self, message: "[getSession]: failed unarchiveObject session - \(error.localizedDescription) ")
}
diff --git a/GigyaTfa/PrivacyInfo.xcprivacy b/GigyaTfa/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000..172c0081
--- /dev/null
+++ b/GigyaTfa/PrivacyInfo.xcprivacy
@@ -0,0 +1,23 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPITypeReasons
+
+ CA92.1
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryUserDefaults
+
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+
+
diff --git a/Package.swift b/Package.swift
index 3d21a62c..8408425b 100644
--- a/Package.swift
+++ b/Package.swift
@@ -31,16 +31,28 @@ let package = Package(
name: "Gigya",
dependencies: [],
path: "GigyaSwift",
- exclude: ["Info.plist", "README.md", "Config.xcconfig"]),
+ exclude: ["Info.plist", "README.md", "Config.xcconfig"],
+ resources: [
+ .process("PrivacyInfo.xcprivacy")
+ ]
+ ),
.target(
name: "GigyaTfa",
dependencies: ["Gigya"],
path: "GigyaTfa",
- exclude: ["GigyaTfa/Info.plist", "README.md"]),
+ exclude: ["GigyaTfa/Info.plist", "README.md"],
+ resources: [
+ .process("PrivacyInfo.xcprivacy")
+ ]
+ ),
.target(
name: "GigyaAuth",
dependencies: ["Gigya"],
path: "GigyaAuth",
- exclude: ["GigyaAuth/Info.plist", "README.md"]),
+ exclude: ["GigyaAuth/Info.plist", "README.md"],
+ resources: [
+ .process("PrivacyInfo.xcprivacy")
+ ]
+ ),
]
)