Skip to content

Commit

Permalink
Merge pull request #5 from TheNoim/qr-code-login
Browse files Browse the repository at this point in the history
Add secret and QR-Code Login
  • Loading branch information
TheNoim authored Oct 6, 2021
2 parents 58c781d + cd85f5c commit 97212cf
Show file tree
Hide file tree
Showing 18 changed files with 422 additions and 115 deletions.
66 changes: 54 additions & 12 deletions Project SITNU.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
FB16A5FD270DF3D200C6EAAB /* SwiftOTP in Frameworks */ = {isa = PBXBuildFile; productRef = FB16A5FC270DF3D200C6EAAB /* SwiftOTP */; };
FB16A5FF270E013E00C6EAAB /* SwiftOTP in Frameworks */ = {isa = PBXBuildFile; productRef = FB16A5FE270E013E00C6EAAB /* SwiftOTP */; };
FB16A602270E06C900C6EAAB /* CodeScanner in Frameworks */ = {isa = PBXBuildFile; productRef = FB16A601270E06C900C6EAAB /* CodeScanner */; };
FB2B57D92646BC64008CD6C4 /* Cache in Frameworks */ = {isa = PBXBuildFile; productRef = FB2B57D82646BC64008CD6C4 /* Cache */; };
FB2B57DB2646BCDB008CD6C4 /* Cache in Frameworks */ = {isa = PBXBuildFile; productRef = FB2B57DA2646BCDB008CD6C4 /* Cache */; };
FB36E7FE2518B35F0039DFC9 /* onChangeChim.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB6E89FB25165A2600DAB2F4 /* onChangeChim.swift */; };
Expand Down Expand Up @@ -224,6 +227,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FB16A5FF270E013E00C6EAAB /* SwiftOTP in Frameworks */,
FB2B57DB2646BCDB008CD6C4 /* Cache in Frameworks */,
FB7F6A88251789EA0052F679 /* Alamofire in Frameworks */,
FBDAA1AB251FBE0A00104001 /* SwiftyBeaver in Frameworks */,
Expand All @@ -234,9 +238,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FB16A5FD270DF3D200C6EAAB /* SwiftOTP in Frameworks */,
FB2B57D92646BC64008CD6C4 /* Cache in Frameworks */,
FBA95DB72514F63D00494B5C /* Alamofire in Frameworks */,
FBDAA1A5251FBDDB00104001 /* SwiftyBeaver in Frameworks */,
FB16A602270E06C900C6EAAB /* CodeScanner in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -562,6 +568,7 @@
FB7F6A87251789EA0052F679 /* Alamofire */,
FBDAA1AA251FBE0A00104001 /* SwiftyBeaver */,
FB2B57DA2646BCDB008CD6C4 /* Cache */,
FB16A5FE270E013E00C6EAAB /* SwiftOTP */,
);
productName = "Watch Extension";
productReference = FB6E8975251624DD00DAB2F4 /* Watch Extension.appex */;
Expand All @@ -586,6 +593,8 @@
FBA95DB62514F63D00494B5C /* Alamofire */,
FBDAA1A4251FBDDB00104001 /* SwiftyBeaver */,
FB2B57D82646BC64008CD6C4 /* Cache */,
FB16A5FC270DF3D200C6EAAB /* SwiftOTP */,
FB16A601270E06C900C6EAAB /* CodeScanner */,
);
productName = "Project SITNU";
productReference = FBA95DA22514F53200494B5C /* Project SITNU.app */;
Expand Down Expand Up @@ -651,6 +660,8 @@
FBA95DB52514F63D00494B5C /* XCRemoteSwiftPackageReference "Alamofire" */,
FBDAA1A3251FBDDB00104001 /* XCRemoteSwiftPackageReference "SwiftyBeaver" */,
FB2B57D72646BC64008CD6C4 /* XCRemoteSwiftPackageReference "Cache" */,
FB16A5FB270DF3D200C6EAAB /* XCRemoteSwiftPackageReference "SwiftOTP" */,
FB16A600270E06C900C6EAAB /* XCRemoteSwiftPackageReference "CodeScanner" */,
);
productRefGroup = FBA95DA32514F53200494B5C /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -836,7 +847,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_ASSET_PATHS = "\"Watch Extension/Preview Content\"";
DEVELOPMENT_TEAM = P88CDRP8CR;
ENABLE_PREVIEWS = YES;
Expand All @@ -846,7 +857,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.1.0;
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-function-bodies=100 -Xfrontend -warn-long-expression-type-checking=100";
PRODUCT_BUNDLE_IDENTIFIER = "io.noim.Project-SITNU.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
Expand All @@ -866,7 +877,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_ASSET_PATHS = "\"Watch Extension/Preview Content\"";
DEVELOPMENT_TEAM = P88CDRP8CR;
ENABLE_PREVIEWS = YES;
Expand All @@ -876,7 +887,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.1.0;
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "io.noim.Project-SITNU.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
Expand All @@ -896,11 +907,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_TEAM = P88CDRP8CR;
IBSC_MODULE = Watch_Extension;
INFOPLIST_FILE = Watch/Info.plist;
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.noim.Project-SITNU.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
Expand All @@ -918,11 +929,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_TEAM = P88CDRP8CR;
IBSC_MODULE = Watch_Extension;
INFOPLIST_FILE = Watch/Info.plist;
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.noim.Project-SITNU.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
Expand Down Expand Up @@ -1057,7 +1068,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_ASSET_PATHS = "\"Project SITNU/Preview Content\"";
DEVELOPMENT_TEAM = P88CDRP8CR;
ENABLE_PREVIEWS = YES;
Expand All @@ -1068,7 +1079,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.noim.Project-SITNU";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1087,7 +1098,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_ASSET_PATHS = "\"Project SITNU/Preview Content\"";
DEVELOPMENT_TEAM = P88CDRP8CR;
ENABLE_PREVIEWS = YES;
Expand All @@ -1097,7 +1108,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.noim.Project-SITNU";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1198,6 +1209,22 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
FB16A5FB270DF3D200C6EAAB /* XCRemoteSwiftPackageReference "SwiftOTP" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/lachlanbell/SwiftOTP.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 3.0.0;
};
};
FB16A600270E06C900C6EAAB /* XCRemoteSwiftPackageReference "CodeScanner" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/twostraws/CodeScanner";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.0;
};
};
FB2B57D72646BC64008CD6C4 /* XCRemoteSwiftPackageReference "Cache" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/hyperoslo/Cache.git";
Expand Down Expand Up @@ -1225,6 +1252,21 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
FB16A5FC270DF3D200C6EAAB /* SwiftOTP */ = {
isa = XCSwiftPackageProductDependency;
package = FB16A5FB270DF3D200C6EAAB /* XCRemoteSwiftPackageReference "SwiftOTP" */;
productName = SwiftOTP;
};
FB16A5FE270E013E00C6EAAB /* SwiftOTP */ = {
isa = XCSwiftPackageProductDependency;
package = FB16A5FB270DF3D200C6EAAB /* XCRemoteSwiftPackageReference "SwiftOTP" */;
productName = SwiftOTP;
};
FB16A601270E06C900C6EAAB /* CodeScanner */ = {
isa = XCSwiftPackageProductDependency;
package = FB16A600270E06C900C6EAAB /* XCRemoteSwiftPackageReference "CodeScanner" */;
productName = CodeScanner;
};
FB2B57D82646BC64008CD6C4 /* Cache */ = {
isa = XCSwiftPackageProductDependency;
package = FB2B57D72646BC64008CD6C4 /* XCRemoteSwiftPackageReference "Cache" */;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,33 @@
"version": "6.0.0"
}
},
{
"package": "CodeScanner",
"repositoryURL": "https://github.com/twostraws/CodeScanner",
"state": {
"branch": null,
"revision": "a2144ddaa7c43a6ee00873edd4cc7815ad97942f",
"version": "1.0.7"
}
},
{
"package": "swift-crypto",
"repositoryURL": "https://github.com/apple/swift-crypto.git",
"state": {
"branch": null,
"revision": "3bea268b223651c4ab7b7b9ad62ef9b2d4143eb6",
"version": "1.1.6"
}
},
{
"package": "SwiftOTP",
"repositoryURL": "https://github.com/lachlanbell/SwiftOTP.git",
"state": {
"branch": null,
"revision": "315acdb759083fd8f3c37b02fc021321c8934f9c",
"version": "3.0.0"
}
},
{
"package": "SwiftyBeaver",
"repositoryURL": "https://github.com/SwiftyBeaver/SwiftyBeaver.git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "32">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Project S.I.T.N.U">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -75,27 +73,16 @@
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "32">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Project S.I.T.N.U">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,46 +55,33 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "1">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Project S.I.T.N.U">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Project S.I.T.N.U">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
8 changes: 3 additions & 5 deletions Project SITNU.xcodeproj/xcshareddata/xcschemes/Watch.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,16 @@
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Project S.I.T.N.U">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB6E8968251624DA00DAB2F4"
BuildableName = "Watch.app"
BlueprintName = "Watch"
ReferencedContainer = "container:Project SITNU.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
<AdditionalOptions>
<AdditionalOption
key = "NSZombieEnabled"
Expand Down
2 changes: 2 additions & 0 deletions Project SITNU/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Scan QR Code for easier login</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
2 changes: 1 addition & 1 deletion Project SITNU/Stores/WatchStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class WatchStore: ObservableObject {
func sync() {
var accounts: [UntisAccount] = [];
for acc in self.accounts {
let untisAccount = UntisAccount(id: acc.id, username: acc.username, password: acc.password, server: acc.server, school: acc.school, setDisplayName: acc.setDisplayName, primary: acc.primary);
let untisAccount = UntisAccount(id: acc.id, username: acc.username, password: acc.password, server: acc.server, school: acc.school, setDisplayName: acc.setDisplayName, authType: acc.authType, primary: acc.primary);
accounts.append(untisAccount);
}
let context = SharedContext(accounts: accounts);
Expand Down
Loading

0 comments on commit 97212cf

Please sign in to comment.