Skip to content

Commit

Permalink
Fix:Bugs with registration page fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tkshsbcue committed Jun 2, 2024
1 parent 4ba3d68 commit 730a574
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 8 deletions.
34 changes: 33 additions & 1 deletion Tickle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
E41401412C0B7A970025A519 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E41401402C0B7A960025A519 /* GoogleService-Info.plist */; };
E42CD4902C07497F003F50D3 /* LoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E42CD48F2C07497F003F50D3 /* LoginViewModel.swift */; };
E42CD4932C074996003F50D3 /* MainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E42CD4922C074996003F50D3 /* MainViewModel.swift */; };
E4484CC72C0CC30F0056DDC4 /* FirebaseAuthCombine-Community in Frameworks */ = {isa = PBXBuildFile; productRef = E4484CC62C0CC30F0056DDC4 /* FirebaseAuthCombine-Community */; };
E4484CC92C0CC30F0056DDC4 /* FirebaseDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = E4484CC82C0CC30F0056DDC4 /* FirebaseDatabase */; };
E4484CCB2C0CC30F0056DDC4 /* FirebaseDatabaseSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E4484CCA2C0CC30F0056DDC4 /* FirebaseDatabaseSwift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -71,9 +74,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E4484CCB2C0CC30F0056DDC4 /* FirebaseDatabaseSwift in Frameworks */,
E4484CC92C0CC30F0056DDC4 /* FirebaseDatabase in Frameworks */,
E41219E72C06FC1500873F6B /* FirebaseAuth in Frameworks */,
E41219E92C06FC1500873F6B /* FirebaseFirestore in Frameworks */,
E41219EB2C06FC1500873F6B /* FirebaseFirestoreSwift in Frameworks */,
E4484CC72C0CC30F0056DDC4 /* FirebaseAuthCombine-Community in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -179,6 +185,9 @@
E41219E62C06FC1500873F6B /* FirebaseAuth */,
E41219E82C06FC1500873F6B /* FirebaseFirestore */,
E41219EA2C06FC1500873F6B /* FirebaseFirestoreSwift */,
E4484CC62C0CC30F0056DDC4 /* FirebaseAuthCombine-Community */,
E4484CC82C0CC30F0056DDC4 /* FirebaseDatabase */,
E4484CCA2C0CC30F0056DDC4 /* FirebaseDatabaseSwift */,
);
productName = Tickle;
productReference = E41219B32C05EE8D00873F6B /* Tickle.app */;
Expand Down Expand Up @@ -228,7 +237,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1520;
LastUpgradeCheck = 1520;
LastUpgradeCheck = 1540;
TargetAttributes = {
E41219B22C05EE8D00873F6B = {
CreatedOnToolsVersion = 15.2;
Expand Down Expand Up @@ -377,6 +386,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -438,6 +448,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -465,6 +476,7 @@
CODE_SIGN_ENTITLEMENTS = Tickle/Tickle.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Tickle/Preview Content\"";
DEVELOPMENT_TEAM = 7P2YB7YDTU;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -503,6 +515,7 @@
CODE_SIGN_ENTITLEMENTS = Tickle/Tickle.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Tickle/Preview Content\"";
DEVELOPMENT_TEAM = 7P2YB7YDTU;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -540,6 +553,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7P2YB7YDTU;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
Expand All @@ -563,6 +577,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7P2YB7YDTU;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
Expand All @@ -585,6 +600,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7P2YB7YDTU;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
Expand All @@ -607,6 +623,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7P2YB7YDTU;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
Expand Down Expand Up @@ -691,6 +708,21 @@
package = E41219E52C06FC1500873F6B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseFirestoreSwift;
};
E4484CC62C0CC30F0056DDC4 /* FirebaseAuthCombine-Community */ = {
isa = XCSwiftPackageProductDependency;
package = E41219E52C06FC1500873F6B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = "FirebaseAuthCombine-Community";
};
E4484CC82C0CC30F0056DDC4 /* FirebaseDatabase */ = {
isa = XCSwiftPackageProductDependency;
package = E41219E52C06FC1500873F6B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseDatabase;
};
E4484CCA2C0CC30F0056DDC4 /* FirebaseDatabaseSwift */ = {
isa = XCSwiftPackageProductDependency;
package = E41219E52C06FC1500873F6B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseDatabaseSwift;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = E41219AB2C05EE8D00873F6B /* Project object */;
Expand Down
Binary file not shown.
27 changes: 20 additions & 7 deletions Tickle/TickleApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,33 @@

import SwiftUI
import Firebase
import FirebaseDatabaseInternal

class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Database.database().isPersistenceEnabled = true
return true
}
}

@main
struct TickleApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@StateObject var viewModel = MainViewModel()

// Initialize Firebase in the initializer
init() {
FirebaseApp.configure()
}


var body: some Scene {
WindowGroup {
if viewModel.isSignedIn, !viewModel.currentUserId.isEmpty {
ToDoListView()
TabView{
ToDoListView().tabItem{
Label("Home",systemImage: "house")
}
Register().tabItem{
Label("Profile",systemImage: "person.circle")
}
}
} else {
LoginView()
}
Expand Down

0 comments on commit 730a574

Please sign in to comment.