Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 251 additions & 29 deletions LibrePass.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions LibrePass.xcodeproj/xcshareddata/xcschemes/LibrePass(Dev).xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B2D91A142B8393C60004561A"
BuildableName = "LibrePass.app"
BlueprintName = "LibrePass"
ReferencedContainer = "container:LibrePass.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug(Dev)"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug(Dev)"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B2D91A142B8393C60004561A"
BuildableName = "LibrePass.app"
BlueprintName = "LibrePass"
ReferencedContainer = "container:LibrePass.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release(Dev)"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B2D91A142B8393C60004561A"
BuildableName = "LibrePass.app"
BlueprintName = "LibrePass"
ReferencedContainer = "container:LibrePass.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug(Dev)">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release(Dev)"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B2D91A142B8393C60004561A"
BuildableName = "LibrePass.app"
BlueprintName = "LibrePass"
ReferencedContainer = "container:LibrePass.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug(Prod)"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug(Prod)"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B2D91A142B8393C60004561A"
BuildableName = "LibrePass.app"
BlueprintName = "LibrePass"
ReferencedContainer = "container:LibrePass.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release(Prod)"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B2D91A142B8393C60004561A"
BuildableName = "LibrePass.app"
BlueprintName = "LibrePass"
ReferencedContainer = "container:LibrePass.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug(Prod)">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release(Prod)"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

This file was deleted.

26 changes: 26 additions & 0 deletions LibrePass/CustomEnvironment.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// Environment.swift
// LibrePass
//
// Created by Nish on 2024-04-06.
//

import Foundation

public enum CustomEnvironment {
private static let infoDictionary: [String: Any] = {
guard let dict = Bundle.main.infoDictionary else {
fatalError("Plist file not found")
}
return dict
}()

static let rootURL: String = {
guard let rootURLstring = CustomEnvironment.infoDictionary["ROOT_URL"] as? String else {
fatalError("Root URL not set in plist for this environment")
}

return rootURLstring
}()
}

5 changes: 4 additions & 1 deletion LibrePass/Info.plist
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>ROOT_URL</key>
<string>${ROOT_URL}</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion LibrePass/LibrePassRegistrationWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct LibrePassRegistrationWindow: View {

@Binding var lClient: LibrePassClient

@State var apiServer = "https://api.librepass.org"
@State var apiServer = CustomEnvironment.rootURL
@State var email = String()
@State var password = String()
@State var confirmPassword = String()
Expand Down