๐ŸŽฎ Unity Study/ERROR Q&A

[Xcode Build Error&Solution] 'release' is unavailable: not available in automatic reference counting mode

ibelieveinme 2022. 3. 11. 13:32
728x90

Xcode Build ์ค‘ ๋งŒ๋‚œ ์—๋Ÿฌ~

'release' is unavailable: not available in automatic reference counting mode
ARC forbids explicit message send of 'release'

 

release ๊ตฌ๋ฌธ์ด ์•ˆ๋จน๋Š” ์—๋Ÿฌ์˜€๋Š”๋ฐ, ์›์ธ์€ ARC(Automatic Reference Counting) ๋ชจ๋“œ๊ฐ€ on ๋œ ์ƒํƒœ๋กœ ์ปดํŒŒ์ผ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

์ฆ‰, ARC๊ฐ€ ์•„๋‹Œ MRC ๋ชจ๋“œ๋กœ ๋ฐ”๊ฟ”์ฃผ์–ด์•ผ ํ•œ๋‹ค.

 

[ํ•ด๊ฒฐ์ฑ…]

MRC ๋ชจ๋“œ๋กœ ๋ฐ”๊พธ๋Š” ๋ฐฉ๋ฒ•์€ Compile Flag๋กœ ํŒŒ์ผ๋ณ„๋กœ ARC ๋ชจ๋“œ๋ฅผ ๋น„ํ™œ์„ฑํ™” ํ•˜๊ฑฐ๋‚˜ Xcode ์ „์ฒด์—์„œ ๋น„ํ™œ์„ฑํ™” ํ•  ์ˆ˜ ์žˆ๋‹ค.

์ „์ž๋Š” build ํƒ€๊ฒŸ ๋Œ€์ƒ์„ ์„ ํƒํ•˜๊ณ  Build Phases > Compile Sources๋ฅผ ํ™œ์„ฑํ™”ํ•˜์—ฌ ์—๋Ÿฌ๊ฐ€ ๋‚œ ์ฝ”๋“œ๋ฅผ ๋”๋ธ”ํด๋ฆญํ•œ ํ›„,

flag๋กœ -fno-objc-arc ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

(ํ›„์ž๋Š” https://stackoverflow.com/questions/47815421/disable-arc-in-xcode-project ์ฐธ๊ณ )

 

๋‚ด ๊ฒฝ์šฐ์—๋Š” Libraries/Plugins/iOS/UnityZipFile์˜ release ๊ตฌ๋ฌธ์—์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ์—ˆ๊ณ  ๊ทธ๋ถ€๋ถ„๋งŒ ARC ๋ชจ๋“œ๋ฅผ ๋น„ํ™œ์„ฑํ™”ํ•ด์ฃผ๋‹ˆ ํ•ด๊ฒฐ์™„~

728x90