diff --git a/ios/ios-aggregate-verifier-example/ios-aggregate-example/ViewModel.swift b/ios/ios-aggregate-verifier-example/ios-aggregate-example/ViewModel.swift index 522960ca3..7f2b1580c 100644 --- a/ios/ios-aggregate-verifier-example/ios-aggregate-example/ViewModel.swift +++ b/ios/ios-aggregate-verifier-example/ios-aggregate-example/ViewModel.swift @@ -21,22 +21,22 @@ class ViewModel: ObservableObject { redirectUrl: "web3auth.ios-aggregate-example://auth", loginConfig: [ TypeOfLogin.google.rawValue: - .init( - verifier: "aggregate-sapphire", - typeOfLogin: .google, - name: "Web3Auth-Aggregate-Verifier-Google-Example", - clientId: "519228911939-cri01h55lsjbsia1k7ll6qpalrus75ps.apps.googleusercontent.com", - verifierSubIdentifier: "w3a-google" - ) + .init( + verifier: "aggregate-sapphire", + typeOfLogin: .google, + name: "Web3Auth-Aggregate-Verifier-Google-Example", + clientId: "519228911939-cri01h55lsjbsia1k7ll6qpalrus75ps.apps.googleusercontent.com", + verifierSubIdentifier: "w3a-google" + ), + TypeOfLogin.jwt.rawValue: + .init( + verifier: "aggregate-sapphire", + typeOfLogin: .jwt, + name: "Web3Auth-Aggregate-Verifier-GitHub-Example", + clientId: "hiLqaop0amgzCC0AXo4w0rrG9abuJTdu", + verifierSubIdentifier: "w3a-a0-github" + ) ], - whiteLabel: W3AWhiteLabelData( - appName: "Web3Auth Stub", - logoLight: "https://images.web3auth.io/web3auth-logo-w.svg", - logoDark: "https://images.web3auth.io/web3auth-logo-w.svg", - defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl - mode: .dark, - theme: ["primary": "#d53f8c"] - ), mfaSettings: MfaSettings( deviceShareFactor: MfaSetting(enable: true, priority: 1), backUpShareFactor: MfaSetting(enable: true, priority: 2), @@ -56,18 +56,16 @@ class ViewModel: ObservableObject { navigationTitle = loggedIn ? "UserInfo" : "Agg-Verifier Example" }) } - + func loginWithGoogle() { Task{ do { let result = try await web3Auth?.login( - W3ALoginParams( - loginProvider: .GOOGLE, - dappShare: nil, - extraLoginOptions: ExtraLoginOptions(display: nil, prompt: nil, max_age: nil, ui_locales: nil, id_token_hint: nil, id_token: nil, login_hint: nil, acr_values: nil, scope: nil, audience: nil, connection: nil, domain: nil, client_id: nil, redirect_uri: nil, leeway: nil, verifierIdField: nil, isVerifierIdCaseSensitive: nil, additionalParams: nil), - mfaLevel: .DEFAULT, - curve: .SECP256K1 - )) + W3ALoginParams( + loginProvider: .GOOGLE, + dappShare: nil, + extraLoginOptions: ExtraLoginOptions(display: nil, prompt: nil, max_age: nil, ui_locales: nil, id_token_hint: nil, id_token: nil, login_hint: nil, acr_values: nil, scope: nil, audience: nil, connection: nil, domain: nil, client_id: nil, redirect_uri: nil, leeway: nil, verifierIdField: nil, isVerifierIdCaseSensitive: nil, additionalParams: nil) + )) await MainActor.run(body: { user = result loggedIn = true @@ -83,11 +81,9 @@ class ViewModel: ObservableObject { do { let result = try await web3Auth?.login( W3ALoginParams( - loginProvider: .JWT, - dappShare: nil, - extraLoginOptions: ExtraLoginOptions(display: nil, prompt: nil, max_age: nil, ui_locales: nil, id_token_hint: nil, id_token: nil, login_hint: nil, acr_values: nil, scope: nil, audience: nil, connection: "github", domain: "https://web3auth.au.auth0.com", client_id: nil, redirect_uri: nil, leeway: nil, verifierIdField: "email", isVerifierIdCaseSensitive: false, additionalParams: nil), - mfaLevel: .DEFAULT, - curve: .SECP256K1 + loginProvider: .JWT, + dappShare: nil, + extraLoginOptions: ExtraLoginOptions(display: nil, prompt: nil, max_age: nil, ui_locales: nil, id_token_hint: nil, id_token: nil, login_hint: nil, acr_values: nil, scope: nil, audience: nil, connection: "github", domain: "https://web3auth.au.auth0.com", client_id: nil, redirect_uri: nil, leeway: nil, verifierIdField: "email", isVerifierIdCaseSensitive: false, additionalParams: nil) )) await MainActor.run(body: { user = result diff --git a/ios/ios-aptos-example/ios-aptos-example.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate b/ios/ios-aptos-example/ios-aptos-example.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate index f8e704a06..021921c3c 100644 Binary files a/ios/ios-aptos-example/ios-aptos-example.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/ios-aptos-example/ios-aptos-example.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/ios-firebase-example/ios-firebase-example/ViewModel.swift b/ios/ios-firebase-example/ios-firebase-example/ViewModel.swift index e7d77dadf..bc539dcc7 100644 --- a/ios/ios-firebase-example/ios-firebase-example/ViewModel.swift +++ b/ios/ios-firebase-example/ios-firebase-example/ViewModel.swift @@ -21,8 +21,8 @@ class ViewModel: ObservableObject { }) web3Auth = try await Web3Auth(W3AInitParams( - clientId: clientId, network: network, - buildEnv: .testing, + clientId: clientId, + network: network, redirectUrl: "web3auth.ios-firebase-example://auth", loginConfig: [ TypeOfLogin.jwt.rawValue: @@ -32,13 +32,6 @@ class ViewModel: ObservableObject { clientId: self.clientId ) ], - whiteLabel: W3AWhiteLabelData( - appName: "Web3Auth Stub", - logoLight: "https://images.toruswallet.io/sol.svg", - logoDark: "https://images.toruswallet.io/sol.svg", - defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl - theme: ["primary": "#d53f8c"] - ), mfaSettings: MfaSettings( deviceShareFactor: MfaSetting(enable: true, priority: 1), backUpShareFactor: MfaSetting(enable: true, priority: 2), diff --git a/ios/ios-playground/ios-playground.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate b/ios/ios-playground/ios-playground.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate index 82b1b5b07..be07f73a7 100644 Binary files a/ios/ios-playground/ios-playground.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/ios-playground/ios-playground.xcodeproj/project.xcworkspace/xcuserdata/ayushb.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/ios-quick-start/ios-example.xcodeproj/xcshareddata/xcschemes/ios-example.xcscheme b/ios/ios-quick-start/ios-example.xcodeproj/xcshareddata/xcschemes/ios-example.xcscheme new file mode 100644 index 000000000..ff25d47de --- /dev/null +++ b/ios/ios-quick-start/ios-example.xcodeproj/xcshareddata/xcschemes/ios-example.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/ios-solana-example/ios-solana-example.xcodeproj/project.pbxproj b/ios/ios-solana-example/ios-solana-example.xcodeproj/project.pbxproj index 49e6debf8..abf52a81b 100644 --- a/ios/ios-solana-example/ios-solana-example.xcodeproj/project.pbxproj +++ b/ios/ios-solana-example/ios-solana-example.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 2833BEE82BD6383C00243B09 /* SolanaSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 2833BEE72BD6383C00243B09 /* SolanaSwift */; }; 2833BEEB2BD6384800243B09 /* Web3Auth in Frameworks */ = {isa = PBXBuildFile; productRef = 2833BEEA2BD6384800243B09 /* Web3Auth */; }; 285651362B8A555900796F67 /* ios_solana_exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285651352B8A555900796F67 /* ios_solana_exampleApp.swift */; }; 285651382B8A555900796F67 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285651372B8A555900796F67 /* ContentView.swift */; }; @@ -16,6 +15,7 @@ 285651472B8A555A00796F67 /* ios_solana_exampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285651462B8A555A00796F67 /* ios_solana_exampleTests.swift */; }; 285651512B8A555A00796F67 /* ios_solana_exampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285651502B8A555A00796F67 /* ios_solana_exampleUITests.swift */; }; 285651532B8A555A00796F67 /* ios_solana_exampleUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285651522B8A555A00796F67 /* ios_solana_exampleUITestsLaunchTests.swift */; }; + 28C341892CB4017F00360382 /* SolanaSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 28C341882CB4017F00360382 /* SolanaSwift */; }; 28DFB2C42B8C3EFA005DDCB6 /* Web3AuthHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28DFB2C32B8C3EFA005DDCB6 /* Web3AuthHelper.swift */; }; 28DFB2C62B8C4D7A005DDCB6 /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28DFB2C52B8C4D7A005DDCB6 /* ViewModel.swift */; }; 28DFB2C82B8C4F53005DDCB6 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28DFB2C72B8C4F53005DDCB6 /* LoginView.swift */; }; @@ -63,7 +63,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2833BEE82BD6383C00243B09 /* SolanaSwift in Frameworks */, + 28C341892CB4017F00360382 /* SolanaSwift in Frameworks */, 2833BEEB2BD6384800243B09 /* Web3Auth in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -187,8 +187,8 @@ ); name = "ios-solana-example"; packageProductDependencies = ( - 2833BEE72BD6383C00243B09 /* SolanaSwift */, 2833BEEA2BD6384800243B09 /* Web3Auth */, + 28C341882CB4017F00360382 /* SolanaSwift */, ); productName = "ios-solana-example"; productReference = 285651322B8A555900796F67 /* ios-solana-example.app */; @@ -263,8 +263,8 @@ ); mainGroup = 285651292B8A555900796F67; packageReferences = ( - 2833BEE62BD6383C00243B09 /* XCRemoteSwiftPackageReference "solana-swift" */, 2833BEE92BD6384800243B09 /* XCRemoteSwiftPackageReference "web3auth-swift-sdk" */, + 28C341872CB4017F00360382 /* XCRemoteSwiftPackageReference "solana-swift" */, ); productRefGroup = 285651332B8A555900796F67 /* Products */; projectDirPath = ""; @@ -646,35 +646,35 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 2833BEE62BD6383C00243B09 /* XCRemoteSwiftPackageReference "solana-swift" */ = { + 2833BEE92BD6384800243B09 /* XCRemoteSwiftPackageReference "web3auth-swift-sdk" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/p2p-org/solana-swift.git"; + repositoryURL = "https://github.com/Web3Auth/web3auth-swift-sdk/"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 5.0.0; + minimumVersion = 9.0.0; }; }; - 2833BEE92BD6384800243B09 /* XCRemoteSwiftPackageReference "web3auth-swift-sdk" */ = { + 28C341872CB4017F00360382 /* XCRemoteSwiftPackageReference "solana-swift" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/Web3Auth/web3auth-swift-sdk/"; + repositoryURL = "https://github.com/p2p-org/solana-swift.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 9.0.0; + minimumVersion = 5.0.0; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 2833BEE72BD6383C00243B09 /* SolanaSwift */ = { - isa = XCSwiftPackageProductDependency; - package = 2833BEE62BD6383C00243B09 /* XCRemoteSwiftPackageReference "solana-swift" */; - productName = SolanaSwift; - }; 2833BEEA2BD6384800243B09 /* Web3Auth */ = { isa = XCSwiftPackageProductDependency; package = 2833BEE92BD6384800243B09 /* XCRemoteSwiftPackageReference "web3auth-swift-sdk" */; productName = Web3Auth; }; + 28C341882CB4017F00360382 /* SolanaSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 28C341872CB4017F00360382 /* XCRemoteSwiftPackageReference "solana-swift" */; + productName = SolanaSwift; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 2856512A2B8A555900796F67 /* Project object */; diff --git a/ios/ios-solana-example/ios-solana-example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/ios-solana-example/ios-solana-example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9d52291f8..b6a1c45d8 100644 --- a/ios/ios-solana-example/ios-solana-example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ios/ios-solana-example/ios-solana-example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "edf43263484c458b2f2acf14cf0abd81b2aafca008f8a166f2055d3b10bbb47a", + "originHash" : "3b81bfeafa72a554b6ad22c3055d64712325a3e410def63c3f2649d3f0e98bbb", "pins" : [ { "identity" : "bigint",