Skip to content

Commit

Permalink
Merge branch 'main' into feature/Onboarding/10
Browse files Browse the repository at this point in the history
  • Loading branch information
isGeekCode committed Jan 28, 2024
2 parents 8d55a94 + 586ec7f commit fbf29ff
Show file tree
Hide file tree
Showing 63 changed files with 221 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Swiftformat
run: brew install swiftformat
- name: Run Swiftformat
Expand Down
45 changes: 9 additions & 36 deletions PyeonHaeng-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
BA0563FB2B61EAD5003D6DC7 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = BA0563FA2B61EAD5003D6DC7 /* .gitkeep */; };
BA0564062B624646003D6DC7 /* Shared.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = BA0564052B624646003D6DC7 /* Shared.xcconfig */; };
BA0564092B6248EA003D6DC7 /* HomeAPI in Frameworks */ = {isa = PBXBuildFile; productRef = BA0564082B6248EA003D6DC7 /* HomeAPI */; };
BA05640B2B6248EA003D6DC7 /* HomeAPISupport in Frameworks */ = {isa = PBXBuildFile; productRef = BA05640A2B6248EA003D6DC7 /* HomeAPISupport */; };
Expand All @@ -28,12 +27,11 @@
BA28F1A42B61572A0052855E /* Pretendard-ExtraBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA28F19A2B61572A0052855E /* Pretendard-ExtraBold.otf */; };
BA28F1A52B61572A0052855E /* Pretendard-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA28F19B2B61572A0052855E /* Pretendard-Light.otf */; };
BA28F1A62B61572A0052855E /* Pretendard-Black.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA28F19C2B61572A0052855E /* Pretendard-Black.otf */; };
BA28F1AD2B616E600052855E /* FontStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F1AC2B616E600052855E /* FontStyles.swift */; };
BA28F1AF2B6173B60052855E /* Text+textStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F1AE2B6173B60052855E /* Text+textStyle.swift */; };
BAA4D9AD2B5A1795005999F8 /* PyeonHaengApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA4D9AC2B5A1795005999F8 /* PyeonHaengApp.swift */; };
BAA4D9AF2B5A1795005999F8 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA4D9AE2B5A1795005999F8 /* SplashView.swift */; };
BAA4D9B12B5A1796005999F8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BAA4D9B02B5A1796005999F8 /* Assets.xcassets */; };
BAA4D9B42B5A1796005999F8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BAA4D9B32B5A1796005999F8 /* Preview Assets.xcassets */; };
BAB569612B639F3000D1E0F9 /* DesignSystem in Frameworks */ = {isa = PBXBuildFile; productRef = BAB569602B639F3000D1E0F9 /* DesignSystem */; };
BAF2BEB32B61236100931AF0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = BAF2BEB22B61236100931AF0 /* Localizable.xcstrings */; };
/* End PBXBuildFile section */

Expand All @@ -48,7 +46,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
BA0563FA2B61EAD5003D6DC7 /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
BA0564022B62179A003D6DC7 /* Core */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Core; sourceTree = "<group>"; };
BA0564032B6219D4003D6DC7 /* APIService */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = APIService; sourceTree = "<group>"; };
BA0564052B624646003D6DC7 /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Shared.xcconfig; path = XCConfig/Shared.xcconfig; sourceTree = SOURCE_ROOT; };
Expand All @@ -70,13 +67,12 @@
BA28F19B2B61572A0052855E /* Pretendard-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Light.otf"; sourceTree = "<group>"; };
BA28F19C2B61572A0052855E /* Pretendard-Black.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Black.otf"; sourceTree = "<group>"; };
BA28F1A72B6157E90052855E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BA28F1AC2B616E600052855E /* FontStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontStyles.swift; sourceTree = "<group>"; };
BA28F1AE2B6173B60052855E /* Text+textStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Text+textStyle.swift"; sourceTree = "<group>"; };
BAA4D9A92B5A1795005999F8 /* PyeonHaeng-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PyeonHaeng-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
BAA4D9AC2B5A1795005999F8 /* PyeonHaengApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PyeonHaengApp.swift; sourceTree = "<group>"; };
BAA4D9AE2B5A1795005999F8 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = "<group>"; };
BAA4D9B02B5A1796005999F8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
BAA4D9B32B5A1796005999F8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
BABFEA6F2B6399C30084C0EC /* Shared */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Shared; sourceTree = "<group>"; };
BAF2BEB22B61236100931AF0 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -95,20 +91,13 @@
BA05640D2B6248EA003D6DC7 /* Network in Frameworks */,
BA05640B2B6248EA003D6DC7 /* HomeAPISupport in Frameworks */,
BA0564092B6248EA003D6DC7 /* HomeAPI in Frameworks */,
BAB569612B639F3000D1E0F9 /* DesignSystem in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
BA0563F92B61EABA003D6DC7 /* Components */ = {
isa = PBXGroup;
children = (
BA0563FA2B61EAD5003D6DC7 /* .gitkeep */,
);
path = Components;
sourceTree = "<group>";
};
BA0564042B624629003D6DC7 /* XCConfig */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -231,27 +220,10 @@
path = Fonts;
sourceTree = "<group>";
};
BA28F1AA2B616E2D0052855E /* DesignSystem */ = {
isa = PBXGroup;
children = (
BA0563F92B61EABA003D6DC7 /* Components */,
BA28F1AB2B616E540052855E /* Fonts */,
BA28F1AE2B6173B60052855E /* Text+textStyle.swift */,
);
path = DesignSystem;
sourceTree = "<group>";
};
BA28F1AB2B616E540052855E /* Fonts */ = {
isa = PBXGroup;
children = (
BA28F1AC2B616E600052855E /* FontStyles.swift */,
);
path = Fonts;
sourceTree = "<group>";
};
BAA4D9A02B5A1795005999F8 = {
isa = PBXGroup;
children = (
BABFEA6F2B6399C30084C0EC /* Shared */,
BA0564032B6219D4003D6DC7 /* APIService */,
BA0564022B62179A003D6DC7 /* Core */,
BAA4D9AA2B5A1795005999F8 /* Products */,
Expand All @@ -274,7 +246,6 @@
BAA4D9AB2B5A1795005999F8 /* PyeonHaeng-iOS */ = {
isa = PBXGroup;
children = (
BA28F1AA2B616E2D0052855E /* DesignSystem */,
BAA4D9B22B5A1796005999F8 /* Preview Content */,
BA28F1702B6152E90052855E /* Resources */,
BA28F1712B6152EE0052855E /* Sources */,
Expand Down Expand Up @@ -330,6 +301,7 @@
BA0564082B6248EA003D6DC7 /* HomeAPI */,
BA05640A2B6248EA003D6DC7 /* HomeAPISupport */,
BA05640C2B6248EA003D6DC7 /* Network */,
BAB569602B639F3000D1E0F9 /* DesignSystem */,
);
productName = "PyeonHaeng-iOS";
productReference = BAA4D9A92B5A1795005999F8 /* PyeonHaeng-iOS.app */;
Expand Down Expand Up @@ -401,7 +373,6 @@
BA0564062B624646003D6DC7 /* Shared.xcconfig in Resources */,
BAF2BEB32B61236100931AF0 /* Localizable.xcstrings in Resources */,
BA28F1A22B61572A0052855E /* Pretendard-Medium.otf in Resources */,
BA0563FB2B61EAD5003D6DC7 /* .gitkeep in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -463,11 +434,9 @@
BA28F1852B6155810052855E /* OnboardingView.swift in Sources */,
BA28F1882B6155910052855E /* HomeView.swift in Sources */,
BA28F18B2B6155BD0052855E /* ProductInfoView.swift in Sources */,
BA28F1AF2B6173B60052855E /* Text+textStyle.swift in Sources */,
BA28F1912B61566E0052855E /* ProductSearchView.swift in Sources */,
BA28F18E2B6156420052855E /* SettingsView.swift in Sources */,
BAA4D9AF2B5A1795005999F8 /* SplashView.swift in Sources */,
BA28F1AD2B616E600052855E /* FontStyles.swift in Sources */,
BAA4D9AD2B5A1795005999F8 /* PyeonHaengApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -753,6 +722,10 @@
isa = XCSwiftPackageProductDependency;
productName = Network;
};
BAB569602B639F3000D1E0F9 /* DesignSystem */ = {
isa = XCSwiftPackageProductDependency;
productName = DesignSystem;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = BAA4D9A12B5A1795005999F8 /* Project object */;
Expand Down
1 change: 0 additions & 1 deletion PyeonHaeng-iOS/DesignSystem/Components/.gitkeep

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x20",
"green" : "0x20",
"red" : "0x20"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xDE",
"green" : "0xDE",
"red" : "0xDE"
}
},
"idiom" : "universal"
}
],
Expand Down
13 changes: 0 additions & 13 deletions PyeonHaeng-iOS/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,5 @@
<dict>
<key>BaseURL</key>
<string>$(BASE_URL)</string>
<key>UIAppFonts</key>
<array>
<string>Pretendard-Thin.otf</string>
<string>Pretendard-SemiBold.otf</string>
<string>Pretendard-Regular.otf</string>
<string>Pretendard-Medium.otf</string>
<string>Pretendard-Light.otf</string>
<string>Pretendard-ExtraLight.otf</string>
<string>Pretendard-ExtraBold.otf</string>
<string>Pretendard-Bold.otf</string>
<string>Pretendard-Black.otf</string>
<string>EF_jejudoldam.otf</string>
</array>
</dict>
</plist>
5 changes: 5 additions & 0 deletions PyeonHaeng-iOS/Sources/PyeonHaengApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
// Created by 홍승현 on 1/19/24.
//

import DesignSystem
import SwiftUI

@main
struct PyeonHaengApp: App {
init() {
Fonts.registerFonts() // 앱을 실행하기 전에 폰트를 로드합니다.
}

var body: some Scene {
WindowGroup {
SplashView()
Expand Down
8 changes: 8 additions & 0 deletions Shared/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
21 changes: 21 additions & 0 deletions Shared/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Shared",
platforms: [.iOS(.v17)],
products: [
.library(
name: "DesignSystem",
targets: ["DesignSystem"]
),
],
targets: [
.target(
name: "DesignSystem",
resources: [.process("Resources")]
),
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.900",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.900",
"blue" : "0x12",
"green" : "0x12",
"red" : "0x12"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions Shared/Sources/DesignSystem/Sources/Color+Resource.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// Color+Resource.swift
//
//
// Created by 홍승현 on 1/27/24.
//

import SwiftUI

public extension Color {
static let gray050: Color = .init(.gray050)
static let gray100: Color = .init(.gray100)
static let gray200: Color = .init(.gray200)
static let gray300: Color = .init(.gray300)
static let gray400: Color = .init(.gray400)
static let gray500: Color = .init(.gray500)
static let gray600: Color = .init(.gray600)
static let gray700: Color = .init(.gray700)
static let gray800: Color = .init(.gray800)
static let gray900: Color = .init(.gray900)

static let green050: Color = .init(.green050)
static let green100: Color = .init(.green100)
static let green200: Color = .init(.green200)
static let green300: Color = .init(.green300)
static let green400: Color = .init(.green400)
static let green500: Color = .init(.green500)
static let green600: Color = .init(.green600)
static let green700: Color = .init(.green700)
static let green800: Color = .init(.green800)
static let green900: Color = .init(.green900)

static let pyeonHaengBlue: Color = .init(.pyeonHaengBlue)
static let pyeonHaengGreen: Color = .init(.pyeonHaengGreen)
static let pyeonHaengRed: Color = .init(.pyeonHaengRed)
static let pyeonHaengYellow: Color = .init(.pyeonHaengYellow)

static let blur: Color = .init(.blur)
}
44 changes: 44 additions & 0 deletions Shared/Sources/DesignSystem/Sources/Fonts.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Fonts.swift
//
//
// Created by 홍승현 on 1/26/24.
//

import CoreText
import Foundation

// MARK: - Fonts

/// `Fonts` 열거형은 커스텀 폰트를 등록하는 데 사용됩니다.
public enum Fonts {
/// 이 메서드는 `Pretendard`와 `DolDam` 폰트를 등록합니다.
/// 각각의 폰트 이름을 순회하면서 `registerFont` 메서드를 호출하여 폰트를 등록합니다.
public static func registerFonts() {
// Pretendard 폰트 등록
for fontName in Pretendard.allCases.map(\.rawValue) {
registerFont(bundle: .module, fontName: fontName, fontExtension: "otf")
}

// DolDam 폰트 등록
for fontName in DolDam.allCases.map(\.rawValue) {
registerFont(bundle: .module, fontName: fontName, fontExtension: "otf")
}
}

/// 주어진 폰트 이름과 확장자를 사용하여 폰트를 동적으로 등록합니다.
/// - Parameters:
/// - bundle: 폰트 파일을 포함하고 있는 번들.
/// - fontName: 등록할 폰트의 이름.
/// - fontExtension: 폰트 파일의 확장자.
private static func registerFont(bundle: Bundle, fontName: String, fontExtension: String) {
guard let fontURL = bundle.url(forResource: fontName, withExtension: fontExtension),
let fontDataDriver = CGDataProvider(url: fontURL as CFURL),
let font = CGFont(fontDataDriver)
else {
return // 폰트 로딩에 실패할 경우 함수를 종료합니다.
}
// CoreText를 사용하여 폰트를 시스템에 등록합니다.
CTFontManagerRegisterGraphicsFont(font, nil)
}
}
Loading

0 comments on commit fbf29ff

Please sign in to comment.