Fernando ๊ธฐ์ˆ  ๋ธ”๋กœ๊ทธ

Beta ์—์„œ Firebase Distribution์œผ๋กœ ์ด์‚ฌํ•˜๊ธฐ ๐Ÿš€

intro

๐Ÿ˜ข Fabric Beta ์ง€์› ์ข…๋ฃŒ

์‚ฌ๋‚ด ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด ๊ทธ๋™์•ˆ ์—ด์‹ฌํžˆ ์จ์™”๋˜ Beta ์„œ๋น„์Šค๊ฐ€ deprecated ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Fabric is deprecated and shutting down May 4, 2020. 
Learn how your Fabric access and apps will be impacted after this date. 
Work with your Fabric organization's admin to migrate your apps to 
Firebase to take advantage of the latest tools weโ€™ve built there.

ํ˜„์žฌ Beta ์„œ๋น„์Šค๋ฅผ ๋ณด๋ฉด ์œ„์™€ ๊ฐ™์€ ๋ฉ”์‹œ์ง€๊ฐ€ ์“ฐ์—ฌ์žˆ์Šต๋‹ˆ๋‹ค.
5์›” 4์ผ ์ดํ›„๋กœ๋Š” Fabric์—์„œ ์ง€์›ํ•˜๋Š” ๋ชจ๋“  ์„œ๋น„์Šค๋“ค์ด ์ง€์›์ค‘๋‹จ ๋˜๋ฏ€๋กœ ๊ฐ€๋Šฅํ•˜๋ฉด
Firebase๋กœ ์ด์ „์„ ๊ถŒ์žฅํ•œ๋‹ค๋Š” ๋‚ด์šฉ์˜ ๊ธ€์ž…๋‹ˆ๋‹ค.

๐Ÿ˜Ž Firebase Distribution ์‚ฌ์šฉํ•˜๊ธฐ

1

Firebase ์— ์ ‘๊ทผํ•˜์‹  ์ดํ›„ [ํ’ˆ์งˆ] > App Distiribution ์ด ์ €ํฌ๊ฐ€ ์‚ฌ์šฉํ•ด์•ผํ•  ์„œ๋น„์Šค ์ž…๋‹ˆ๋‹ค.

2

App Distribution ์œผ๋กœ ๋“ค์–ด์˜ค์‹œ๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํŽ˜์ด์ง€๊ฐ€ ๋ณด์ด์‹คํ…๋ฐ, ์—ฌ๊ธฐ์„œ ์‹œ์ž‘ํ•˜๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

โš ๏ธ ์ด์ „์— ์‹œ์ž‘ํ•˜๊ธฐ๋ฅผ ๋ˆ„๋ฅด์‹  ๊ฒฝ์šฐ์—๋Š” ์œ„ ๋ฉ”๋‰ด๊ฐ€ ๋ณด์ด์ง€ ์•Š์•„์š”. ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”

01. Firebase ์›นํŽ˜์ด์ง€๋ฅผ ํ†ตํ•œ ๋ฐฐํฌ

3

Firebase ์›นํŽ˜์ด์ง€๋ฅผ ํ†ตํ•œ ๋ฐฐํฌ๋Š” ์ •๋ง ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค.
๋ฆด๋ฆฌ์ฆˆ ๋ฒ„์ „์˜ IPA ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด ์›นํŽ˜์ด์ง€์— Drag & Drop ๋ฐฉ์‹์œผ๋กœ ์—…๋กœ๋“œ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
์—…๋กœ๋“œ ์ดํ›„์—๋Š” ๋ฒ„์ „ ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ๋ฐฐํฌ ๋Œ€์ƒ์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

02. Firebase CLI๋ฅผ ํ†ตํ•œ ๋ฐฐํฌ

Firebase CLI ๋ฅผ ํ†ตํ•œ ๋ฐฐํฌ๋Š” PC์— Firebase Tool ์ด ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผํ•ฉ๋‹ˆ๋‹ค.
์•„๋ž˜์™€ ๊ฐ™์€ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

์„ค์น˜๊ฐ€ ๋˜์–ด์žˆ๋‹ค๋ฉด ์ด ๋‹จ๊ณ„๋Š” ์ƒ๋žต ํ•˜์…”๋„ ๋ฉ๋‹ˆ๋‹ค.

curl -sL firebase.tools | bash

์„ค์น˜ํ•œ ์ดํ›„ ํ„ฐ๋ฏธ๋„์— firebase ๋ช…๋ น์„ ์ž…๋ ฅํ•˜์—ฌ ๋ช…๋ น์–ด๊ฐ€ ์ˆ˜ํ–‰์ด ๋˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
๋ช…๋ น์–ด๊ฐ€ ์ˆ˜ํ–‰์ด ๋œ๋‹ค๋ฉด ์ •์ƒ์ ์œผ๋กœ ์„ค์น˜ ๋œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ดํ›„ ๋กœ๊ทธ์ธ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$ firebase login:ci

์œ„ ๋ช…๋ น์–ด๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ฒŒ ๋˜๋ฉด firebase ๋กœ๊ทธ์ธ ๊ณผ์ •์„ ๊ฑฐ์นฉ๋‹ˆ๋‹ค.

๐Ÿ’ก FIREBASE\_APP\_TOKEN ๊ฐ’์€ cli ์„ค์น˜์ดํ›„ ๋กœ๊ทธ์ธ์„ ์ง„ํ–‰ํ•˜์‹œ๋ฉด ๋ฐœ๊ธ‰๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋กœ๊ทธ์ธ ํ•œ ์ดํ›„ ๋‹ค์‹œ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด๋ณด์‹œ๋ฉด ํ˜„์žฌ ๋กœ๊ทธ์ธ๋˜์–ด์žˆ๋Š” ๊ณ„์ •์˜ ์ •๋ณด๊ฐ€ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.

$ firebase projects:list

๐Ÿ’ก ์œ„ ๋ช…๋ น์„ ํ†ตํ•ด ํ˜„์žฌ ๋‚ด๊ฐ€ ๊ด€๋ฆฌ์ค‘์ธ ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

Firebase CLI๋ฅผ ํ†ตํ•œ ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด์„œ๋Š” appID ๋ฅผ ์•Œ์•„์•ผํ•ฉ๋‹ˆ๋‹ค.

4

[ํ”„๋กœ์ ํŠธ ์„ค์ •] -> ์ผ๋ฐ˜ ํƒญ ํ•˜๋‹จ์— ๋ณด์‹œ๋ฉด ์•ฑID ๋ผ๋Š” ํ•ญ๋ชฉ์ด ์žˆ์Šต๋‹ˆ๋‹ค.ย ย 

$ firebase appdistribution:distribute App.ipa  \
    --app 1:1234567890:ios:0a1b2c3d4e5f67890  \
    --release-notes "Bug fixes and improvements" --testers "user1@example.com, user2@example.com"

โš ๏ธ IPA ํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒฝ๋กœ๋กœ ์ ‘๊ทผํ•œ ์ดํ›„์— ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋””๋ ‰ํ† ๋ฆฌ ๊ฒฝ๋กœ๋ฅผ ๋ณ„๋„๋กœ ์ž…๋ ฅํ•˜์ง€ ์•Š์œผ์…”๋„ ๋˜๋‚˜,
IPA ํŒŒ์ผ์ด ์—†๋Š” ๊ฒฝ๋กœ์—์„œ ๋ช…๋ น์„ ์ž…๋ ฅํ•˜์‹œ๋ ค๋ฉด IPA๊ฐ€ ์กด์žฌํ•˜๋Š” ๊ณณ์˜ ๊ฒฝ๋กœ๋ฅผ ์ ์–ด์ฃผ์…”์•ผํ•ฉ๋‹ˆ๋‹ค.

์ดํ›„์— ์œ„์™€ ๊ฐ™์€ ๋ช…๋ น์„ ํ†ตํ•ด ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์œ„์˜ ๋ณต์‚ฌํ•˜์…จ๋˜ ์•ฑID๋Š” --app ํ•ญ๋ชฉ ๋’ค์— ๊ฐ’์„ ๋ฐ”๊พธ์…”์„œ ์ด์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
๋“ค์–ด๊ฐ€์•ผํ•˜๋Š” ํ•„์ˆ˜ ๊ฐ’์€ appId , ๋ฐฐํฌํ•  ๋Œ€์ƒ์˜ IPA ์ž…๋‹ˆ๋‹ค.

03. Fastlane๋ฅผ ์ด์šฉํ•œ ๋ฐฐํฌ ๐Ÿš€

๊ธฐ์กด์— Fastlane๋ฅผ ํ†ตํ•ด์„œ Beta ๋ฐฐํฌ๋ฅผ ํ•˜์…จ์—ˆ๋‹ค๋ฉด ์•ฝ๊ฐ„์˜ ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ •๋งŒ ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

  • Fastlane ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

    $ fastlane add_plugin firebase_app_distribution
  • .env ํ™˜๊ฒฝ๋ณ€์ˆ˜ ํŒŒ์ผ์— ๋‘๊ฐ€์ง€ ๊ฐ’์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

โš ๏ธ Firebase cli ๊ฐ€ ์„ค์น˜ ๋˜์–ด์žˆ๋‹ค๋Š” ์ „์ œ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
๐Ÿ’ก ๋กœ๊ทธ์ธ ์ดํ›„ ์ถœ๋ ฅ๋˜๋Š” ๊ฐ’์€ FIREBASEAPPTOKEN ์ž…๋‹ˆ๋‹ค.

# for Firebase app distribution 
FIREBASE_APP_ID = "์•ฑ์•„์ด๋”” ์ž…๋ ฅ"  
FIREBASE_APP_TOKEN = "FIREBASE\_APP ํ† ํฐ"
  • Fastfile ๋‚ด์— ๋ฐฐํฌ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
firebase_app_distribution(
    app: ENV['FIREBASE_APP_ID'],
    ipa_path: lane_context[SharedValues::IPA_OUTPUT_PATH],
    firebase_cli_token: ENV['FIREBASE_APP_TOKEN'],
    groups: "์›ํ•˜๋Š” ๊ทธ๋ฃน๋ช…",
    release_notes: "๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ ๋‚ด์šฉ",
    debug: true
)

์œ„์™€ ๊ฐ™์€ ๊ณผ์ •์„ ํ†ตํ•ด์„œ ๋ฐฐํฌ๋ฅผ ํ•˜์‹œ๋ฉด Firebase Distribution์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
์ข‹์€ ๊ธฐ๋Šฅ์„ Firebase ๋ฅผ ํ†ตํ•ด์„œ ๋ฌด๋ฃŒ๋กœ ์‚ฌ์šฉ ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ ๋งŒ์œผ๋กœ๋„ ์ •๋ง ์ข‹์€ ๊ธฐ๋Šฅ์ด๋‹ˆ ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด์„œ ํ•œ๋ฒˆ ์จ๋ณด์„ธ์š”! ๊ฐ•๋ ฅํ•˜๊ฒŒ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

๐Ÿ”— Reference


Written by@fernando
iOS ๊ฐœ๋ฐœ์ž์ด๋ฉฐ ๋‹ค์–‘ํ•œ ์—…๋ฌด ์ž๋™ํ™”์— ๊ด€์‹ฌ์ด ๋งŽ์Šต๋‹ˆ๋‹ค.

GitHubTwitterLinkedIn