๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
๋ฐ˜์‘ํ˜•

โ—๏ธError42

[Firebase iOS] addSnapshotListener ์—ฌ๋Ÿฌ๋ฒˆ ํ˜ธ์ถœ๋˜๋Š” ์—๋Ÿฌ ํ•ด๊ฒฐํ•˜๋Š”๋ฒ•(Detach Listener) ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜์€ Firestore์—์„œ addSnaptshotListener๋ฅผ ๋‹ค๋ฃฐ๋•Œ ์ฃผ์˜ํ•ด์•ผํ•  ์ ์— ๋Œ€ํ•ด์„œ ์ ์–ด๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. addSnapshotListener๋ฅผ ์‚ฌ์šฉํ• ๋•Œ ์—ฌ๋Ÿฌ๋ฒˆ ํ˜ธ์ถœ๋˜๋Š” ๊ฒฝ์šฐ์ธ๋ฐ์š”. ๋ฐ์ดํ„ฐ๊ฐ€ ๋ฐ”๋€Œ์—ˆ์„๋•Œ ๋”ฑ ํ•œ๋ฒˆ๋งŒ ํ˜ธ์ถœ๋˜๊ฒŒ ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณผ๊ฒŒ์š”~ ๋‹ค์Œ๊ณผ ๊ฐ™์ด addSnapshotListener๋ฅผ ์‚ฌ์šฉํ•˜์˜€์„๋•Œ "listener called"๋ผ๊ณ  ์ถœ๋ ฅ๋˜๊ฒŒ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด listener called๊ฐ€ ๋งค์šฐ ๋งŽ์ด ํ˜ธ์ถœ๋˜๋Š”๋ฐ์š”. ์ด๊ฒƒ์€ viewDidLoad๊ฐ€ ์‹คํ–‰๋˜๋ฉด ์‹คํ–‰๋˜๋Š”๋งŒํผ ๋ฐ์ดํ„ฐ๊ฐ€ ๋ฐ”๋€Œ์—ˆ์„๋•Œ ๋ฐฐ๋กœ ์ถœ๋ ฅ๋˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์™œ ๊ทธ๋Ÿด๊นŒ์š”? addSnapshotListener๋Š” ๋ง ๊ทธ๋Œ€๋กœ SnapshotListener๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฏ€๋กœ viewDi.. 2021. 2. 9.
[Firebase Storage Error] User does not have permission to accss ~~ ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜์€ ์˜ค๋žœ๋งŒ์— Firebase Storage ์— ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œ ํ•˜๋ ค๋Š”๋ฐ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋งŒ๋‚ฌ์–ด์š”. ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ๊ฝค ๊ฐ„๋‹จํ•œ๋ฐ ๊ธฐ๋กํ•ด๋†“๊ธฐ ์œ„ํ•ด์„œ ์ ์–ด๋ด…๋‹ˆ๋‹ค! Solution ํ•ด์„ํ•ด๋ณด๋‹ˆ ์œ ์ €๊ฐ€ ์ ‘๊ทผํ•  ๊ถŒํ•œ์ด ์—†๋‹ค๋Š” ๋œป์ด๋„ค์š”! ๋จผ์ € Firebase ์ฝ˜์†”๋กœ ์ด๋™ํ•ด์„œ Storageํƒญ์—์„œ Rules๋กœ ๊ฐ€์ฃผ์„ธ์š”~ ๊ทธ๋Ÿฌ๋ฉด ์ €๊ธฐ ๋งจ ์•„๋žซ์ค„์— allow read,write if request.auth != null; ์ด๋ผ๊ณ  ๋˜์–ด์žˆ๋Š”๋ฐ์š”. ์—ฌ๊ธฐ์„œ ๋’ค์— if request.auth != null; ์„ ์ง€์›Œ์ค๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์œ ์ €๊ฐ€ ์ ‘๊ทผํ•  ๊ถŒํ•œ์„ ํ—ˆ๋ฝํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค! 2021. 2. 2.
[Flutter Error ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ] could not build the application for the simulator. ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜์€ Flutter ๋ฅผ ๊ฐœ๋ฐœํ•˜๋ ค๊ณ  ์‹œ์ž‘ํ•˜์ž๋งˆ์ž ๋งŒ๋‚œ ์—๋Ÿฌ๋ฅผ ๊ฐ€์ง€๊ณ  ์™”์Šต๋‹ˆ๋‹ค. Error Flutter ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  iOS ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋กœ ๋Œ๋ ค๋ณด๋ ค๋Š”๋ฐ ๊ฐ‘์ž๊ธฐ ์•„๋ž˜์™€ ๊ฐ™์ด "Could not build the application for the simulator" ๋ผ๊ณ  ์˜ค๋ฅ˜๊ฐ€ ๋œจ๋Š”๊ฑฐ์—์š”. Solution ๊ทธ๋ž˜์„œ ๊ตฌ๊ธ€๋ง์„ ํ•ด๋ณด์•˜๋”๋‹ˆ ์•„๋ž˜์™€ ๊ฐ™์€ ํ•ด๊ฒฐ๋ฒ•์„ ์ฐพ์„ ์ˆ˜ ์žˆ์—ˆ์–ด์š”. 1. ํ•ด๋‹น ํ”„๋กœ์ ํŠธ์—์„œ iosํด๋”์— ๋“ค์–ด๊ฐ€์„œ xcworkspace ํŒŒ์ผ์„ ์—ด์–ด์„œ xcode์ƒ์—์„œ ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ํ•œ๋ฒˆ ์ผœ๊ณ  ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค. 2.ํ„ฐ๋ฏธ๋„์„ ์ผœ๊ณ  ํ•ด๋‹น ํ”„๋กœ์ ํŠธ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ›„ flutter clean์„ ์ž…๋ ฅํ•œ๋‹ค. ์ €๋Š” ์ด ๋‘ ํ•ด๊ฒฐ๋ฒ•์„ ๋™์‹œ์— ํ•ด์„œ ๋ฌด์—‡์œผ๋กœ ํ•ด๊ฒฐ๋œ์ง€๋Š” ์ž˜ ๋ชจ๋ฅด๊ฒ ๋„ค์š” ใ…œ ์•„๋ฌดํŠผ ์ด ๋‘ ํ•ด๊ฒฐ.. 2021. 1. 24.
[ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ] 14.3 iOS ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ๋…ธ๋ž€์ƒ‰ ํ‹ดํŠธ ์—๋Ÿฌ (Simulator Yellow Tint Error) ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค. ์˜ค๋Š˜์€ 14.3 ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์ „์ฒด์ ์ธ ํ‹ดํŠธ๊ฐ€ ๋…ธ๋ž€์ƒ‰์œผ๋กœ ๋ณ€ํ•ด์žˆ๋Š” ํ˜„์ƒ์„ ๋ฐœ๊ฒฌํ–ˆ์–ด์š”. (์•„๋ž˜์™€ ๊ฐ™์ด ํ‹ดํŠธ๊ฐ€ ๋…ธ๋ž€์ƒ‰์œผ๋กœ ๋ณ€ํ•ด์žˆ์Œ. ์•ฑ์„ ์ผœ๋„ ํƒญ,๋„ค๋น„๊ฒŒ์ด์…˜๋ฐ” ๋ชจ๋‘ ๋…ธ๋ž€์ƒ‰) ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ Simulator - File - GPU Selection - Prefer Integrated GPU ๋ฅผ ์„ ํƒํ•ด์ฃผ์‹œ๊ณ  ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ๊ป๋‹ค ์ผœ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์ •์ƒ์ ์œผ๋กœ ์ƒ‰์ด ๋Œ์•„์˜ค๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. 2020. 12. 29.
[ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ] ์•ฑ๋ฐฐํฌ์‹œ ์—๋Ÿฌ Redundant Binary Upload. You've already uploaded a build with build number ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค!! ์˜ค๋Š˜ ๋ฐœ๊ฒฌํ•œ ์—๋Ÿฌ ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ์•ฑ์„ ์•„์นด์ด๋ธŒํ•œ ๋’ค ์žฌ๋ฐฐํฌํ•˜๋ ค๊ณ  ํ•˜๋‹ˆ "Redundant Binary Upload. You've already uploaded a build with build number ~" ๋ผ๊ณ  ๋œจ๋– ๋ผ๊ตฌ์š”. ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ์•ฑ์˜ Target์œผ๋กœ ์ด๋™ํ•˜์…”์„œ Build๋ฅผ ์›๋ž˜์žˆ๋˜ build ๋ฒˆํ˜ธ์™€ ์ค‘๋ณต๋˜๋ฉด ์•ˆ๋œ๋‹ค๋Š” ๊ฒƒ์ด์—ˆ์–ด์š”. ์•„๋ž˜์™€ ๊ฐ™์ด ์ค‘๋ณต๋˜์ง€์•Š๋Š” ๋นŒ๋“œ ๋ฒˆํ˜ธ๋ฅผ ์ ์–ด์ฃผ์‹œ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์„ฑ๊ณต์ ์œผ๋กœ ์—…๋กœ๋“œ๊ฐ€ ๋˜์‹ค๊ฒ๋‹ˆ๋‹ค!! 2020. 12. 27.
[ํ•ด๊ฒฐ๋ฒ•] ์Šคํ† ๋ฆฌ๋ณด๋“œ ์ „์ฒด ๋ธ”๋ž™์Šคํฌ๋ฆฐ (All Storyboard Black Screen) ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜ ๋งŒ๋‚œ ์—๋Ÿฌ๋Š” ์Šคํ† ๋ฆฌ๋ณด๋“œ ์ „์ฒด๊ฐ€ ๋ธ”๋ž™์Šคํฌ๋ฆฐ์œผ๋กœ ๋ณ€ํ•˜๋Š” ํ˜„์ƒ์ด์—ˆ์Šต๋‹ˆ๋‹ค. ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ๋งฅ์„ ๊ป๋‹ค ์ผœ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค! 2020. 12. 17.
[ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ]Undefined symbol:_OBJC_CLASS_$_ ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜๋„ ์–ด๊น€์—†์ด ์ƒˆ๋กœ์šด ์—๋Ÿฌ๋ฅผ ์ˆ˜์ง‘ํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ”๋กœ "Undefined symbol:_OBJC_CLASS_$_" ๋ผ๋Š” ์˜ค๋ฅ˜์˜€์Šต๋‹ˆ๋‹ค. ์ •๋ง ์•„๋ฌด๊ฒƒ๋„ ์•ˆ๊ฑด๋“œ๋ฆฌ๊ณ  podfile์— ๋‹ค๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ•˜๋‚˜ ์ถ”๊ฐ€ํ•ด์ค€๊ฒƒ ๋ฟ์ธ๋ฐ.... ๊ทธ๋ž˜๋„ ์—ด์‹ฌํžˆ ๊ตฌ๊ธ€๋งํ•ด๋ณด๋‹ˆ๊น ์—ฌ๋Ÿฌ๊ฐ€์ง€ ํ•ด๊ฒฐ๋ฒ•์ด ๋งŽ์•˜๋Š”๋ฐ ์ œ๊ฐ€ ํ•ด๊ฒฐํ•œ ๋ฐฉ๋ฒ•์œผ๋ก  podfile์„ ๋ณด์‹œ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์ด ์žˆ์„๊ฑฐ์—์š”! ์ €๋Š” ์ด๊ฒƒ๋“ค์„ ์ „๋ถ€ ๋‹ค ์ง€์šฐ๊ณ  (๋‹ค์‹œ ๋„ฃ์–ด์ค„๊ฑฐ๋‹ˆ๊น ๋ฐ˜๋“œ์‹œ ๋ณต์‚ฌํ•ด๋‘๊ณ  ์ง€์›Œ์ฃผ์„ธ์š”!) ํ„ฐ๋ฏธ๋„์—์„œ pod install์„ ํ•ด์ฃผ์‹œ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์ด ์‚ญ์ œ๋˜๋Š” ๊ฒƒ์ด ๋ณด์ผ๊ฑฐ์—์š”! (์˜ค๋ฅ˜๊ฐ€ ๋‚œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋งŒ ์‚ญ์ œํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค.) ๋‹ค์‹œ podfile๋กœ ๋Œ์•„๊ฐ€์„œ ์•„๊นŒ ์ง€์› ๋˜ ๊ฒƒ๋“ค์„ ๋‹ค์‹œ ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ๊ณ  pod insta.. 2020. 12. 11.
[ํ•ด๊ฒฐ๋ฒ•] error: pathspec did not match any file(s) known to git ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜์€ ์—‘์Šค์ฝ”๋“œ์—์„œ ์ƒˆ๋กœ์šด ์ปค๋ฐ‹์„ ์˜ฌ๋ฆฌ๊ณ  ํ‘ธ์‰ฌํ•˜๋ ค๋Š”๋ฐ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์–ด์š”. ๊ทธ๋ž˜์„œ ๊ตฌ๊ธ€๋ง ํ•ด์„œ ์ฐพ์•„๋ณธ ๊ฒฐ๊ณผ ๋ธŒ๋žœ์น˜๊ฐ€ ์—…๋ฐ์ดํŠธ ์•ˆ๋˜์„œ ์ƒ๊ธฐ๋Š” ๊ฒฐ๊ณผ๋ผ๊ณ  ํ•˜๋„ค์š”. ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ํ•ด๋‹น ํ„ฐ๋ฏธ๋„์—์„œ ํ•ด๋‹น ํ”„๋กœ์ ํŠธ ์ฃผ์†Œ๋กœ ๋“ค์–ด๊ฐ€์„œ "git remote update" ํ•˜์‹  ๋’ค "git fetch" ํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค!! 2020. 12. 8.
[ํ•ด๊ฒฐ๋ฒ•] Push to remoteํ•  ๋•Œ Loading remotes ์˜ค๋ฅ˜(Xcode์—์„œ ์ปค๋ฐ‹ ์—…๋ฐ์ดํŠธ ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ) ์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค! ์˜ค๋Š˜์€ Xcode๋กœ git์„ Commitํ•˜๊ณ  push๋ฅผ ํ•˜๋Š”๋ฐ Branches - main์—๋Š” Commit์ด ์—…๋ฐ์ดํŠธ๊ฐ€ ์•ˆ๋˜๊ณ  Remotes - origin - main ์—๋งŒ Commit์ด ์ €์žฅ๋˜๋”๋ผ๊ตฌ์š”. ๊ทธ๋ฆฌ๊ณ  Github ์‚ฌ์ดํŠธ์—๋„ ์ž๊พธ ์ปค๋ฐ‹์ด ์—…๋ฐ์ดํŠธ๊ฐ€ ์•ˆ๋˜์„œ ์ด๊ฒŒ ๋ฌด์Šจ ์ƒํ™ฉ์ด์ง€? ํ•˜๊ณ  push๋ฅผ ํ•  ๋•Œ ์ž์„ธํžˆ ๋ด๋ดค๋”๋‹ˆ ์•„๋ž˜ ์‚ฌ์ง„์ฒ˜๋Ÿผ Loading remotes๊ฐ€ ๊ณ„์† ๋˜๋Š”๊ฑฐ์—์š”. ๊ทธ๋ž˜์„œ ์—ด์‹ฌํžˆ ๊ตฌ๊ธ€๋งํ•ด๋ณธ ๊ฒฐ๊ณผ Xcode์—์„œ ์ด์ „ ๋นŒ๋“œ๋ฅผ ํ™•์ธํ•  ๋•Œ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ ์—ฐ๊ฒฐ์ด ๋Š์–ด์งˆ ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•˜๋„ค์š”.(๋ฌด์Šจ ๋ง์ธ์ง€๋Š” ์ž˜...) Solution ํ•ด๊ฒฐ๋ฒ•์€ ์šฐ์„  ํ„ฐ๋ฏธ๋„์— git push origin head:main (master์ผ์ˆ˜๋„ ์žˆ์Œ) ์„ ํ•ด์ฃผ์‹œ๊ณ  ํ•ด๋‹น Branches - ma.. 2020. 12. 1.
[ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ] duplicate symbols for architecture x86_64 ์•ˆ๋…•ํ•˜์„ธ์š” ์—๋Ÿฌ์ˆ˜์ง‘๊ฐ€ Foma ์ž…๋‹ˆ๋‹ค... ์˜ค๋Š˜๋ถ€ํ„ฐ๋Š” ์—๋Ÿฌ๋ฅผ ๋” ์ด์ƒ ๋„˜์–ด๊ฐ€์ง€์•Š๊ณ  ๋ชจ์•„๋ณด๋ ค๊ณ  ํ•ด์š”. ์˜ˆ์ „๋ถ€ํ„ฐ ์—๋Ÿฌ๋ฅผ ๋งŒ๋‚˜๋ฉด ๋นจ๋ฆฌ ๊ณ ์น˜๊ธฐ์—๋งŒ ๊ธ‰๊ธ‰ํ•˜๊ณ  ๊ณ ์น˜๋ฉด ์•ˆ๋„ํ•˜๋ฉด์„œ ๋„˜์–ด๊ฐ”๋˜์ ์ด ์žˆ๋Š”๋ฐ์š”. ์˜ค๋Š˜์€ ์˜ˆ์ „์— ๋˜‘๊ฐ™์€ ์—๋Ÿฌ๋ฅผ ๋งŒ๋‚ฌ๋Š”๋ฐ ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐํ•ด์•ผํ• ์ง€ ๋ชฐ๋ผ ๋ช‡์‹œ๊ฐ„์„ ํ—ค๋งธ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ํ•ญ์ƒ ์—๋Ÿฌ๋ฅผ ์ˆ˜์ง‘ํ•ด์„œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ๊ธฐ๋กํ•ด๋†” ์–ด๋–ค ์—๋Ÿฌ๋ฅผ ๋งŒ๋‚˜๋“  ์ซ„์ง€(?)์•Š๋Š” Foma๊ฐ€ ๋˜๋„๋ก ํ• ๊ฑฐ์—์š”. Error ์˜ค๋Š˜์˜ ์—๋Ÿฌ๋Š” ๋ฐ”๋กœ ์ œ๋ชฉ์—์„œ๋ณด์‹œ๋‹ค์‹œํ”ผ "duplicate symbols for architecture x86_64" ๋ผ๋Š” ์—๋Ÿฌ๋ฅผ ๋งŒ๋‚ฌ์Šต๋‹ˆ๋‹ค. ๋ญ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•ด์„ํ•˜๋ฉด 117๊ฐœ ์‹ฌ๋ณผ์ด ๋ณต์ œ๋˜์–ด ์žˆ๋‹ค?? ์ด๊ฒŒ ๋ฌด์Šจ ์†Œ๋ฆฌ์ง€? ํ•˜๊ณ  ๋ฐ”๋กœ ๊ตฌ๊ธ€์— ๊ฒ€์ƒ‰ํ•ด๋ดค์Šต๋‹ˆ๋‹ค. ์—ญ์‹œ๋‚˜ ๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ๊ฒช์—ˆ๋˜ ์—๋Ÿฌ์˜€์–ด์š”. (์Šคํƒ ์˜ค๋ฒ„ ํ”Œ๋กœ์šฐ ์ตœ๊ณ .. 2020. 11. 21.
FireStore ๋ณตํ•ฉ์ฟผ๋ฆฌ์—๋Ÿฌ(Error Domain=FIRFirestoreErrorDomain Code=9) FireStore๋Š” whereField,orderBy,limit ๋“ฑ์˜ ์ฟผ๋ฆฌ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. whereField => isEqualTo,isLessThan,isGreaterThan ๋“ฑ ๊ฐ’์ด ์ž‘๊ฑฐ๋‚˜,๊ฐ™๊ฑฐ๋‚˜,๊ฐ™์€ ํ•„๋“œ๋ช…์œผ๋กœ ์ฐพ์„ ์ˆ˜ ์žˆ๋Š” ์ฟผ๋ฆฌ์ž…๋‹ˆ๋‹ค. orderyBy => descending,ascending์œผ๋กœ ๊ฐ ๋‚ด๋ฆผ์ฐจ์ˆœ๊ณผ ์˜ค๋ฆ„์ฐจ์ˆœ์œผ๋กœ ํ•„๋“œ๋ช…์œผ๋กœ ์ •๋ ฌํ•  ์ˆ˜ ์žˆ๋Š” ์ฟผ๋ฆฌ์ž…๋‹ˆ๋‹ค. limit => ์›ํ•˜๋Š” ๊ฐฏ์ˆ˜๋งŒํผ ๋ฌธ์„œ๋ฅผ ์ œํ•œํ•  ์ˆ˜ ์žˆ๋Š” ์ฟผ๋ฆฌ์ž…๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ๋Š” ์•„๋ž˜ ์‚ฌ์ง„๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. "cities"๋ผ๋Š” ์ฝœ๋ ‰์…˜์—์„œ "capital"์ด true์ด๊ณ  "country"๊ฐ€ "China"์ธ ๋ฌธ์„œ๋ฅผ "population"์˜ ๊ฐ’์„ ์˜ค๋ฆ„์ฐจ์ˆœ์œผ๋กœ ์ •๋ ฌํ•œ ๋ฌธ์„œ๋“ค์„ ๊ฐ€์ ธ์˜ค๋ ค๊ณ  ํ•  ๋•Œ ์•„๋ž˜์™€ ๊ฐ™์ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์•„๋ž˜์™€ ๊ฐ™์€ .. 2020. 8. 27.
[ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ]'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier ์ฝœ๋ ‰์…˜๋ทฐ์—์„œ dequeueReusableCell์—์„œ ์•„์ด๋ดํ‹ฐํ”ผ์–ด๋ฅผ ์ง€์ •ํ•˜๋Š” ๋„์ค‘ ์ด๋Ÿฌํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. ์—ด์‹ฌํžˆ ๊ตฌ๊ธ€๋งํ•œ ๊ฒฐ๊ณผ collectionView.register(์ฝœ๋ ‰์…˜๋ทฐ์…€ํด๋ž˜์Šค์ด๋ฆ„.self, forCellWithReuseIdentifier: "์ž์‹ ์˜ ์•„์ด๋ดํ‹ฐํ”ผ์–ด ์ด๋ฆ„") ์„ viewDidLoad์— ๋„ฃ์–ด์ฃผ๋ฉด ๋˜์—ˆ๋‹ค. 1 collectionView.register(์ž์‹ ์˜์ฝœ๋ ‰์…˜๋ทฐ์…€ํด๋ž˜์Šค.self, forCellWithReuseIdentifier: "์•„์ด๋ดํ‹ฐํ”ผ์–ด์ด๋ฆ„") cs ์ž์‹ ์˜ ํด๋ž˜์Šค ์ด๋ฆ„ ์ž์‹ ์˜ ์•„์ด๋ดํ…Œํ”ผ์–ด ์ด๋ฆ„ 2020. 5. 31.
728x90
๋ฐ˜์‘ํ˜•