diff --git a/Gigya.podspec b/Gigya.podspec index fdcd3e5c..b90409c1 100644 --- a/Gigya.podspec +++ b/Gigya.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Gigya' - spec.version = '1.2.1' + spec.version = '1.2.2' spec.license = 'Apache 2.0' spec.homepage = 'https://developers.gigya.com/display/GD/Swift+SDK' spec.author = 'Gigya SAP' diff --git a/GigyaAuth/GigyaAuth.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist b/GigyaAuth/GigyaAuth.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist index a850d526..87b44c36 100644 --- a/GigyaAuth/GigyaAuth.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/GigyaAuth/GigyaAuth.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ GigyaAuth.xcscheme_^#shared#^_ orderHint - 15 + 14 diff --git a/GigyaE2ETestsApp/GigyaE2ETestsApp.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist b/GigyaE2ETestsApp/GigyaE2ETestsApp.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist index b285b6e8..9ae636f4 100644 --- a/GigyaE2ETestsApp/GigyaE2ETestsApp.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/GigyaE2ETestsApp/GigyaE2ETestsApp.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ GigyaE2ETestsApp.xcscheme_^#shared#^_ orderHint - 46 + 44 diff --git a/GigyaNss/GigyaNss.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist b/GigyaNss/GigyaNss.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist index 829d4754..4f2d7812 100644 --- a/GigyaNss/GigyaNss.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/GigyaNss/GigyaNss.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,17 +7,17 @@ GigyaNss-Universal-Debug.xcscheme_^#shared#^_ orderHint - 11 + 8 GigyaNss-Universal-Release.xcscheme_^#shared#^_ orderHint - 13 + 11 GigyaNss.xcscheme_^#shared#^_ orderHint - 2 + 3 SuppressBuildableAutocreation diff --git a/GigyaNss/GigyaNss/Actions/Action.swift b/GigyaNss/GigyaNss/Actions/Action.swift index bc370e47..e7c747fe 100644 --- a/GigyaNss/GigyaNss/Actions/Action.swift +++ b/GigyaNss/GigyaNss/Actions/Action.swift @@ -9,7 +9,7 @@ import Flutter import Gigya -protocol NssActionProtocol: class { +protocol NssActionProtocol: AnyObject { var actionId: NssAction? { get set } var delegate: FlowManagerDelegate? { get set } diff --git a/GigyaNss/GigyaNss/Cordinator/FlowManagerDelegate.swift b/GigyaNss/GigyaNss/Cordinator/FlowManagerDelegate.swift index 8507fd83..852243ef 100644 --- a/GigyaNss/GigyaNss/Cordinator/FlowManagerDelegate.swift +++ b/GigyaNss/GigyaNss/Cordinator/FlowManagerDelegate.swift @@ -9,7 +9,7 @@ import Gigya import Flutter -protocol FlowManagerDelegate: class { +protocol FlowManagerDelegate: AnyObject { func getMainLoginClosure(obj: T.Type) -> MainClosure diff --git a/GigyaNssEngine/GigyaNssEngine.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist b/GigyaNssEngine/GigyaNssEngine.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist index 4e4806df..51446625 100644 --- a/GigyaNssEngine/GigyaNssEngine.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/GigyaNssEngine/GigyaNssEngine.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,17 +7,17 @@ GigyaNssEngine-Universal-Debug.xcscheme_^#shared#^_ orderHint - 44 + 45 GigyaNssEngine-Universal-Release.xcscheme_^#shared#^_ orderHint - 9 + 6 GigyaNssEngine.xcscheme_^#shared#^_ orderHint - 7 + 5 diff --git a/GigyaNssRelease.podspec b/GigyaNssRelease.podspec index 8432b4dd..43671946 100644 --- a/GigyaNssRelease.podspec +++ b/GigyaNssRelease.podspec @@ -25,10 +25,11 @@ Pod::Spec.new do |spec| ss.dependency 'Gigya', '>= 1.2.0' ss.framework = 'SystemConfiguration' ss.library = 'c++', 'z' - - ss.dependency 'Flutter', '2.0.0' + + ss.dependency 'Flutter', '2.0.2' ss.vendored_frameworks = 'GigyaNss/Flutter/Release/App.xcframework' + end spec.subspec 'Auth' do |ss| @@ -37,6 +38,7 @@ Pod::Spec.new do |spec| end + spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } diff --git a/GigyaSwift.xcodeproj/project.pbxproj b/GigyaSwift.xcodeproj/project.pbxproj index 0a2ebb76..f500a633 100644 --- a/GigyaSwift.xcodeproj/project.pbxproj +++ b/GigyaSwift.xcodeproj/project.pbxproj @@ -6,6 +6,20 @@ objectVersion = 52; objects = { +/* Begin PBXAggregateTarget section */ + E7F5C8ED26B6B67D00C63D60 /* GigyaXC */ = { + isa = PBXAggregateTarget; + buildConfigurationList = E7F5C8EE26B6B67E00C63D60 /* Build configuration list for PBXAggregateTarget "GigyaXC" */; + buildPhases = ( + E7F5C8F126B6B68200C63D60 /* ShellScript */, + ); + dependencies = ( + ); + name = GigyaXC; + productName = GigyaXC; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ D52F88EA22795F39007DE20F /* PluginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52F88E922795F39007DE20F /* PluginViewController.swift */; }; D584D342228D6089004CA28F /* UIFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = D584D341228D6089004CA28F /* UIFactory.swift */; }; @@ -109,6 +123,12 @@ E7791A78238BC5880075BAFD /* BiometricServiceMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7791A77238BC5880075BAFD /* BiometricServiceMock.swift */; }; E7791A7B238BD3800075BAFD /* PushServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7791A7A238BD3800075BAFD /* PushServiceTests.swift */; }; E7791A7D238BE1070075BAFD /* SessionServiceMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7791A7C238BE1070075BAFD /* SessionServiceMock.swift */; }; + E779232626A04F1E00446A7F /* GigyaAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E779232526A04F1E00446A7F /* GigyaAuth.framework */; }; + E779232726A04F1E00446A7F /* GigyaAuth.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E779232526A04F1E00446A7F /* GigyaAuth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + E779232926A04F2400446A7F /* GigyaTfa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E779232826A04F2400446A7F /* GigyaTfa.framework */; }; + E779232A26A04F2400446A7F /* GigyaTfa.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E779232826A04F2400446A7F /* GigyaTfa.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + E779232C26A04F2900446A7F /* GigyaNss.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E779232B26A04F2900446A7F /* GigyaNss.framework */; }; + E779232D26A04F2900446A7F /* GigyaNss.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E779232B26A04F2900446A7F /* GigyaNss.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E77F71A0230AD95600E8738A /* GigyaWebBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = E77F719F230AD95600E8738A /* GigyaWebBridge.swift */; }; E77F7A2F2407EC7900FF90FB /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E77F7A2E2407EC7900FF90FB /* CoreFoundation.framework */; }; E7A6E0AA2240F8080063638F /* GigyaApiResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7A6E0A92240F8080063638F /* GigyaApiResult.swift */; }; @@ -211,12 +231,6 @@ E7FEF6A6264123D900180165 /* FacebookWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7584EE822E0524D007229FE /* FacebookWrapper.swift */; }; E7FF6BAB2691A7FC00FF8E8A /* App.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BA82691A7FB00FF8E8A /* App.xcframework */; }; E7FF6BAC2691A7FC00FF8E8A /* App.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BA82691A7FB00FF8E8A /* App.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - E7FF6BAE2691A83900FF8E8A /* GigyaNss.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BAD2691A83900FF8E8A /* GigyaNss.framework */; }; - E7FF6BAF2691A83900FF8E8A /* GigyaNss.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BAD2691A83900FF8E8A /* GigyaNss.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - E7FF6BB12691A84000FF8E8A /* GigyaTfa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BB02691A84000FF8E8A /* GigyaTfa.framework */; }; - E7FF6BB22691A84000FF8E8A /* GigyaTfa.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BB02691A84000FF8E8A /* GigyaTfa.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - E7FF6BB42691A84500FF8E8A /* GigyaAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BB32691A84500FF8E8A /* GigyaAuth.framework */; }; - E7FF6BB52691A84500FF8E8A /* GigyaAuth.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E7FF6BB32691A84500FF8E8A /* GigyaAuth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E7FFD59322FB0A8A00DBE663 /* (null) in Sources */ = {isa = PBXBuildFile; }; E7FFF8F6232003AD002EC944 /* WebBridgeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7FFF8F5232003AD002EC944 /* WebBridgeViewController.swift */; }; F42F7E39077C84C62D51B15F /* Pods_TestApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ACE784C21E7F740E1C0E1BA1 /* Pods_TestApp.framework */; }; @@ -285,11 +299,11 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - E7FF6BB52691A84500FF8E8A /* GigyaAuth.framework in Embed Frameworks */, - E7FF6BB22691A84000FF8E8A /* GigyaTfa.framework in Embed Frameworks */, + E779232726A04F1E00446A7F /* GigyaAuth.framework in Embed Frameworks */, E7FEF6A3263FFEF900180165 /* Gigya.framework in Embed Frameworks */, + E779232A26A04F2400446A7F /* GigyaTfa.framework in Embed Frameworks */, + E779232D26A04F2900446A7F /* GigyaNss.framework in Embed Frameworks */, E7FF6BAC2691A7FC00FF8E8A /* App.xcframework in Embed Frameworks */, - E7FF6BAF2691A83900FF8E8A /* GigyaNss.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -420,6 +434,9 @@ E7791A77238BC5880075BAFD /* BiometricServiceMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BiometricServiceMock.swift; sourceTree = ""; }; E7791A7A238BD3800075BAFD /* PushServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushServiceTests.swift; sourceTree = ""; }; E7791A7C238BE1070075BAFD /* SessionServiceMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionServiceMock.swift; sourceTree = ""; }; + E779232526A04F1E00446A7F /* GigyaAuth.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaAuth.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E779232826A04F2400446A7F /* GigyaTfa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaTfa.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E779232B26A04F2900446A7F /* GigyaNss.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaNss.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E77F719F230AD95600E8738A /* GigyaWebBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GigyaWebBridge.swift; sourceTree = ""; }; E77F7A222406A12E00FF90FB /* GigyaNssEngine.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GigyaNssEngine.framework; path = GigyaNssEngine/GigyaNssEngine.framework; sourceTree = ""; }; E77F7A272406B12100FF90FB /* GigyaNss.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GigyaNss.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -605,14 +622,14 @@ E7DC2C6D2280778000A13426 /* libc++.tbd in Frameworks */, E7FF6BAB2691A7FC00FF8E8A /* App.xcframework in Frameworks */, E7DC2C6C2280771700A13426 /* libz.tbd in Frameworks */, + E779232C26A04F2900446A7F /* GigyaNss.framework in Frameworks */, E7DC2C6B228076E600A13426 /* libsqlite3.tbd in Frameworks */, + E779232626A04F1E00446A7F /* GigyaAuth.framework in Frameworks */, + E779232926A04F2400446A7F /* GigyaTfa.framework in Frameworks */, E73373F522633BDA00ADEDBB /* SafariServices.framework in Frameworks */, - E7FF6BB42691A84500FF8E8A /* GigyaAuth.framework in Frameworks */, E731B72D232A53AD0032E111 /* AuthenticationServices.framework in Frameworks */, E77F7A2F2407EC7900FF90FB /* CoreFoundation.framework in Frameworks */, - E7FF6BAE2691A83900FF8E8A /* GigyaNss.framework in Frameworks */, E73373F422633BD300ADEDBB /* SystemConfiguration.framework in Frameworks */, - E7FF6BB12691A84000FF8E8A /* GigyaTfa.framework in Frameworks */, E7FEF6A2263FFEF900180165 /* Gigya.framework in Frameworks */, E7A71CAD232F7F3000993A61 /* CoreTelephony.framework in Frameworks */, E73373F322633BCC00ADEDBB /* LocalAuthentication.framework in Frameworks */, @@ -1032,6 +1049,9 @@ E7BE368C2224225900A108D9 /* Frameworks */ = { isa = PBXGroup; children = ( + E779232B26A04F2900446A7F /* GigyaNss.framework */, + E779232826A04F2400446A7F /* GigyaTfa.framework */, + E779232526A04F1E00446A7F /* GigyaAuth.framework */, E7FF6BB32691A84500FF8E8A /* GigyaAuth.framework */, E7FF6BB02691A84000FF8E8A /* GigyaTfa.framework */, E7FF6BAD2691A83900FF8E8A /* GigyaNss.framework */, @@ -1549,6 +1569,9 @@ }; }; }; + E7F5C8ED26B6B67D00C63D60 = { + CreatedOnToolsVersion = 12.5; + }; }; }; buildConfigurationList = E7BE366D2224219200A108D9 /* Build configuration list for PBXProject "GigyaSwift" */; @@ -1571,6 +1594,7 @@ E7A71CB1232F9FDC00993A61 /* TestAppUITests */, E76F2E712345E72500056D19 /* GigyaUITestsApp */, E76F2E862345E72700056D19 /* GigyaUITestsAppUITests */, + E7F5C8ED26B6B67D00C63D60 /* GigyaXC */, ); }; /* End PBXProject section */ @@ -1718,7 +1742,25 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint1 >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = " +"; + }; + E7F5C8F126B6B68200C63D60 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + 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"; }; /* End PBXShellScriptBuildPhase section */ @@ -2305,7 +2347,7 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 103; + CURRENT_PROJECT_VERSION = 120; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 52P2295V75; DYLIB_COMPATIBILITY_VERSION = 1; @@ -2325,7 +2367,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.2.1; + MARKETING_VERSION = 1.2.2; MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; ONLY_ACTIVE_ARCH = NO; @@ -2344,6 +2386,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE = YES; VALID_ARCHS = "arm64 arm64e armv7 armv7s x86_64"; }; name = Debug; @@ -2362,7 +2405,7 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 103; + CURRENT_PROJECT_VERSION = 120; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 52P2295V75; DYLIB_COMPATIBILITY_VERSION = 1; @@ -2382,9 +2425,10 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.2.1; + MARKETING_VERSION = 1.2.2; MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; + ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(OTHER_LDFLAGS)", "-ObjC", @@ -2400,6 +2444,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE = YES; VALID_ARCHS = "arm64 arm64e armv7 armv7s x86_64"; }; name = Release; @@ -2498,6 +2543,24 @@ }; name = Release; }; + E7F5C8EF26B6B67E00C63D60 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 52P2295V75; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + E7F5C8F026B6B67E00C63D60 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 52P2295V75; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -2564,6 +2627,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + E7F5C8EE26B6B67E00C63D60 /* Build configuration list for PBXAggregateTarget "GigyaXC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E7F5C8EF26B6B67E00C63D60 /* Debug */, + E7F5C8F026B6B67E00C63D60 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = E7BE366A2224219200A108D9 /* Project object */; diff --git a/GigyaSwift.xcodeproj/xcshareddata/xcschemes/Gigya.xcscheme b/GigyaSwift.xcodeproj/xcshareddata/xcschemes/Gigya.xcscheme index 06c85773..b528a053 100644 --- a/GigyaSwift.xcodeproj/xcshareddata/xcschemes/Gigya.xcscheme +++ b/GigyaSwift.xcodeproj/xcshareddata/xcschemes/Gigya.xcscheme @@ -114,7 +114,7 @@ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction"> + scriptText = "#exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 # #UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal # #if [ "true" == ${ALREADYINVOKED:-false} ] #then #echo "RECURSION: Detected, stopping" #else #export ALREADYINVOKED="true" # ## make sure the output directory exists #mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" ##mkdir -p "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework" # #echo "Building for iPhoneSimulator" #echo "${CONFIGURATION} " #xcodebuild -workspace "${WORKSPACE_PATH}" -scheme "${TARGET_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' ONLY_ACTIVE_ARCH=NO ARCHS='i386 x86_64' BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" ENABLE_BITCODE=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE=bitcode clean build # ## Step 1. Copy the framework structure (from iphoneos build) to the universal folder #echo "Copying to output folder" #cp -R "${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/" "${UNIVERSAL_OUTPUTFOLDER}" "> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GigyaSwift.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme b/GigyaSwift.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme index 3efce303..23869255 100644 --- a/GigyaSwift.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme +++ b/GigyaSwift.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme @@ -89,7 +89,7 @@ GigyaUITestsApp.xcscheme_^#shared#^_ orderHint - 2 + 46 + + GigyaXC.xcscheme_^#shared#^_ + + orderHint + 47 TestApp.xcscheme_^#shared#^_ orderHint - 1 + 2 + + + SuppressBuildableAutocreation + + E7F5C8ED26B6B67D00C63D60 + + primary + diff --git a/GigyaSwift/Gigya/GigyaCore.swift b/GigyaSwift/Gigya/GigyaCore.swift index a0013d21..611a171f 100644 --- a/GigyaSwift/Gigya/GigyaCore.swift +++ b/GigyaSwift/Gigya/GigyaCore.swift @@ -70,7 +70,7 @@ public final class GigyaCore: GigyaInstanceProtocol { initFor(apiKey: apiKey, apiDomain: plistConfig?.apiDomain) } - if let ccountConfig = plistConfig?.account { + if let ccountConfig: GigyaAccountConfig = plistConfig?.account { config.accountConfig = ccountConfig } diff --git a/GigyaSwift/Global/Account/AccountServiceProtocol.swift b/GigyaSwift/Global/Account/AccountServiceProtocol.swift index a31f8c53..cf6f97c2 100644 --- a/GigyaSwift/Global/Account/AccountServiceProtocol.swift +++ b/GigyaSwift/Global/Account/AccountServiceProtocol.swift @@ -8,7 +8,7 @@ import Foundation -public protocol AccountServiceProtocol: class { +public protocol AccountServiceProtocol: AnyObject { var account: Any? { get set } func getAccount() -> T diff --git a/GigyaSwift/Global/Api/ApiService.swift b/GigyaSwift/Global/Api/ApiService.swift index dac80f57..9890cb99 100644 --- a/GigyaSwift/Global/Api/ApiService.swift +++ b/GigyaSwift/Global/Api/ApiService.swift @@ -34,10 +34,10 @@ final class ApiService: ApiServiceProtocol { let params = ["include": "permissions,ids,appIds"] let model = ApiRequestModel(method: GigyaDefinitions.API.getSdkConfig, params: params) - self.sendBlocking(model: model, responseType: InitSdkResponseModel.self) { [weak self] result in + self.sendBlocking(model: model, responseType: InitSdkIdsModel.self) { [weak self] result in switch result { case .success(let data): - self?.persistenceService.save(ids: data.ids) + self?.persistenceService.save(ids: data) self?.persistenceService.isInitSdk = true case .failure(let error): self?.reportingService.sendErrorReport(msg: "getSDKConfig error", details: ["details": error.localizedDescription]) diff --git a/GigyaSwift/Global/Api/BusinessApiDelegate.swift b/GigyaSwift/Global/Api/BusinessApiDelegate.swift index a39e9b9b..b1eda325 100644 --- a/GigyaSwift/Global/Api/BusinessApiDelegate.swift +++ b/GigyaSwift/Global/Api/BusinessApiDelegate.swift @@ -9,7 +9,7 @@ import Foundation import UIKit -public protocol BusinessApiDelegate: class { +public protocol BusinessApiDelegate: AnyObject { func sendApi(api: String, params: [String: Any], completion: @escaping (GigyaApiResult) -> Void ) diff --git a/GigyaSwift/Global/PersistenceService.swift b/GigyaSwift/Global/PersistenceService.swift index 5417a341..b3df4a92 100644 --- a/GigyaSwift/Global/PersistenceService.swift +++ b/GigyaSwift/Global/PersistenceService.swift @@ -58,7 +58,7 @@ public final class PersistenceService { // save gmid, ucid to userDefaults internal func save(ids: InitSdkIdsModel) { - UserDefaults.standard.setValue(ids.gmid, forKey: InternalConfig.Storage.GMID) + UserDefaults.standard.setValue(ids.gcid, forKey: InternalConfig.Storage.GMID) UserDefaults.standard.setValue(ids.ucid, forKey: InternalConfig.Storage.UCID) } diff --git a/GigyaSwift/Global/Providers/Provider.swift b/GigyaSwift/Global/Providers/Provider.swift index 842f8561..af2f2d51 100644 --- a/GigyaSwift/Global/Providers/Provider.swift +++ b/GigyaSwift/Global/Providers/Provider.swift @@ -8,7 +8,7 @@ import UIKit -protocol Provider: class { +protocol Provider: AnyObject { var delegate: BusinessApiDelegate? { get set } diff --git a/GigyaSwift/Models/Config/GigyaDefinitions.swift b/GigyaSwift/Models/Config/GigyaDefinitions.swift index fca6a872..313ea954 100644 --- a/GigyaSwift/Models/Config/GigyaDefinitions.swift +++ b/GigyaSwift/Models/Config/GigyaDefinitions.swift @@ -11,7 +11,7 @@ import Foundation public struct GigyaDefinitions { public struct API { // MARK: ACCOUNT - public static let getSdkConfig = "socialize.getSDKConfig" + public static let getSdkConfig = "socialize.getIDs" public static let login = "accounts.login" public static let logout = "accounts.logout" public static let getAccountInfo = "accounts.getAccountInfo" diff --git a/GigyaSwift/Models/Config/InitSdkResponseModel.swift b/GigyaSwift/Models/Config/InitSdkResponseModel.swift index 68a6b13b..419eb53b 100644 --- a/GigyaSwift/Models/Config/InitSdkResponseModel.swift +++ b/GigyaSwift/Models/Config/InitSdkResponseModel.swift @@ -14,5 +14,5 @@ struct InitSdkResponseModel: Codable { struct InitSdkIdsModel: Codable { let ucid: String - let gmid: String + let gcid: String } diff --git a/GigyaSwift/Models/Config/InternalConfig.swift b/GigyaSwift/Models/Config/InternalConfig.swift index b1c4b80a..2a540ac9 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.2.1" + internal static let version = "\(GigyaDefinitions.versionPrefix ?? "")ios_swift_1.2.2" internal static let sdkDomain = "com.gigya.GigyaSDK" internal static let defaultLang = "en" } diff --git a/GigyaSwift/Models/User/GigyaProfile.swift b/GigyaSwift/Models/User/GigyaProfile.swift index 76801447..0313fc36 100644 --- a/GigyaSwift/Models/User/GigyaProfile.swift +++ b/GigyaSwift/Models/User/GigyaProfile.swift @@ -65,6 +65,125 @@ public struct GigyaProfile: Codable { public var work: [UserWork]? public var zip: String? + enum CodingKeys: String, CodingKey { + case firstName, lastName, nickname + case age, bio, birthDay ,birthMonth, birthYear + case capabilities + case certifications + case address, city, country + case education, educationLevel + case email + case favorites + case followersCount + case followingCount + case gender + case hometown + case honors + case identities + case industry + case interestedIn + case interests + case isConnected + case iRank + case isSiteUID + case isSiteUser + case languages + case likes + case locale + case name + case oldestDataAge + case oldestDataUpdatedTimestamp + case patents + case phones + case photoURL + case providers + case publications + case relationshipStatus + case religion + case samlData + case skills + case specialities + case state + case timezone + case thumbnailURL + case username + case isVerified + case verified + case verifiedTimestamp + case work + case zip + + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + self.firstName = try? container.decodeIfPresent(String.self, forKey: .firstName) + self.lastName = try? container.decodeIfPresent(String.self, forKey: .lastName) + self.nickname = try? container.decodeIfPresent(String.self, forKey: .nickname) + self.address = try? container.decodeIfPresent(String.self, forKey: .address) + self.city = try? container.decodeIfPresent(String.self, forKey: .city) + self.country = try? container.decodeIfPresent(String.self, forKey: .country) + self.age = try? container.decodeIfPresent(Int.self, forKey: .age) + self.bio = try? container.decodeIfPresent(String.self, forKey: .bio) + self.birthDay = try? container.decodeIfPresent(Int.self, forKey: .birthDay) + self.birthMonth = try? container.decodeIfPresent(Int.self, forKey: .birthMonth) + self.birthYear = try? container.decodeIfPresent(Int.self, forKey: .birthYear) + self.educationLevel = try? container.decodeIfPresent(String.self, forKey: .educationLevel) + self.email = try? container.decodeIfPresent(String.self, forKey: .email) + self.followersCount = try? container.decodeIfPresent(Int.self, forKey: .followersCount) + self.followingCount = try? container.decodeIfPresent(Int.self, forKey: .followingCount) + self.gender = try? container.decodeIfPresent(String.self, forKey: .gender) + self.hometown = try? container.decodeIfPresent(String.self, forKey: .hometown) + self.honors = try? container.decodeIfPresent(String.self, forKey: .honors) + self.industry = try? container.decodeIfPresent(String.self, forKey: .industry) + self.interestedIn = try? container.decodeIfPresent(String.self, forKey: .interestedIn) + self.isConnected = try? container.decodeIfPresent(Bool.self, forKey: .isConnected) + self.iRank = try? container.decodeIfPresent(Int.self, forKey: .iRank) + self.isSiteUID = try? container.decodeIfPresent(Bool.self, forKey: .isSiteUID) + self.isSiteUser = try? container.decodeIfPresent(Bool.self, forKey: .isSiteUser) + self.languages = try? container.decodeIfPresent(String.self, forKey: .languages) + self.locale = try? container.decodeIfPresent(String.self, forKey: .locale) + self.name = try? container.decodeIfPresent(String.self, forKey: .name) + self.oldestDataAge = try? container.decodeIfPresent(Int.self, forKey: .oldestDataAge) + self.oldestDataUpdatedTimestamp = try? container.decodeIfPresent(Int.self, forKey: .oldestDataUpdatedTimestamp) + self.photoURL = try? container.decodeIfPresent(String.self, forKey: .photoURL) + self.relationshipStatus = try? container.decodeIfPresent(String.self, forKey: .relationshipStatus) + self.religion = try? container.decodeIfPresent(String.self, forKey: .religion) + self.samlData = try? container.decodeIfPresent(UserSamlData.self, forKey: .samlData) + self.specialities = try? container.decodeIfPresent(String.self, forKey: .specialities) + self.state = try? container.decodeIfPresent(String.self, forKey: .state) + self.timezone = try? container.decodeIfPresent(String.self, forKey: .timezone) + self.thumbnailURL = try? container.decodeIfPresent(String.self, forKey: .thumbnailURL) + self.isVerified = try? container.decodeIfPresent(Bool.self, forKey: .isVerified) + self.isVerified = try? container.decodeIfPresent(Bool.self, forKey: .isVerified) + self.verified = try? container.decodeIfPresent(String.self, forKey: .verified) + self.verifiedTimestamp = try? container.decodeIfPresent(Int.self, forKey: .verifiedTimestamp) + self.zip = try? container.decodeIfPresent(String.self, forKey: .zip) + + self.favorites = try? container.decodeIfPresent(UserFavorites.self, forKey: .favorites) + self.certifications = objectToArrayOnProfileField(object: Certification.self, key: .certifications, container: container) + self.education = objectToArrayOnProfileField(object: UserEducation.self, key: .education, container: container) + self.likes = objectToArrayOnProfileField(object: UserLike.self, key: .likes, container: container) + self.patents = objectToArrayOnProfileField(object: UserPatent.self, key: .patents, container: container) + self.phones = objectToArrayOnProfileField(object: UserPhone.self, key: .phones, container: container) + self.publications = objectToArrayOnProfileField(object: UserPublication.self, key: .publications, container: container) + self.skills = objectToArrayOnProfileField(object: UserSkill.self, key: .skills, container: container) + self.work = objectToArrayOnProfileField(object: UserWork.self, key: .work, container: container) + self.identities = objectToArrayOnProfileField(object: ProviderIdentity.self, key: .identities, container: container) + } + + func objectToArrayOnProfileField(object: T.Type, key: GigyaProfile.CodingKeys, container: KeyedDecodingContainer) -> [T]? { + var array = try? container.decodeIfPresent([T].self, forKey: key) + if array == nil { + if let obj = try? container.decodeIfPresent(T.self, forKey: key) { + array = Array(arrayLiteral: obj) + } + } + + return array + } + public struct Certification: Codable { public var name: String? public var authority: String? @@ -78,8 +197,8 @@ public struct GigyaProfile: Codable { public var schoolType: String? public var fieldOfStudy: String? public var degree: String? - public var startYear: String? - public var endYear: String? + public var startYear: Int? + public var endYear: Int? } // TODO: Describe favorites protocol diff --git a/GigyaTfa/GigyaTfa.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist b/GigyaTfa/GigyaTfa.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist index c87035f4..cdb93039 100644 --- a/GigyaTfa/GigyaTfa.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/GigyaTfa/GigyaTfa.xcodeproj/xcuserdata/i507698.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ GigyaTfa-Universal.xcscheme_^#shared#^_ orderHint - 5 + 4 GigyaTfa.xcscheme_^#shared#^_