๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐ŸŽ ๊ฐœ๋ฐœ/๐Ÿ”ฅ ํŠธ๋Ÿฌ๋ธ” ์ŠˆํŒ…

[Flutter] Uncategorized (Xcode): Command CodeSign failed with a nonzero exit code.

by MINT09 2025. 3. 25.

์•ˆ๋…•ํ•˜์‹ญ๋‹ˆ๊นŒ, ๋ฏผํŠธ์ž…๋‹ˆ๋‹ค ๐Ÿ˜ˆ

ํ”Œ๋Ÿฌํ„ฐ ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๋Š” ์ค‘ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ์Šต๋‹ˆ๋‹ค.

Uncategorized (Xcode): Command CodeSign failed with a nonzero exit code.

Could not build the application for the simulator
Error launching application on iPhone 15 Pro.

1. Signing & Capabilities Team

์ œ๊ฐ€ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ํ•˜๋Š” ํ”„๋กœ์ ํŠธ๊ฐ€ ์•„๋‹ˆ๋ผ ๋‹ค๋ฅธ ๋ฉ”์ธ ๊ฐœ๋ฐœ์ž ๋ถ„์ด ๊ณ„์‹  ์ƒํƒœ์ด๊ณ , ๊ทธ๋ถ„์ด ๋Œ€๋ถ€๋ถ„์˜ ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜์…จ์Šต๋‹ˆ๋‹ค. ๋•Œ๋ฌธ์— Apple signing & Capabilities์˜ Team ์—ญ์‹œ ๊ทธ๋ถ„์˜ ๊ฒƒ์œผ๋กœ ๋˜์–ด ์žˆ์—ˆ๊ณ , ์ด๋กœ ์ธํ•ด ๋นŒ๋“œ๊ฐ€ ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๋•Œ๋ฌธ์— ๋กœ์ปฌ์—์„œ ์ž‘์—…ํ•˜๊ณ  ๋Œ๋ฆฌ๊ธฐ ์œ„ํ•ด push๋ฅผ ํ•˜์ง„ ์•Š์•˜์ง€๋งŒ, Xcode์—์„œ ์ œ ๊ฐœ์ธ ๊ณ„์ •์˜ Team์œผ๋กœ ๋ณ€๊ฒฝํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๊ด€๋ จํ•˜์—ฌ Bundle Identifier๋„ ๋ณ€๊ฒฝํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. 

2. Flutter Appfile

๊ทธ ํ›„์—๋„ ์—ฌ์ „ํžˆ ๋™์ผํ•œ ์—๋Ÿฌ๊ฐ€ ๋–ด๋Š”๋ฐ, ๊ณ ๋ฏผํ•˜๋‹ค ์ƒ๊ฐํ•ด๋ณด๋‹ˆ xcode์—์„œ๋งŒ ์ž‘์—…ํ•˜๊ณ , ์ด๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” flutter์˜ Appfile์—์„œ๋Š” ์ž‘์—…ํ•ด์ฃผ์ง€ ์•Š์€ ๊ฒƒ์„ ๊นจ๋‹ฌ์•˜์Šต๋‹ˆ๋‹ค. ๋•Œ๋ฌธ์— Appfile, Fastfile, Matchfile์—์„œ Bundle Identifier, team id๋“ฑ์„ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋•Œ App Store Connect Team ID๋ฅผ ๋„ฃ๋Š” itc_team_id์™€ Developer Portal Team ID๋ฅผ ๋„ฃ๋Š” team_id๊ฐ€ ์žˆ๋Š”๋ฐ, ๊ฐœ์ธ์ด๋ผ๋ฉด ๊ทธ๋ƒฅ ๋‘ ๊ฐœ ๋ชจ๋‘ Apple Developer์—์„œ ์ฐพ์„ ์ˆ˜ ์žˆ๋Š” ํŒ€ ์•„์ด๋””๋ฅผ ๋„ฃ์œผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

3. icloud ๋™๊ธฐํ™” off

์ด์ œ ์ง„์งœ ๋  ๊ฑฐ๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๋Š”๋ฐ ์—ฌ์ „ํžˆ ๋™์ผํ•œ ์—๋Ÿฌ๊ฐ€ ๋–ด์Šต๋‹ˆ๋‹ค. ๋•Œ๋ฌธ์— pod ๋ฅผ ์ง€์›Œ๋ณด๊ณ  ๋‹ค์‹œ ๊น”์•„๋ณด๊ณ , flutter clean์— ๋‹ค์‹œ flutter pub get, ์žฌ๋ถ€ํŒ… ๋“ฑ ์—ฌ๋Ÿฌ๊ฐ€์ง€๋ฅผ ๋‹ค ํ•ด๋ณด์•˜๋Š”๋ฐ, ํ•ด๊ฒฐ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‹ค๊ฐ€ ๊ตฌ๊ธ€๋ง ์ค‘ icloud์™€ ๊ด€๋ จ๋œ ์ด ๋ธ”๋กœ๊ทธ์˜ ๊ธ€์„ ๋ฐœ๊ฒฌํ–ˆ์Šต๋‹ˆ๋‹ค. ์›๋ณธ stackoverflow ๊ธ€์ด ์ง€์›Œ์ ธ์„œ ์ด์œ ๋Š” ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ, mac์—์„œ icloud์˜ desktop๊ณผ document ๋™๊ธฐํ™” ์„ค์ •์„ ๊บผ์ฃผ๊ณ , ๋กœ์ปฌ์—์„œ ์ „๋ถ€ ์‚ฌ๋ผ์ ธ icloud๋กœ ์˜ฎ๊ฒจ์ง„ ํŒŒ์ผ์„ ๋กœ์ปฌ๋กœ ์˜ฎ๊ธฐ๋ฉด ํ•ด๊ฒฐ๋ฉ๋‹ˆ๋‹ค. ์•„๋งˆ ํŒŒ์ผ๋“ค์˜ ํ™•์žฅ์ž๊ฐ€ .icloud๋กœ ๋ฐ”๋€Œ๊ณ  ํด๋ผ์šฐ๋“œ์— ์˜ฌ๋ผ๊ฐ€๋ฉด์„œ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธฐ์ง€ ์•Š์•˜์„๊นŒ ๋‹ค๋ฅธ ๋ถ„๊ณผ ํ•จ๊ป˜ ์ถ”์ธกํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. 

๋‹คํ–‰ํžˆ ํ•ด๊ฒฐํ•ด์„œ ๋‹ค์‹œ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค~~ 
flutter run~