๋ฐ์ํ
- ๋น๋์ Build Phases๋ฅผ ๋ฐ์ํจ. ์ฌ๊ธฐ์ ๊ฐ๋ฐ์๊ฐ ๋น๋์ ์ค์ ๋์ด์ผ ํ ์ฝ๋๋ฅผ ์ถ๊ฐํ ์ ์์
- Firebase์ ํธ์ ๊ธฐ๋ฅ์ ์ฌ์ฉํ ๋ ์ ๋ณด๊ฐ ๋ด๊ธด Info.plist ํ์ผ์ ํ์๋ก ํ๊ฒ ๋จ. ์ด ํ์ผ์ด ์ฌ๋ฌ๊ฐ์ธ ๊ฒฝ์ฐ ํ์ผ ์ด๋ฆ์ ๊ฐ๊ฐ ๋ณ๊ฒฝํ๊ณ AppDelegate์์ Bundle๋ก ๋ถํฐ ํ์ผ์ ์ฐพ์ ๋ฐ์ํ ์ ์์ง๋ง Firebase Crashlytics๋ฅผ ์ค์นํ๊ฒ ๋๋ฉด info.plist ์ด๋ฆ์ด ๋ฐ๋๋ ๊ฒฝ์ฐ ์๋ฌ๊ฐ ๋ฐ์ํจ
Firebase info Script๊ฐ ์๋ ๊ฒฝ์ฐ ์ด๋ฅผ ์ฌ์ฉํ๋ฉด ๋๊ณ ์๋ค๋ฉด
Target ์ ํ > Build Phases ํญ ์ ํ > New Run Script Phase ์ ํ
# Type a script or drag a script file from your workspace to insert its path.
case "${CONFIGURATION}" in
"Debug" )
cp -r "$SRCROOT/ํ๋ก์ ํธ๋ช
/GoogleServicePlist์ด๋ฆ.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" ;;
"Configuration ์ด๋ฆ" )
cp -r "$SRCROOT/ํ๋ก์ ํธ๋ช
/GoogleServicePlist์ด๋ฆ.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" ;;
"Configuration ์ด๋ฆ" )
cp -r "$SRCROOT/ํ๋ก์ ํธ๋ช
/GoogleServicePlist์ด๋ฆ.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" ;;
*)
;;
esac
Firebase ์ ๋ณด ๋ด๊ธด plist ํ์ผ ์ด๋ฆ๊ณผ ๊ฒฝ๋ก๋ฅผ ์์ฑํ๊ณ Configuration์ ๋ช ์ํด ์ฃผ๋ฉด ๊ฐ Configuration์ ๋ง๋ GoogleService-Info.plist๋ก ์ธ์ํ๋๋ก ์คํฌ๋ฆฝํธ ์์ฑ
์ค์ ํ๋์ ํด๋์ ์ด๋ฆ์ ๋ค๋ฅด๊ฒ ํด์ ์ฌ๋ฌ๊ฐ์ plist ํ์ผ์ ๋ฃ์ด ์ค ์ ์์
728x90
๋ฐ์ํ
'๐ iOS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[RealmSwift] Migration Primary Key (0) | 2023.05.22 |
---|---|
[Xcode/iOS] Simulator์์ UIViewController ๊ฝ ์ฐจ๊ฒ ์๋์ค๋ ๊ฒฝ์ฐ (0) | 2023.05.12 |
[Xcode/Swift] Multiple Target (0) | 2023.04.26 |
[Xcode/Swift] User-Defined Build Settings (0) | 2023.04.26 |
[Xcode/Swift] Configuration ๊ด๋ฆฌํ๊ธฐ (0) | 2023.04.26 |
๋๊ธ