- ์ ๋นํธ Open API๋ฅผ ์ด์ฉํ์ฌ ๋จ์ด์ง์ ์ค์๊ฐ์ผ๋ก ๊ฐ์ํ๊ณ ์๋ฆผ์ ๋ณด๋ด๊ณ ์ ๋ง๋ค๊ฒ๋จ
- FCM์ ์ฌ์ฉํด๋ณด๊ณ , Swift์์ ๋คํธ์ํฌ ํต์ ์ ์ด์ฉํด๋ณด๊ธฐ ์ํด ๊ฐ๋ฐํ๊ฒ๋จ
- Back-end
OracleCloud, Java(SpringBoot)
- Front-end
Swift
ํ์ผ๊ตฌ์กฐ
- DummyJson:
- Networkํต์ ์ ํ๊ธฐ ์ ์ ์ฌ์ฉํ JSON data์ ๊ด๋ฆฌํ๋ ํด๋
- Models
- realm์ ์ ์ฅ๋ ๋ฐ์ดํฐ๋ฅผ ๊ด๋ฆฌํ๊ณ , struct ํ์ ์ ํ์ผ๋ค์ ๊ด๋ฆฌํจ
- View
- Controller์์ ์ฌ์ฉ๋๋ TableView์ Cell, CollectionView์ Cell, CustomView ๋ฑ View์ ๊ด๋ จ๋ ํ์ผ์ ๊ด๋ฆฌํฉ๋๋ค.
- Service
- Networkํต์ ๊ณผ ๊ด๋ จ๋ ํ์ผ๋ค์ ๊ด๋ฆฌํจ.
- Controller
- realm data๋ฅผ View์ ์ฐ๊ฒฐํ๋ ๋ถ๋ถ๊ณผ ํด๋ฆญ, swipe๋ฑ ์ด๋ฒคํธ๋ฅผ ๋ด๋นํจ.
- Backup
- ์์ ๋ฐฑ์ ํด๋ ํ์ผ
- Utils
- ๋ ์ง, Timer, IAP, AppStoreReview, Alert ๋ฑ Util๊ณผ ๊ด๋ จ๋ ํ์ผ์ ๋ด๋นํฉ๋๋ค.
- Back-end
- Front-end
- Swift
- Realm
- SpringBoot์์ ์ ๋นํธ OpenAPI ๊ฐ๊ณตํด์ ์ ๋ฌํ์์ต๋๋ค.
- ์ฝ์ธ ์ ๋ณด๋ฅผ FCM์ Topic์ ์ด์ฉํ์ฌ ๋ฑ๋กํ์์ต๋๋ค.
- ํ๋ฝํญ์ ์ ๋ณด๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
- ์๋์ ๋ฐ์ ์ฝ์ธ๋ค์ ์ค์ ํ ์ ์์ต๋๋ค.
- Upbit์ AccessKey์ SecretKey์ ์ ๋ ฅํ๋ฉด ์์ฐ ์ ๋ณด๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
- ์ ๋ฌ ๋ฐ์ ์๋๋ค์ ๋ณผ ์ ์์ต๋๋ค.
- ์๋์ด๋ ฅ์ ๊ฒฝ์ฐ NotificationCenter์์ ์๋๋ชฉ๋ก์ ์บ์นํ์ฌ Realm์ ์ ์ฅํ์์ต๋๋ค.
-
ํ์ ์ ์ฒ์์ผ๋ก ์งํํ ํ๋ก์ ํธ์ธ๋ฐ, ์ ๋ฌ๋ฐ์ json ๋ฐ์ดํฐ๋ฅผ ์ ํํ๊ฒ ์์ฒญํ๋๊ฒ ์ด๋ ค์ ๋ค.
-
์๋๋ฐฉ์๊ฒ ์๊ฐํ ๋ก์ง์ ์ดํด์ํค๊ธฐ๊ฐ ์ด๋ ค์ ๊ณ , ํ๋ฆ๋๊น์ง ๊ทธ๋ ค์ ์ ๊ณต์ ํ๋ค.
-
์ ๋นํธ Open API์ ํต์ ํ๊ธฐ ์ํด์ Enum์ ์ฌ์ฉํ๋๋ฐ URLSession์ ์ด์ฉํ๋๋ฐ, Enum์ผ๋ก ์ด๋ค API๋ฅผ ์์ฒญ ํ ์ ์์์ ์ ์ ์์๋ค.
-
Enum๊ณผ API ์์ฒญ ์ฃผ์ ์์
import Foundation
enum NetworkAPI {
case market(MarketAPI)
}
extension NetworkAPI {
var baseURL: String {
return "http://152.67.217.201:8080"
}
var path: String {
switch self {
case .market(let api): return api.path
}
}
}
enum MarketAPI {
case allMarkets
}
extension MarketAPI {
var path: String {
switch self {
case .allMarkets:
return "/market/all"
}
}
}