Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushBherwani1998 committed Dec 5, 2024
1 parent 2623557 commit e2427dd
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
repositoryURL = "https://github.com/Web3Auth/single-factor-auth-swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 9.0.0;
minimumVersion = 9.0.3;
};
};
28D682982CA3AB0A00872DED /* XCRemoteSwiftPackageReference "web3" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Web3Auth/session-manager-swift.git",
"state" : {
"revision" : "90afccc0e5e2ea8d671cdacb26899f60740b4e0b",
"version" : "6.0.0"
"revision" : "d86cd2a7f6d8095531ed609c728d851820fe85be",
"version" : "6.0.1"
}
},
{
Expand All @@ -96,8 +96,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Web3Auth/single-factor-auth-swift",
"state" : {
"revision" : "95e1ea418b87234f0aceb25205678ed98acfa4ab",
"version" : "9.0.0"
"revision" : "7f3a94afe42966bbc4caac7c22caf6e751760c39",
"version" : "9.0.3"
}
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@
repositoryURL = "https://github.com/Web3Auth/single-factor-auth-swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 9.0.0;
minimumVersion = 9.0.3;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Web3Auth/session-manager-swift.git",
"state" : {
"revision" : "90afccc0e5e2ea8d671cdacb26899f60740b4e0b",
"version" : "6.0.0"
"revision" : "d86cd2a7f6d8095531ed609c728d851820fe85be",
"version" : "6.0.1"
}
},
{
"identity" : "single-factor-auth-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Web3Auth/single-factor-auth-swift",
"state" : {
"revision" : "95e1ea418b87234f0aceb25205678ed98acfa4ab",
"version" : "9.0.0"
"revision" : "7f3a94afe42966bbc4caac7c22caf6e751760c39",
"version" : "9.0.3"
}
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
filePath = "ios-firebase-example/ViewModel.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "88"
endingLineNumber = "88"
landmarkName = "getBalance()"
startingLineNumber = "94"
endingLineNumber = "94"
landmarkName = "loginViaFirebaseEP()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
Expand All @@ -94,9 +94,9 @@
filePath = "ios-firebase-example/ViewModel.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "84"
endingLineNumber = "84"
landmarkName = "getBalance()"
startingLineNumber = "90"
endingLineNumber = "90"
landmarkName = "loginViaFirebaseEP()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ class ViewModel: ObservableObject {
// IMP START - Initialize Web3Auth SFA
web3AuthOptions = Web3AuthOptions(
clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ",
web3AuthNetwork: .SAPPHIRE_MAINNET
web3AuthNetwork: .SAPPHIRE_MAINNET,
sessionTime: 20
)

singleFactorAuth = try! SingleFactorAuth(params: web3AuthOptions)

try! await singleFactorAuth.initialize()
do {
try await singleFactorAuth.initialize()
} catch {
print(error.localizedDescription)
// Error
}

// Check for existing session
if(singleFactorAuth.getSessionData() != nil) {
Expand Down

0 comments on commit e2427dd

Please sign in to comment.