From 5bdca02af16cdade627113fe656225e0514c8520 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Tue, 7 Nov 2023 20:15:48 -0500 Subject: [PATCH] fixed merge --- app/.DS_Store | Bin 6148 -> 6148 bytes app/newHere1/.DS_Store | Bin 6148 -> 6148 bytes .../newHere.xcodeproj/project.pbxproj | 22 ++++++++++++++++-- app/newHere1/newHere/ContentView.swift | 4 ++-- .../newHere/CustomARViewRepresentable.swift | 2 +- app/newHere1/newHere/Registration.swift | 4 ++-- 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/.DS_Store b/app/.DS_Store index 3ffd0dca9f08649c6eecd9284de664316fd8086d..d7409f4fb009b101cdb6e51eae4a47286a2df3e9 100644 GIT binary patch delta 105 zcmZoMXfc=|#>B)qu~2NHo}wrl0|Nsi1A_nqLn=cN5E~|y7Z+?ST+YbIHu(XY$m9#G z4IJi{W;zPS#s-rYu-I>&&Q`#B!ku~2NHo}wrZ0|Nsi1A_oVQh9MfQcivnkiTQ|LgwYnydWtSh75*O zh9ZX4$qGyj9HvGFItnJnmXlX7+1JCR%7TmXa`N-iAto{K!L%^wF;p-lGvqU*0F5XB z8j{bDm6L85oSdIq08|UKw^0>H;#HrU@8SY=6-P?nsw6damx z>nX@UcGw4o$p*|KU_V0{Em^CKHF>|rWuyClV)J)D}HsOFUk2+3b WR-1f*nU67H^FwAemd&gj|M>x^b`w$n delta 72 zcmZoMXffC@kBP(7$UsNI#MpB3GNwKzX2!_{%o>y9n7PARFvvd6A2LL(e7t#O# diff --git a/app/newHere1/newHere.xcodeproj/project.pbxproj b/app/newHere1/newHere.xcodeproj/project.pbxproj index 0735809..6464996 100644 --- a/app/newHere1/newHere.xcodeproj/project.pbxproj +++ b/app/newHere1/newHere.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1506543B2AF8484A004C7909 /* api_call.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1506543A2AF84849004C7909 /* api_call.swift */; }; 1531A8DE2AED95FD009F644E /* newHereApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1531A8DD2AED95FD009F644E /* newHereApp.swift */; }; 1531A8E02AED95FD009F644E /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1531A8DF2AED95FD009F644E /* ContentView.swift */; }; 1531A8E22AED95FF009F644E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1531A8E12AED95FF009F644E /* Assets.xcassets */; }; @@ -20,6 +21,9 @@ 1531A90F2AED9917009F644E /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1531A90E2AED9917009F644E /* Post.swift */; }; 1531A9132AEDAE2A009F644E /* LocationDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1531A9122AEDAE2A009F644E /* LocationDataManager.swift */; }; 1531A9152AEDCADB009F644E /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1531A9142AEDCADB009F644E /* Message.swift */; }; + 15582E372AFB1544003910A2 /* Registration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15582E362AFB1544003910A2 /* Registration.swift */; }; + 1562EDE82AF6EA2B00A41779 /* CustomARView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1562EDE62AF6EA2B00A41779 /* CustomARView.swift */; }; + 1562EDE92AF6EA2B00A41779 /* CustomARViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1562EDE72AF6EA2B00A41779 /* CustomARViewRepresentable.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -40,6 +44,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 1506543A2AF84849004C7909 /* api_call.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = api_call.swift; sourceTree = ""; }; 1531A8DA2AED95FD009F644E /* newHere.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = newHere.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1531A8DD2AED95FD009F644E /* newHereApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = newHereApp.swift; sourceTree = ""; }; 1531A8DF2AED95FD009F644E /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -57,6 +62,9 @@ 1531A90E2AED9917009F644E /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = ""; }; 1531A9122AEDAE2A009F644E /* LocationDataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationDataManager.swift; sourceTree = ""; }; 1531A9142AEDCADB009F644E /* Message.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = ""; }; + 15582E362AFB1544003910A2 /* Registration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Registration.swift; sourceTree = ""; }; + 1562EDE62AF6EA2B00A41779 /* CustomARView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomARView.swift; sourceTree = ""; }; + 1562EDE72AF6EA2B00A41779 /* CustomARViewRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomARViewRepresentable.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -110,9 +118,13 @@ 1531A8DD2AED95FD009F644E /* newHereApp.swift */, 1531A8DF2AED95FD009F644E /* ContentView.swift */, 1531A9082AED9618009F644E /* Home.swift */, + 1562EDE62AF6EA2B00A41779 /* CustomARView.swift */, + 1562EDE72AF6EA2B00A41779 /* CustomARViewRepresentable.swift */, 1531A90C2AED9663009F644E /* Messages.swift */, 1531A90A2AED964A009F644E /* Profile.swift */, 1531A90E2AED9917009F644E /* Post.swift */, + 15582E362AFB1544003910A2 /* Registration.swift */, + 1506543A2AF84849004C7909 /* api_call.swift */, 1531A9142AEDCADB009F644E /* Message.swift */, 1531A9122AEDAE2A009F644E /* LocationDataManager.swift */, 1531A8E12AED95FF009F644E /* Assets.xcassets */, @@ -281,6 +293,10 @@ 1531A8E02AED95FD009F644E /* ContentView.swift in Sources */, 1531A90B2AED964A009F644E /* Profile.swift in Sources */, 1531A90D2AED9663009F644E /* Messages.swift in Sources */, + 15582E372AFB1544003910A2 /* Registration.swift in Sources */, + 1562EDE82AF6EA2B00A41779 /* CustomARView.swift in Sources */, + 1506543B2AF8484A004C7909 /* api_call.swift in Sources */, + 1562EDE92AF6EA2B00A41779 /* CustomARViewRepresentable.swift in Sources */, 1531A90F2AED9917009F644E /* Post.swift in Sources */, 1531A9152AEDCADB009F644E /* Message.swift in Sources */, 1531A9092AED9618009F644E /* Home.swift in Sources */, @@ -449,6 +465,7 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_LSApplicationCategoryType = ""; + INFOPLIST_KEY_NSCameraUsageDescription = "Here needs access to your camera."; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Here needs to access your location data to tell you your location"; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; @@ -460,7 +477,7 @@ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 14.0; @@ -489,6 +506,7 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_LSApplicationCategoryType = ""; + INFOPLIST_KEY_NSCameraUsageDescription = "Here needs access to your camera."; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Here needs to access your location data to tell you your location"; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; @@ -500,7 +518,7 @@ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 14.0; diff --git a/app/newHere1/newHere/ContentView.swift b/app/newHere1/newHere/ContentView.swift index 57a42a2..1ee0ad8 100644 --- a/app/newHere1/newHere/ContentView.swift +++ b/app/newHere1/newHere/ContentView.swift @@ -21,8 +21,8 @@ struct ContentView: View { } else { RegistrationView(isRegistered: $isRegistered) } - HomePageView() - .environmentObject(locationDataManager) +// HomePageView() +// .environmentObject(locationDataManager) // if isRegistered { // HomePageView() // } else { diff --git a/app/newHere1/newHere/CustomARViewRepresentable.swift b/app/newHere1/newHere/CustomARViewRepresentable.swift index 6df2a29..c2b8a9b 100644 --- a/app/newHere1/newHere/CustomARViewRepresentable.swift +++ b/app/newHere1/newHere/CustomARViewRepresentable.swift @@ -103,7 +103,7 @@ struct CustomARViewRepresentable: UIViewRepresentable { // Define the range of random positions for x, y, and z coordinates let xRange: ClosedRange = -3.0...3.0 // Represents a 10-meter width (-5m to +5m) - let yRange: ClosedRange = 0.0...3.0 // Represents a height range above the ground (0m to +2m) + let yRange: ClosedRange = -1.5...2.0 // Represents a height range above the ground (0m to +2m) let zRange: ClosedRange = -3.0...3.0 // Represents a 10-meter depth (-5m to +5m) for message in messages { diff --git a/app/newHere1/newHere/Registration.swift b/app/newHere1/newHere/Registration.swift index 082de88..f21fcd1 100644 --- a/app/newHere1/newHere/Registration.swift +++ b/app/newHere1/newHere/Registration.swift @@ -8,7 +8,7 @@ import SwiftUI let registerUrlString = "https://here-swe.vercel.app/auth/register" -let apiKey = "qe5YT6jOgiA422_UcdbmVxxG1Z6G48aHV7fSV4TbAPs" +let regApiKey = "qe5YT6jOgiA422_UcdbmVxxG1Z6G48aHV7fSV4TbAPs" struct RegistrationView: View { @State private var firstName: String = "" @@ -70,7 +70,7 @@ struct RegistrationView: View { request.httpMethod = "POST" request.httpBody = jsonData request.setValue("application/json", forHTTPHeaderField: "Content-Type") - request.setValue(apiKey, forHTTPHeaderField: "x-api-key") + request.setValue(regApiKey, forHTTPHeaderField: "x-api-key") URLSession.shared.dataTask(with: request) { data, response, error in