Spowift๋ Spotify์์ ์ ๊ณตํ๋ Web API ๋ฅผ ํ์ฉํ์ฌ ์ค๋์ ๊ฐ์ฅ ํซํ ๊ณก, ์ํฐ์คํธ ์ ๋ณด๋ฑ ์์
๊ด๋ จ ์ ๋ณด๋ฅผ ํ์ธํด ๋ณผ ์ ์๋ SwiftUI ์ฑ์
๋๋ค.
์ด ์ฑ์ ์ํคํ
์ฒ์ ํจํด ๊ทธ๋ฆฌ๊ณ ๋ค์ํ ๊ธฐ์ ๋ค์ ์ ์ฉํด๋ณด๊ณ Best Practice๋ฅผ ์ฐพ๊ธฐ ์ํ ๊ฐ์ธ ํ๋ก์ ํธ์
๋๋ค.
Report bug
ยท
Request feature
![](https://private-user-images.githubusercontent.com/90536403/313481581-ab382b2b-cc47-4201-bc75-72887e62fcf3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4Nzc1ODEsIm5iZiI6MTcyNTg3NzI4MSwicGF0aCI6Ii85MDUzNjQwMy8zMTM0ODE1ODEtYWIzODJiMmItY2M0Ny00MjAxLWJjNzUtNzI4ODdlNjJmY2YzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA5VDEwMjEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5ZGJkZDYyZjgxYjlkNmZlODdjYzJkZGIyZmM3MGUxNzExZDVhY2FkNWMxMGY4ZjIxNTQxNjMyMmQ5ZDdlNWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wNPy-TLTINZbr7dFA_2YsJCqfClTxsqkxQLvUKp2fs8)
![](https://private-user-images.githubusercontent.com/90536403/314125767-537e94b3-0ae5-4e1f-a320-1c5be3f755a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4Nzc1ODEsIm5iZiI6MTcyNTg3NzI4MSwicGF0aCI6Ii85MDUzNjQwMy8zMTQxMjU3NjctNTM3ZTk0YjMtMGFlNS00ZTFmLWEzMjAtMWM1YmUzZjc1NWE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA5VDEwMjEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5OWJiYjBkMTcxM2Q4ODU3YjU0MzQ0ZTFkNWM0Y2ExMmU2NDNjMjM2ZGNlMzc3Yzk5ZGQxNzRhZjVmZjk3MmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fFhPDbh9TuJyjw0OsVzV-v1wHxlMd_fSM_afDNLezWc)
![](https://private-user-images.githubusercontent.com/90536403/317231739-a2288b72-1102-49bb-b848-1949f6f67ed3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4Nzc1ODEs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MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkZDc4NjVhYTRlYjY2NzQ0MWQyNjI0ZmM1OWQ1YjNlNWY3NWQyNTkwNmFkMzJmNDI4ODBlN2I0NWE3Mjg5ZWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wxunIpB5xdDNslI7XzMxWnaToqyH3armLscTylpJ-KA)
์ถํ ๋ด์ฉ ์ถ๊ฐ
Spowift๋ Clean Architecture๋ฅผ ์ฌ์ฉํ๋ฉฐ, ์ฃผ๋ก ๋ค ๊ฐ์ง ์ฃผ์ ๊ณ์ธต์ผ๋ก ๊ตฌ๋ถ๋ฉ๋๋ค:
- Core: ํ์ฅ ๊ธฐ๋ฅ๊ณผ ์์กด์ฑ ์ฃผ์ ์ฝ๋์ ๊ฐ์ด ์ฌ๋ฌ ๊ณ์ธต ๊ฐ์ ๊ณตํต์ ์ผ๋ก ์ฌ์ฉ๋๋ ์ฝ๋๋ฅผ ํฌํจํฉ๋๋ค.
- Data: ์ ํ๋ฆฌ์ผ์ด์
์ด ํ์๋ก ํ๋ ๋ฐ์ดํฐ๋ฅผ ์ด๋์ ๊ฐ์ ธ์์ผ ํ ์ง, ๊ทธ๋ฆฌ๊ณ ๋ฐ์ดํฐ๋ฅผ ์ด๋ป๊ฒ ์ฒ๋ฆฌํด์ผ ํ ์ง๋ฅผ ๊ฒฐ์ ํ๋ '์ค๊ฐ์' ์ญํ ์ ํฉ๋๋ค.
์ด๋ฅผ ํตํด ๋๋จธ์ง ๋ ์ด์ด์์๋ ๋ฐ์ดํฐ๊ฐ ์ด๋์ ์ค๋์ง ์ ๊ฒฝ ์ฐ์ง ์๊ณ ๋ ๋ฐ์ดํฐ๋ฅผ ์ฌ์ฉํ ์ ์๊ฒ ๋ฉ๋๋ค. ํ์ฌ๋ REST API๋ก ์ธ๋ถ ๋ฐ์ดํฐ์๋ง ์ ๊ทผํ์ง๋ง ์ถํ Core Data๋ฅผ ์ถ๊ฐํ ๊ณํ์ ๋๋ค. - Domain: ์ ํ๋ฆฌ์ผ์ด์ ์ ๋น์ฆ๋์ค ๋ก์ง์ ์ฒ๋ฆฌํ๋ ๋ฐ ์ฑ ์์ด ์๋ UseCase(UC)๋ฅผ ํฌํจํฉ๋๋ค. UseCase๋ ์ฌ์ฉ์์ ํ๋(ex. getArtistUC)์ ๊ธฐ๋ฐํ์ฌ ์์ฑ๋ฉ๋๋ค. Data Mapping์ ํตํด Presentation ๋ ์ด์ด์์ ์ฌ์ฉ๋ Entity ๋ฐ์ดํฐ ๋ชจ๋ธ๋ ํฌํจํฉ๋๋ค.
- Presentation: ํ๋ฉด์ ๊ทธ๋ฆฌ๋ ๋ ์ด์ด๋ก ๋ทฐ์ ์ ์ค ์ผ์ด์ค ์ฌ์ด ์ํธ์์ฉ์ ์ฒ๋ฆฌํ๋ ๋ทฐ๋ชจ๋ธ๋ ํฌํจ๋ฉ๋๋ค.
![](https://private-user-images.githubusercontent.com/90536403/318721922-f3115881-3e43-4a5d-bdd5-88a334d7f820.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4Nzc1ODEsIm5iZiI6MTcyNTg3NzI4MSwicGF0aCI6Ii85MDUzNjQwMy8zMTg3MjE5MjItZjMxMTU4ODEtM2U0My00YTVkLWJkZDUtODhhMzM0ZDdmODIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA5VDEwMjEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUzMmFiYmFiM2ZmZGFhZDc3MGIxNTNiY2VlNWYwNDYyMDc0ZDBhYWFmNDBiNmE0Yjg3ZTU3M2NiMjllYjQzYzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c3Yf1R256i94CLo7Vxxi4ygjT2oBRYEUHcFBVFptr1Y)
Tool | Used for |
---|---|
MVVM | ๋ทฐ์์ ๋ก์ง์ ๋ถ๋ฆฌํ๊ธฐ ์ํ ์ํคํ ์ฒ ๋์์ธ ํจํด |
Clean Architecture | ๊ณ์ธต์ ๋๋๊ณ ๊ด์ฌ์ฌ๋ฅผ ๋ถ๋ฆฌํ์ฌ ๋์ ์์ง๋ ๋ฎ์ ๊ฒฐํฉ๋๋ก ์์ ์ฑ๊ณผ ์์ฐ์ฑ์ ๋์ฌ์ค ์ ์๋ ์ํคํ ์ณ |
Factory | Dependency Injection |
Arkana | clientKey, SecretKey ๋ก์ปฌ์ ์์ ํ๊ฒ ์ ์ฅ |
SpotifyAPI | Spotify ์ปจํ ์ธ ์์ฒญ |
Keychain Access | Swift Keychain api๋ฅผ ์ฝ๊ฒ ์ฌ์ฉ ํ ์ ์๊ฒ ํ๋ ๋ํผ ๋ผ์ด๋ธ๋ฌ๋ฆฌ |
- Xcode 15.1
- Swift 5.9.2
- iOS Deployment Target 16.0
This project is licensed under the MIT License - see the LICENSE file for details