Skip to content

Commit

Permalink
feat: updated project settings and new bottom bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandram-Dutta committed Oct 11, 2024
1 parent 091d9ff commit 3756fcf
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 96 deletions.
87 changes: 7 additions & 80 deletions VITTY/VITTY.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
525AA7A92B4B0164003C6A12 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525AA7A82B4B0164003C6A12 /* SearchView.swift */; };
525F759D2B809F8400E3B418 /* LectureDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525F759C2B809F8400E3B418 /* LectureDetailView.swift */; };
527E3E082B7662920086F23D /* TimeTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527E3E072B7662920086F23D /* TimeTableView.swift */; };
528B25602C1D7E960071EB6E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 528B255F2C1D7E960071EB6E /* GoogleService-Info.plist */; };
528B25622C1D7E9C0071EB6E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 528B25612C1D7E9C0071EB6E /* GoogleService-Info.plist */; };
528CF1732B769B18007298A0 /* TimeTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528CF1722B769B18007298A0 /* TimeTable.swift */; };
528CF1762B769E22007298A0 /* TimeTableViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528CF1752B769E22007298A0 /* TimeTableViewModel.swift */; };
528CF1782B769E64007298A0 /* TimeTableAPIService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528CF1772B769E64007298A0 /* TimeTableAPIService.swift */; };
Expand All @@ -89,6 +87,7 @@
52D5AB912B6FE90100B2E66D /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D5AB902B6FE90100B2E66D /* Constants.swift */; };
52D5AB972B6FFC8F00B2E66D /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D5AB962B6FFC8F00B2E66D /* LoginView.swift */; };
52DBBE882B47B6B30014C57A /* FriendCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52DBBE872B47B6B30014C57A /* FriendCard.swift */; };
52EE849E2CB9CD1F00CD864C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52EE849D2CB9CD1F00CD864C /* GoogleService-Info.plist */; };
5D72EDD82AB98D6D00704BF5 /* URLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D72EDD72AB98D6D00704BF5 /* URLSession.swift */; };
5D72EDDD2AB990BB00704BF5 /* AuthRequestBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D72EDDC2AB990BB00704BF5 /* AuthRequestBody.swift */; };
5D7F04F72AAB9E9900ECED15 /* APIConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D7F04F62AAB9E9900ECED15 /* APIConstants.swift */; };
Expand Down Expand Up @@ -148,8 +147,6 @@
525AA7A82B4B0164003C6A12 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = "<group>"; };
525F759C2B809F8400E3B418 /* LectureDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LectureDetailView.swift; sourceTree = "<group>"; };
527E3E072B7662920086F23D /* TimeTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTableView.swift; sourceTree = "<group>"; };
528B255F2C1D7E960071EB6E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
528B25612C1D7E9C0071EB6E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
528CF1722B769B18007298A0 /* TimeTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTable.swift; sourceTree = "<group>"; };
528CF1752B769E22007298A0 /* TimeTableViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTableViewModel.swift; sourceTree = "<group>"; };
528CF1772B769E64007298A0 /* TimeTableAPIService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTableAPIService.swift; sourceTree = "<group>"; };
Expand All @@ -162,6 +159,7 @@
52D5AB902B6FE90100B2E66D /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
52D5AB962B6FFC8F00B2E66D /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
52DBBE872B47B6B30014C57A /* FriendCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendCard.swift; sourceTree = "<group>"; };
52EE849D2CB9CD1F00CD864C /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
5D72EDD72AB98D6D00704BF5 /* URLSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSession.swift; sourceTree = "<group>"; };
5D72EDDC2AB990BB00704BF5 /* AuthRequestBody.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthRequestBody.swift; sourceTree = "<group>"; };
5D7F04F62AAB9E9900ECED15 /* APIConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIConstants.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -267,6 +265,7 @@
314A408227383BEC0058082F = {
isa = PBXGroup;
children = (
52EE849D2CB9CD1F00CD864C /* GoogleService-Info.plist */,
5251A7FF2B46E3C000D44CFE /* .swift-format */,
314A408E27383BEC0058082F /* VITTYApp.swift */,
314A409027383BEC0058082F /* ContentView.swift */,
Expand All @@ -290,7 +289,6 @@
314A408D27383BEC0058082F /* VITTY */ = {
isa = PBXGroup;
children = (
528B255C2C1D7E6C0071EB6E /* Firebase */,
527E3E022B76626A0086F23D /* TimeTable */,
521562A92B70B0E50054F051 /* Instruction */,
52D5AB8A2B6FE4C600B2E66D /* Shared */,
Expand Down Expand Up @@ -558,31 +556,6 @@
path = ViewModel;
sourceTree = "<group>";
};
528B255C2C1D7E6C0071EB6E /* Firebase */ = {
isa = PBXGroup;
children = (
528B255E2C1D7E790071EB6E /* Prod */,
528B255D2C1D7E750071EB6E /* Dev */,
);
path = Firebase;
sourceTree = "<group>";
};
528B255D2C1D7E750071EB6E /* Dev */ = {
isa = PBXGroup;
children = (
528B255F2C1D7E960071EB6E /* GoogleService-Info.plist */,
);
path = Dev;
sourceTree = "<group>";
};
528B255E2C1D7E790071EB6E /* Prod */ = {
isa = PBXGroup;
children = (
528B25612C1D7E9C0071EB6E /* GoogleService-Info.plist */,
);
path = Prod;
sourceTree = "<group>";
};
528CF1712B769AF2007298A0 /* Models */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -688,10 +661,8 @@
buildPhases = (
314A408727383BEC0058082F /* Sources */,
314A408827383BEC0058082F /* Frameworks */,
310EAC3E27C62921003EBFAA /* Setup Firebase Environment GoogleService-Info.plist */,
314A408927383BEC0058082F /* Resources */,
3105872727A3ECBD00C2FC41 /* Embed Foundation Extensions */,
316BC45B27C8B6CA0001C12C /* Crashlytics Script */,
);
buildRules = (
);
Expand Down Expand Up @@ -745,7 +716,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1540;
LastUpgradeCheck = 1520;
LastUpgradeCheck = 1610;
TargetAttributes = {
314A408A27383BEC0058082F = {
CreatedOnToolsVersion = 13.0;
Expand Down Expand Up @@ -788,56 +759,14 @@
31128CF92772F57E0084C9EA /* Poppins-Medium.ttf in Resources */,
31128CFA2772F57E0084C9EA /* Poppins-SemiBoldItalic.ttf in Resources */,
31128CFC2772F57E0084C9EA /* Poppins-Regular.ttf in Resources */,
528B25602C1D7E960071EB6E /* GoogleService-Info.plist in Resources */,
528B25622C1D7E9C0071EB6E /* GoogleService-Info.plist in Resources */,
52EE849E2CB9CD1F00CD864C /* GoogleService-Info.plist in Resources */,
314A409627383BEE0058082F /* Preview Assets.xcassets in Resources */,
314A409327383BEE0058082F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
310EAC3E27C62921003EBFAA /* Setup Firebase Environment GoogleService-Info.plist */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Setup Firebase Environment GoogleService-Info.plist";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "# Name of the resource we're selectively copying\nGOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist\n\n# Get references to dev and prod versions of the GoogleService-Info.plist\n# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)\nGOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Dev/${GOOGLESERVICE_INFO_PLIST}\nGOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Prod/${GOOGLESERVICE_INFO_PLIST}\n\n# Make sure the dev version of GoogleService-Info.plist exists\necho \"Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}\"\nif [ ! -f $GOOGLESERVICE_INFO_DEV ]\nthen\n echo \"No Development GoogleService-Info.plist found. Please ensure it's in the proper directory.\"\n exit 1\nfi\n\n# Make sure the prod version of GoogleService-Info.plist exists\necho \"Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}\"\nif [ ! -f $GOOGLESERVICE_INFO_PROD ]\nthen\n echo \"No Production GoogleService-Info.plist found. Please ensure it's in the proper directory.\"\n exit 1\nfi\n\n# Get a reference to the destination location for the GoogleService-Info.plist\nPLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app\necho \"Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}\"\n\n# Copy over the prod GoogleService-Info.plist for Release builds\nif [ \"${CONFIGURATION}\" == \"Release\" ]\nthen\n echo \"Using ${GOOGLESERVICE_INFO_PROD}\"\n cp \"${GOOGLESERVICE_INFO_PROD}\" \"${PLIST_DESTINATION}\"\nelse\n echo \"Using ${GOOGLESERVICE_INFO_DEV}\"\n cp \"${GOOGLESERVICE_INFO_DEV}\" \"${PLIST_DESTINATION}\"\nfi\n";
};
316BC45B27C8B6CA0001C12C /* Crashlytics Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}",
"$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)",
);
name = "Crashlytics Script";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
314A408727383BEC0058082F /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -894,7 +823,6 @@
314A409C27383BEE0058082F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -930,6 +858,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -957,7 +886,6 @@
314A409D27383BEE0058082F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -993,6 +921,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -1015,7 +944,6 @@
314A409F27383BEE0058082F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = VITTY/VITTY.entitlements;
Expand Down Expand Up @@ -1057,7 +985,6 @@
314A40A027383BEE0058082F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = VITTY/VITTYRelease.entitlements;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1610"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down
4 changes: 2 additions & 2 deletions VITTY/VITTY/Auth/ViewModels/AuthViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class AuthViewModel: NSObject, ASAuthorizationControllerDelegate {
private func signInWithGoogle() async throws {
logger.info("Signing in with Google...")

let screen = await UIApplication.shared.connectedScenes.first as! UIWindowScene
let window = await screen.windows.first!.rootViewController!
let screen = UIApplication.shared.connectedScenes.first as! UIWindowScene
let window = screen.windows.first!.rootViewController!

let signInResult = try await GIDSignIn.sharedInstance.signIn(withPresenting: window)
let credential = GoogleAuthProvider.credential(
Expand Down
2 changes: 1 addition & 1 deletion VITTY/VITTY/Connect/View/ConnectPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ struct ConnectPage: View {
}
.padding(.bottom)
}

.listRowBackground(
RoundedRectangle(cornerRadius: 15)
.fill(Color("Secondary"))
.padding(.bottom)
)
.listRowSeparator(.hidden)
}
.safeAreaPadding(EdgeInsets(top: 0, leading: 0, bottom: 100, trailing: 0))
.scrollContentBackground(.hidden)
.refreshable {
communityPageViewModel.fetchData(
Expand Down
16 changes: 8 additions & 8 deletions VITTY/VITTY/Home/View/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import SwiftUI

struct HomeView: View {

@State private var selectedPage = 0
@State private var selectedPage = 1

var body: some View {
ZStack (alignment: .bottom) {
switch (selectedPage) {
case 0:
NavigationStack {
ZStack {
BackgroundView()
}
.navigationTitle("Courses")
}
// case 0:
// NavigationStack {
// ZStack {
// BackgroundView()
// }
// .navigationTitle("Courses")
// }
case 1:
TimeTableView(friend: nil)
.tabItem {
Expand Down
4 changes: 2 additions & 2 deletions VITTY/VITTY/Shared/BottomBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct BottomBarView: View {

var body: some View {
HStack {
TabButtonView(value: $presentTab, name: "Courses", image: "book.closed.fill", tabNo: 0, namespace: bottomBarAnimation)
// TabButtonView(value: $presentTab, name: "Courses", image: "book.closed.fill", tabNo: 0, namespace: bottomBarAnimation)
TabButtonView(value: $presentTab, name: "Schedule", image: "calendar.badge.clock", tabNo: 1, namespace: bottomBarAnimation)
TabButtonView(value: $presentTab, name: "Connect", image: "person.2.fill", tabNo: 2, namespace: bottomBarAnimation)
}
Expand All @@ -28,7 +28,7 @@ struct BottomBarView: View {
.gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local)
.onEnded({ value in
if value.translation.width < 0 {
if presentTab == 0 {
if presentTab == 1 {
return
}
withAnimation (.bouncy(extraBounce: 0.1)) {
Expand Down
1 change: 1 addition & 0 deletions VITTY/VITTY/TimeTable/Views/TimeTableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct TimeTableView: View {
)
.listRowSeparator(.hidden)
}
.safeAreaPadding(EdgeInsets(top: 0, leading: 0, bottom: 100, trailing: 0))
.sheet(item: $selectedLecture) { lecture in
LectureDetailView(lecture: lecture)
}
Expand Down
2 changes: 1 addition & 1 deletion VITTY/VITTY/Username/Views/UsernameView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct UsernameView: View {
Button(action: {
Task {
// TODO: Important
//

// isLoading = true
// await authViewModel.signInServer(username: username, regNo: regNo)
// isLoading = false
Expand Down

0 comments on commit 3756fcf

Please sign in to comment.