πŸ“‚Β ν΄λ”κ΅¬μ‘°

InstagramSwiftUITutorial
β”œβ”€ API
β”‚  β”œβ”€ ImageUploader.swift
β”‚  └─ UserService.swift
β”œβ”€ InstagramSwiftUITutorialApp.swift
β”œβ”€ Model
β”‚  β”œβ”€ Comment.swift
β”‚  β”œβ”€ Notification.swift
β”‚  β”œβ”€ Post.swift
β”‚  └─ User.swift
β”œβ”€ Preview Content
β”‚  └─ Preview Assets.xcassets
β”‚     └─ Contents.json
β”œβ”€ Utils
β”‚  β”œβ”€ Constants.swift
β”‚  β”œβ”€ CustomSecureField.swift
β”‚  β”œβ”€ CustomTextField.swift
β”‚  β”œβ”€ Extensions.swift
β”‚  β”œβ”€ ImagePicker.swift
β”‚  └─ TextArea.swift
β”œβ”€ View
β”‚  β”œβ”€ Authentication
β”‚  β”‚  β”œβ”€ LoginView.swift
β”‚  β”‚  β”œβ”€ RegistrationView.swift
β”‚  β”‚  └─ ResetPasswordView.swift
β”‚  β”œβ”€ Comments
β”‚  β”‚  β”œβ”€ CommentCell.swift
β”‚  β”‚  └─ CommentsView.swift
β”‚  β”œβ”€ Feed
β”‚  β”‚  β”œβ”€ FeedCell.swift
β”‚  β”‚  └─ FeedView.swift
β”‚  β”œβ”€ Items
β”‚  β”‚  β”œβ”€ CustomInputView.swift
β”‚  β”‚  β”œβ”€ PostGridView.swift
β”‚  β”‚  β”œβ”€ UserCell.swift
β”‚  β”‚  └─ UserListView.swift
β”‚  β”œβ”€ Main
β”‚  β”‚  β”œβ”€ ContentView.swift
β”‚  β”‚  └─ MainTabView.swift
β”‚  β”œβ”€ Notifications
β”‚  β”‚  β”œβ”€ NotificationCell.swift
β”‚  β”‚  └─ NotificationView.swift
β”‚  β”œβ”€ Profile
β”‚  β”‚  β”œβ”€ ProfileActionButton.swift
β”‚  β”‚  β”œβ”€ ProfileHeaderView.swift
β”‚  β”‚  β”œβ”€ ProfileView.swift
β”‚  β”‚  └─ UserStatView.swift
β”‚  β”œβ”€ Search
β”‚  β”‚  β”œβ”€ SearchBar.swift
β”‚  β”‚  └─ SearchView.swift
β”‚  └─ UploadPost
β”‚     └─ UploadPostView.swift
└─ ViewModel
   β”œβ”€ Authentication
   β”‚  └─ AuthViewModel.swift
   β”œβ”€ CommentViewModel.swift
   β”œβ”€ Feed
   β”‚  β”œβ”€ FeedCellViewModel.swift
   β”‚  └─ FeedViewModel.swift
   β”œβ”€ Notifications
   β”‚  β”œβ”€ NotificationCellViewModel.swift
   β”‚  └─ NotificationViewModel.swift
   β”œβ”€ PostGridViewModel.swift
   β”œβ”€ Profile
   β”‚  └─ ProfileViewModel.swift
   β”œβ”€ SearchViewModel.swift
   └─ UploadPostViewModel.swift


View: View κ΄€λ ¨ swift파일

Model: 데이터 λͺ¨λΈ

ViewModel: ViewModel νŒŒμΌλ“€μ„ λͺ¨μ•„λ‘ 

API: κ³΅ν†΅μœΌλ‘œ μ‚¬μš©λ˜λŠ” λ„€νŠΈμ›Œν¬ μ„œλΉ„μŠ€ν΄λž˜μŠ€ ν˜Ήμ€ ꡬ쑰체 λͺ¨μŒ

Utils: Extension, Constants ν˜Ήμ€ κ³΅ν†΅μœΌλ‘œ μ‚¬μš©λ˜λŠ” μ»΄ν¬λ„ŒνŠΈλ₯Ό λͺ¨μ•„λ‘ 

## βš™οΈΒ Firebase μ„ΈνŒ…

### Key파일 μΆ”κ°€

Firebase SDKλ₯Ό μ„€μΉ˜ν•΄μ•Ό ν”„λ‘œμ νŠΈμ—μ„œ Firebaseλ₯Ό μ΄μš©ν•  수 μžˆλ‹€. Firesbase에 λ‚˜μ˜ 앱을 λ“±λ‘ν•˜κ³  ν”„λ‘œμ νŠΈ 내뢀에 GoogleService-info.plist νŒŒμΌμ„ μΆ”κ°€ν•΄μ€€λ‹€.

![Screenshot 2024-01-02 at 2.44.30 PM.png](<https://prod-files-secure.s3.us-west-2.amazonaws.com/75ec0d08-d246-416d-92d7-bfbb60c5f37a/9d464d90-c3db-44a1-aac1-6fa8a8d1383e/Screenshot_2024-01-02_at_2.44.30_PM.png>)

GoogleService-Info.pilist νŒŒμΌμ€ 해당앱이 Firebase에 access ν•  수 μžˆλŠ” κΆŒν•œμ— λŒ€ν•œ KEY값듀이 μ‘΄μž¬ν•œλ‹€ κ·Έλ ‡κΈ° λ•Œλ¬Έμ— λ°˜λ“œμ‹œ .gitignore νŒŒμΌμ— ν•΄λ‹Ή νŒŒμΌμ„ μΆ”κ°€ν•˜μ—¬ 원격저μž₯μ†Œμ— μ˜¬λΌκ°€μ§€ μ•Šλ„λ‘ ν•΄μ€€λ‹€.

### SDK μ„€μΉ˜(SPM)

SwiftPackageManagerλ₯Ό μ΄μš©ν•˜λ©΄ Cocoapodsλ₯Ό μ΄μš©ν•˜λŠ”κ²ƒμ— λΉ„ν•΄ κ°„λ‹¨ν•˜κ²Œ ν”„λ‘œμ νŠΈμ— ν”„λ ˆμž„μ›Œν¬λ₯Ό μ„€μΉ˜ν•  수 μžˆλ‹€.