Skip to content

Commit

Permalink
tabbar 구성 firebase연동 및 swift 초기세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
donghun-ha committed Dec 20, 2024
1 parent c4170a7 commit e730f19
Show file tree
Hide file tree
Showing 15 changed files with 523 additions and 0 deletions.
40 changes: 40 additions & 0 deletions DateSpot/DateSpot/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//
// AppDelegate.swift
// DateSpot
//
// Created by 하동훈 on 20/12/2024.
//

import UIKit
import FirebaseCore

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// Firebase 초기화 코드 추가
FirebaseApp.configure()
print("Connect Success")
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.
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
35 changes: 35 additions & 0 deletions DateSpot/DateSpot/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions DateSpot/DateSpot/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
25 changes: 25 additions & 0 deletions DateSpot/DateSpot/Base.lproj/LaunchScreen.storyboard
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>
125 changes: 125 additions & 0 deletions DateSpot/DateSpot/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="h3O-yK-pl4">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Home View Controller-->
<scene sceneID="UfV-cV-OZl">
<objects>
<viewController id="PZS-9a-ij4" customClass="HomeViewController" customModule="DateSpot" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="nQ9-2V-DSI">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="nte-yP-jf3"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
</view>
<tabBarItem key="tabBarItem" title="" image="house" catalog="system" id="WsV-fm-kq7"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="lla-Qj-cMG" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-2205" y="-470"/>
</scene>
<!--Map View Controller-->
<scene sceneID="q05-3x-bZQ">
<objects>
<viewController id="31I-UB-cSi" customClass="MapViewController" customModule="DateSpot" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Xzm-1i-qCo">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="emJ-pc-Zcd"/>
<color key="backgroundColor" systemColor="systemGreenColor"/>
</view>
<tabBarItem key="tabBarItem" title="" image="map" catalog="system" id="KI0-f7-hCx"/>
<simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="E4J-Fb-HpJ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1199" y="-470"/>
</scene>
<!--User View Controller-->
<scene sceneID="uF1-2Y-qKW">
<objects>
<viewController id="dDk-TX-crI" customClass="UserViewController" customModule="DateSpot" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Z2U-q6-WKx">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="70T-A2-20i"/>
<color key="backgroundColor" systemColor="systemBlueColor"/>
</view>
<tabBarItem key="tabBarItem" title="" image="bookmark" catalog="system" id="7uO-xO-RgM"/>
<simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="DPu-ho-5sD" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-201" y="-470"/>
</scene>
<!--User View Controller-->
<scene sceneID="RVW-uW-1Tg">
<objects>
<viewController id="JpY-bj-ttb" customClass="UserViewController" customModule="DateSpot" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="lNp-iw-mK0">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KXg-Qd-8pX">
<rect key="frame" x="164" y="283" width="66" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Login"/>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="8D9-Bd-XWA"/>
<color key="backgroundColor" systemColor="systemBrownColor"/>
</view>
<tabBarItem key="tabBarItem" title="" image="person" catalog="system" id="0sl-gL-Fas"/>
<simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rah-Ut-lfr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="859" y="-470"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="OSD-Oc-ukb">
<objects>
<tabBarController id="h3O-yK-pl4" sceneMemberID="viewController">
<tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="t7v-8q-vrP">
<rect key="frame" x="0.0" y="0.0" width="393" height="49"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tabBar>
<connections>
<segue destination="PZS-9a-ij4" kind="relationship" relationship="viewControllers" id="ZZ7-dH-NTj"/>
<segue destination="31I-UB-cSi" kind="relationship" relationship="viewControllers" id="Vxf-tc-wGq"/>
<segue destination="dDk-TX-crI" kind="relationship" relationship="viewControllers" id="Ob2-Pl-x7r"/>
<segue destination="JpY-bj-ttb" kind="relationship" relationship="viewControllers" id="0y4-Te-OlI"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="3Ux-RH-AZv" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-706" y="-1204"/>
</scene>
</scenes>
<resources>
<image name="bookmark" catalog="system" width="110" height="128"/>
<image name="house" catalog="system" width="128" height="104"/>
<image name="map" catalog="system" width="128" height="112"/>
<image name="person" catalog="system" width="128" height="121"/>
<systemColor name="systemBlueColor">
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBrownColor">
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGreenColor">
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
29 changes: 29 additions & 0 deletions DateSpot/DateSpot/Controller/BookmarkViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// BookmarkViewController.swift
// DateSpot
//
// Created by 하동훈 on 20/12/2024.
//

import UIKit

class BookmarkViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/

}
29 changes: 29 additions & 0 deletions DateSpot/DateSpot/Controller/HomeViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// HomeViewController.swift
// DateSpot
//
// Created by 하동훈 on 20/12/2024.
//

import UIKit

class HomeViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/

}
29 changes: 29 additions & 0 deletions DateSpot/DateSpot/Controller/MapViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// MapViewController.swift
// DateSpot
//
// Created by 하동훈 on 20/12/2024.
//

import UIKit

class MapViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/

}
53 changes: 53 additions & 0 deletions DateSpot/DateSpot/Controller/UserViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//
// UserViewController.swift
// DateSpot
//
// Created by 하동훈 on 20/12/2024.
//

import UIKit
import AuthenticationServices

class UserViewController: UIViewController {

private let signInButton = ASAuthorizationAppleIDButton()

override func viewDidLoad() {
super.viewDidLoad()
signInButton.addTarget(self, action: #selector(didTapSignIn), for: .touchUpInside)
// Do any additional setup after loading the view.
}

@objc func didTapSignIn() {
print("Start sign in")

let provider = ASAuthorizationAppleIDProvider()
let requset = provider.createRequest()

// 사용자에게 제공받을 정보를 선택 (이름 및 이메일) -- 아래 이미지 참고
requset.requestedScopes = [.fullName, .email]

let controller = ASAuthorizationController(authorizationRequests: [requset])
// 로그인 정보 관련 대리자 설정
controller.delegate = self
// 인증창을 보여주기 위해 대리자 설정
controller.presentationContextProvider = self
// 요청
controller.performRequests()
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/


}


Loading

0 comments on commit e730f19

Please sign in to comment.