Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] 프로젝트 초기 설정 #1 #2

Merged
merged 5 commits into from
Jul 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
609 changes: 609 additions & 0 deletions Hous-iOS/Hous-iOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"object": {
"pins": [
{
"package": "Alamofire",
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
"state": {
"branch": null,
"revision": "354dda32d89fc8cd4f5c46487f64957d355f53d8",
"version": "5.6.1"
}
},
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "b4307ba0b6425c0ba4178e138799946c3da594f8",
"version": "6.5.0"
}
},
{
"package": "SnapKit",
"repositoryURL": "https://github.com/SnapKit/SnapKit.git",
"state": {
"branch": null,
"revision": "f222cbdf325885926566172f6f5f06af95473158",
"version": "5.6.0"
}
},
{
"package": "Then",
"repositoryURL": "https://github.com/devxoul/Then.git",
"state": {
"branch": null,
"revision": "d41ef523faef0f911369f79c0b96815d9dbb6d7a",
"version": "3.0.0"
}
}
]
},
"version": 1
}
37 changes: 37 additions & 0 deletions Hous-iOS/Hous-iOS/Global/Extension/Asset.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// Asset.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import UIKit

public struct R {

public struct Color { }
public struct Image { }

}

extension R.Color {
static var color1: UIColor {
.dynamicColor(light: .primaryLight, dark: .white)
}
}

extension R.Image {
// static var test = UIImage(named: "Image_name")
static var systemImage = UIImage(systemName:"flame")

}

extension UIColor {
static func dynamicColor(light: UIColor, dark: UIColor) -> UIColor {
guard #available(iOS 13.0, *) else { return light }
return UIColor { $0.userInterfaceStyle == .dark ? dark : light }
}
@nonobjc class var primaryLight: UIColor {
return UIColor(red: 111.0 / 255.0, green: 100.0 / 255.0, blue: 1.0, alpha: 1.0)
}
}
24 changes: 24 additions & 0 deletions Hous-iOS/Hous-iOS/Global/Extension/UIFont+Extension.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// UIFont+Extension.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import UIKit

enum FontName: String {
case spoqaHanSansNeoBold = "SpoqaHanSansNeo-Bold"
case spoqaHanSansNeoMedium = "SpoqaHanSansNeo-Medium"

case montserratSemiBold = "Montserrat-SemiBold"
case montserratBold = "Montserrat-Bold"
case montserratMedium = "Montserrat-Medium"
case montserratRegular = "Montserrat-Regular"
}

extension UIFont {
static func font(_ style: FontName, ofSize size: CGFloat) -> UIFont {
return UIFont(name: style.rawValue, size: size)!
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 36 additions & 0 deletions Hous-iOS/Hous-iOS/Global/Supports/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// AppDelegate.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

25 changes: 25 additions & 0 deletions Hous-iOS/Hous-iOS/Global/Supports/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-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>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>
58 changes: 58 additions & 0 deletions Hous-iOS/Hous-iOS/Global/Supports/SceneDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// SceneDelegate.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import UIKit

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?


func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
window.backgroundColor = .white
// MARK: - ViewControllerHost에 Hot reload 하고 싶은 ViewController instance를 넣기
//window.rootViewController = Inject.ViewControllerHost(RulesViewController())
window.makeKeyAndVisible()
guard let _ = (scene as? UIWindowScene) else { return }
}

func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
}

func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}

func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}

func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}

func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}


}

16 changes: 16 additions & 0 deletions Hous-iOS/Hous-iOS/Network/APIConstants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// APIConstants.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import Foundation

struct APIConstants {
// MARK: - Base URL
static let baseURL = ""

// MARK: - Path
static let signupPath = ""
}
19 changes: 19 additions & 0 deletions Hous-iOS/Hous-iOS/Network/HTTP/HTTPHeaderField.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// HTTPHeaderField.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import Foundation

enum HTTPHeaderField: String {
case authentication = "Authorization"
case contentType = "Content-Type"
case acceptType = "Accept"
}

enum ContentType: String {
case json = "application/json"
//case multipart = "multipart/form-data"
}
16 changes: 16 additions & 0 deletions Hous-iOS/Hous-iOS/Network/Model/NetworkResult.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// NetworkResult.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import Foundation

enum NetworkResult<T> {
case success(T)
case requestErr(String)
case serverErr
case pathErr
case networkFail
}
9 changes: 9 additions & 0 deletions Hous-iOS/Hous-iOS/Screens/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// HomeViewController.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import Foundation
// 이 파일 삭제하고 자유롭게 폴더 이용하세요!
9 changes: 9 additions & 0 deletions Hous-iOS/Hous-iOS/Screens/Profile/ProfileViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// ProfileViewController.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import Foundation
// 이 파일 삭제하고 자유롭게 폴더 이용하세요!
9 changes: 9 additions & 0 deletions Hous-iOS/Hous-iOS/Screens/Rules/RulesViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// RulesViewController.swift
// Hous-iOS
//
// Created by 김지현 on 2022/07/07.
//

import Foundation
// 이 파일 삭제하고 자유롭게 폴더 이용하세요!