Skip to content

Commit

Permalink
Merge pull request #8 from team-staccato/feat/#4-home-map
Browse files Browse the repository at this point in the history
[Feat] 홈 화면 - 구글 지도, 마이페이지 버튼
  • Loading branch information
yurim830 authored Jan 10, 2025
2 parents c378482 + 3fc8e3d commit 2545268
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ iOSInjectionProject/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings
**/xcshareddata/WorkspaceSettings.xcsettings
Config.xcconfig
36 changes: 34 additions & 2 deletions Staccato-iOS/Staccato-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
objectVersion = 77;
objects = {

/* Begin PBXBuildFile section */
15926B282D2EF06E00026F56 /* GoogleMaps in Frameworks */ = {isa = PBXBuildFile; productRef = 15926B272D2EF06E00026F56 /* GoogleMaps */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
137153882D26CDCA00EABE10 /* Staccato-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Staccato-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -36,6 +40,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
15926B282D2EF06E00026F56 /* GoogleMaps in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -78,6 +83,7 @@
);
name = "Staccato-iOS";
packageProductDependencies = (
15926B272D2EF06E00026F56 /* GoogleMaps */,
);
productName = "Staccato-iOS";
productReference = 137153882D26CDCA00EABE10 /* Staccato-iOS.app */;
Expand Down Expand Up @@ -107,6 +113,9 @@
);
mainGroup = 1371537F2D26CDCA00EABE10;
minimizedProjectReferenceProxies = 1;
packageReferences = (
15926B262D2EF06E00026F56 /* XCRemoteSwiftPackageReference "ios-maps-sdk" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 137153892D26CDCA00EABE10 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -140,6 +149,8 @@
/* Begin XCBuildConfiguration section */
137153942D26CDCC00EABE10 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = 1371538A2D26CDCA00EABE10 /* Staccato-iOS */;
baseConfigurationReferenceRelativePath = Support/Config.xcconfig;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
Expand Down Expand Up @@ -259,13 +270,15 @@
};
137153972D26CDCC00EABE10 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = 1371538A2D26CDCA00EABE10 /* Staccato-iOS */;
baseConfigurationReferenceRelativePath = Support/Config.xcconfig;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Staccato-iOS/Preview Content\"";
DEVELOPMENT_TEAM = G7X65ZSJ3J;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Staccato-iOS/Support/Info.plist";
Expand Down Expand Up @@ -295,7 +308,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Staccato-iOS/Preview Content\"";
DEVELOPMENT_TEAM = G7X65ZSJ3J;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Staccato-iOS/Support/Info.plist";
Expand Down Expand Up @@ -339,6 +352,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
15926B262D2EF06E00026F56 /* XCRemoteSwiftPackageReference "ios-maps-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/googlemaps/ios-maps-sdk";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 9.2.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
15926B272D2EF06E00026F56 /* GoogleMaps */ = {
isa = XCSwiftPackageProductDependency;
package = 15926B262D2EF06E00026F56 /* XCRemoteSwiftPackageReference "ios-maps-sdk" */;
productName = GoogleMaps;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 137153802D26CDCA00EABE10 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"originHash" : "fe5dd08882d08507f16493adf883e323b1dd5a821ac629f6777702bda6b2ba4e",
"pins" : [
{
"identity" : "ios-maps-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/googlemaps/ios-maps-sdk",
"state" : {
"revision" : "df7ecd2f894fd83f0287f2cfb6842a0dfe6f290b",
"version" : "9.2.0"
}
}
],
"version" : 3
}
23 changes: 23 additions & 0 deletions Staccato-iOS/Staccato-iOS/App/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// AppDelegate.swift
// Staccato-iOS
//
// Created by 김유림 on 1/10/25.
//

import GoogleMaps

import UIKit

// Maps SDK 초기화를 위해 AppDelegate 구현
class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let apiKey = Bundle.main.infoDictionary?["API_KEY"] as! String
GMSServices.provideAPIKey(apiKey)

return true
}
}
2 changes: 2 additions & 0 deletions Staccato-iOS/Staccato-iOS/App/Staccato_iOSApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import SwiftUI

@main
struct Staccato_iOSApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

var body: some Scene {
WindowGroup {
ContentView()
Expand Down
61 changes: 61 additions & 0 deletions Staccato-iOS/Staccato-iOS/Presentation/View/Home/HomeView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// HomeView.swift
// Staccato-iOS
//
// Created by 김유림 on 1/9/25.
//

import GoogleMaps

import SwiftUI

struct HomeView: View {

// MARK: - Body
var body: some View {
NavigationView {
ZStack(alignment: .topLeading) {
MapViewControllerBridge()
.edgesIgnoringSafeArea(.all)

myPageNavigationLink
.padding(20)
}
}
}
}


// MARK: - Components
extension HomeView {
private var myPageNavigationLink: some View {
NavigationLink(destination: TempMyPageView()) {
Image(systemName: "person.circle.fill")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 40, height: 40)
.background(Color.white)
.foregroundStyle(.gray3)
.clipShape(Circle())
.overlay {
Circle().stroke(Color.white, lineWidth: 2)
}
}
}
}

#Preview {
HomeView()
}



// 임시 뷰 - 추후 삭제 예정
struct TempMyPageView: View {
var body: some View {
Text("My Page")
.font(.largeTitle)
.fontWeight(.bold)
.padding()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// MapViewController.swift
// Staccato-iOS
//
// Created by 김유림 on 1/9/25.
//

import GoogleMaps

import UIKit

class MapViewController: UIViewController {

let map = GMSMapView(frame: .zero)
var isAnimating: Bool = false

override func loadView() {
super.loadView()
self.view = map
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// MapViewControllerBridge.swift
// Staccato-iOS
//
// Created by 김유림 on 1/9/25.
//

import GoogleMaps

import SwiftUI

struct MapViewControllerBridge: UIViewControllerRepresentable {

func makeUIViewController(context: Context) -> MapViewController {
return MapViewController()
}

func updateUIViewController(_ uiViewController: MapViewController, context: Context) {
}
}
2 changes: 2 additions & 0 deletions Staccato-iOS/Staccato-iOS/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>API_KEY</key>
<string>$(API_KEY)</string>
<key>UIAppFonts</key>
<array>
<string>PretendardVariable.ttf</string>
Expand Down

0 comments on commit 2545268

Please sign in to comment.