diff --git a/.gitignore b/.gitignore index 7951a3b..551a3f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,70 @@ +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno + +### Projects ### *.xcodeproj -*.DS_Store \ No newline at end of file +*.xcworkspace + +### Tuist derived files ### +graph.dot +Derived/ + +### Tuist managed dependencies ### +Tuist/Dependencies diff --git a/.gitmessage.txt b/.gitmessage.txt new file mode 100644 index 0000000..b2cc22e --- /dev/null +++ b/.gitmessage.txt @@ -0,0 +1,32 @@ +### [optional scope]: + +# 50자 이내로 한 줄로 작성, 마침표 사용하지 않음 ------------------| + +### [optional body] + +# 72자 이내로 작성, "어떻게"보다 "무엇을", "왜"를 설명, 여러 줄인 경우 '-'로 구분 ----------------| + +### [optional footer(s)] + +# 코드 작업과 관련된 이슈 번호 또는 참조 링크 등을 추가 + + +### 제목 타입 +# feat : 새로운 기능 추가 +# fix : 버그 수정 +# build : 빌드 시스템 또는 외부 종속성 변경 +# ci : CI 구성 파일 및 스크립트 변경 +# chore : (코드의 수정 없이) 다른 작업들을 수행 +# docs : 문서 수정 +# perf : 성능 향상을 위한 코드 변경 +# refactor : 코드 리팩토링 +# revert : 이전 커밋을 되돌릴 때 사용 +# style : 코드의 형식, 들여쓰기, 공백 등의 스타일 수정 +# test : 테스트 추가 및 수정 +# wip : 작업 중인 코드를 나타낼 때 사용 + +### 꼬리말 유형 +# Fixes : 해당 커밋이 특정 이슈를 해결했음 +# Closes : 해당 커밋이 특정 이슈를 닫았음 +# Refs : 해당 커밋이 특정 이슈와 관련이 있음 +# Seel also : 다른 관련 이슈와의 연결 diff --git a/Project.swift b/Project.swift new file mode 100644 index 0000000..d32396e --- /dev/null +++ b/Project.swift @@ -0,0 +1,66 @@ +import ProjectDescription + +// MARK: - Project Factory + +protocol ProjectFactory { + var projectName: String { get } + var dependencies: [TargetDependency] { get } + + func generateTarget() -> [Target] +} + +// MARK: - iBox Factory + +class iBoxFactory: ProjectFactory { + let projectName: String = "iBox" + let bundleId: String = "com.box42.iBox" + + let dependencies: [TargetDependency] = [ + .external(name: "SnapKit") + ] + + let infoPlist: [String: Plist.Value] = [ + "ITSAppUsesNonExemptEncryption": false, + "CFBundleName": "iBox", + "CFBundleShortVersionString": "1.2.1", + "CFBundleVersion": "1", + "UILaunchStoryboardName": "LaunchScreen", + "UIApplicationSceneManifest": [ + "UIApplicationSupportsMultipleScenes": false, + "UISceneConfigurations": [ + "UIWindowSceneSessionRoleApplication": [ + [ + "UISceneConfigurationName": "Default Configuration", + "UISceneDelegateClassName": "$(PRODUCT_MODULE_NAME).SceneDelegate" + ], + ] + ] + ], + "UIUserInterfaceStyle": "Light" + ] + + func generateTarget() -> [ProjectDescription.Target] {[ + Target( + name: projectName, + destinations: .iOS, + product: .app, + bundleId: bundleId, + deploymentTargets: .iOS("15.0"), + infoPlist: .extendingDefault(with: infoPlist), + sources: ["\(projectName)/Sources/**"], + resources: "\(projectName)/Resources/**", + dependencies: dependencies + ) + ]} + + +} + +// MARK: - Project + +let factory = iBoxFactory() + +let project: Project = .init( + name: factory.projectName, + targets: factory.generateTarget() +) diff --git a/Tuist/Config.swift b/Tuist/Config.swift new file mode 100644 index 0000000..ff8e64f --- /dev/null +++ b/Tuist/Config.swift @@ -0,0 +1,3 @@ +import ProjectDescription + +let config = Config() diff --git a/Tuist/Dependencies.swift b/Tuist/Dependencies.swift new file mode 100644 index 0000000..b258631 --- /dev/null +++ b/Tuist/Dependencies.swift @@ -0,0 +1,17 @@ +// +// Dependencies.swift +// Config +// +// Created by jiyeon on 12/26/23. +// + +import ProjectDescription + +let spm = SwiftPackageManagerDependencies([ + .remote(url: "https://github.com/SnapKit/SnapKit.git", requirement: .upToNextMinor(from: "5.0.1")) +]) + +let dependencies = Dependencies( + swiftPackageManager: spm, + platforms: [.iOS] +) diff --git a/iBox/Info.plist b/iBox/Info.plist deleted file mode 100644 index 0eb786d..0000000 --- a/iBox/Info.plist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - - - - - - diff --git a/iBox/Assets.xcassets/AccentColor.colorset/Contents.json b/iBox/Resources/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from iBox/Assets.xcassets/AccentColor.colorset/Contents.json rename to iBox/Resources/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/iBox/Assets.xcassets/AppIcon.appiconset/Contents.json b/iBox/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from iBox/Assets.xcassets/AppIcon.appiconset/Contents.json rename to iBox/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/iBox/Assets.xcassets/Contents.json b/iBox/Resources/Assets.xcassets/Contents.json similarity index 100% rename from iBox/Assets.xcassets/Contents.json rename to iBox/Resources/Assets.xcassets/Contents.json diff --git a/iBox/Base.lproj/LaunchScreen.storyboard b/iBox/Resources/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from iBox/Base.lproj/LaunchScreen.storyboard rename to iBox/Resources/Base.lproj/LaunchScreen.storyboard diff --git a/iBox/iBox.xcdatamodeld/.xccurrentversion b/iBox/Resources/iBox.xcdatamodeld/.xccurrentversion similarity index 100% rename from iBox/iBox.xcdatamodeld/.xccurrentversion rename to iBox/Resources/iBox.xcdatamodeld/.xccurrentversion diff --git a/iBox/iBox.xcdatamodeld/iBox.xcdatamodel/contents b/iBox/Resources/iBox.xcdatamodeld/iBox.xcdatamodel/contents similarity index 100% rename from iBox/iBox.xcdatamodeld/iBox.xcdatamodel/contents rename to iBox/Resources/iBox.xcdatamodeld/iBox.xcdatamodel/contents diff --git a/iBox/AppDelegate.swift b/iBox/Sources/AppDelegate.swift similarity index 100% rename from iBox/AppDelegate.swift rename to iBox/Sources/AppDelegate.swift diff --git a/iBox/Sources/BaseViewController.swift b/iBox/Sources/BaseViewController.swift new file mode 100644 index 0000000..fd38cb5 --- /dev/null +++ b/iBox/Sources/BaseViewController.swift @@ -0,0 +1,18 @@ +// +// BaseViewController.swift +// iBox +// +// Created by jiyeon on 12/26/23. +// + +import UIKit + +class BaseViewController: UIViewController { + + let baseView = View(frame: UIScreen.main.bounds) + + override func viewDidLoad() { + super.viewDidLoad() + view.addSubview(baseView) + } +} diff --git a/iBox/Sources/MainView.swift b/iBox/Sources/MainView.swift new file mode 100644 index 0000000..9d37b15 --- /dev/null +++ b/iBox/Sources/MainView.swift @@ -0,0 +1,46 @@ +// +// MainView.swift +// iBox +// +// Created by jiyeon on 12/26/23. +// + +import UIKit + +import SnapKit + +class MainView: UIView { + + // MARK: - UI + + var label: UILabel = { + let label = UILabel() + label.text = "예시입니당" + label.textColor = .black + return label + }() + + // MARK: - init + + override init(frame: CGRect) { + super.init(frame: frame) + configureUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - configure UI + + func configureUI() { + backgroundColor = .systemBackground + + addSubview(label) + + label.snp.makeConstraints { + $0.center.equalToSuperview() + } + } + +} diff --git a/iBox/Sources/MainViewController.swift b/iBox/Sources/MainViewController.swift new file mode 100644 index 0000000..ee81407 --- /dev/null +++ b/iBox/Sources/MainViewController.swift @@ -0,0 +1,18 @@ +// +// MainViewController.swift +// iBox +// +// Created by jiyeon on 12/26/23. +// + +import UIKit + +class MainViewController: BaseViewController { + + // MARK: - life cycle + + override func viewDidLoad() { + super.viewDidLoad() + } + +} diff --git a/iBox/SceneDelegate.swift b/iBox/Sources/SceneDelegate.swift similarity index 89% rename from iBox/SceneDelegate.swift rename to iBox/Sources/SceneDelegate.swift index d82bec1..f820efc 100644 --- a/iBox/SceneDelegate.swift +++ b/iBox/Sources/SceneDelegate.swift @@ -16,8 +16,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window = UIWindow(frame: windowScene.coordinateSpace.bounds) window?.windowScene = windowScene + + let mainViewController = MainViewController() + + let navigationController = UINavigationController(rootViewController: mainViewController) - window?.rootViewController = ViewController() // 루트 뷰컨트롤러 설정 + window?.rootViewController = navigationController // 루트 뷰컨트롤러 설정 window?.makeKeyAndVisible() // 윈도우를 화면에 보여줌 } diff --git a/iBox/ViewController.swift b/iBox/ViewController.swift deleted file mode 100644 index a552d79..0000000 --- a/iBox/ViewController.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ViewController.swift -// iBox -// -// Created by 김찬희 on 2023/12/21. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - -} -