How can I show Firestore document names in a TableViewController?









up vote
0
down vote

favorite












I'm trying to load the names of my documents in Firestore and show them in my tableViewController. Everytime I try i get an error and I don't know where it's coming from. I've tried a lot of things and I can't seem to find the solution. The delegate methods are called before the info is loaded, but if I reload the tableView the app crashes. If you can help me, thanks! :)



class ViewController: UITableViewController 




var db:Firestore!
var docArray = [String]()




override func viewDidLoad()
super.viewDidLoad()

navigationController?.navigationBar.prefersLargeTitles = true

db = Firestore.firestore()
loadData()

DispatchQueue.main.async
self.tableView.reloadData()



func loadData()

print("loaded")
db.collection("Producten").getDocuments (snap, error) in

for doc in (snap?.documents)!
self.docArray.append(doc.documentID)


DispatchQueue.main.async
self.tableView.reloadData()





override func numberOfSections(in tableView: UITableView) -> Int

return 1


override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

return docArray.count


override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

print(docArray)

let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel?.text = docArray[indexPath.row]
return cell




crash log:



2018-11-10 19:31:17.551261+0100 Den Hartog[57326:4767154] *** Assertion 
failure in [UITableView_dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-
3698.93.8/UITableView.m:8054
2018-11-10 19:31:17.559180+0100 Den Hartog[57326:4767154] ***
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'unable to dequeue a cell
with identifier cell - must register a nib or a class for the
identifier or connect a prototype cell in a storyboard'
*** First throw call stack:

0 CoreFoundation 0x000000010fce01bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010f27e735 objc_exception_throw + 48
2 CoreFoundation 0x000000010fcdff42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010dfef877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0x000000011335a5b1 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 868
5 UIKitCore 0x000000011335a219 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 91
6 Den Hartog 0x000000010d48b386 $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtF + 422
7 Den Hartog 0x000000010d48b5ec $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtFTo + 108
8 UIKitCore 0x000000011337566e -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 771
9 UIKitCore 0x0000000113375bfb -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
10 UIKitCore 0x000000011333cc36 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2863
11 UIKitCore 0x000000011335d8ee -[UITableView layoutSubviews] + 165
12 UIKitCore 0x000000011361b795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
13 QuartzCore 0x0000000114ba3b19 -[CALayer layoutSublayers] + 175
14 QuartzCore 0x0000000114ba89d3 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
15 QuartzCore 0x0000000114b217ca _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
16 QuartzCore 0x0000000114b5897e _ZN2CA11Transaction6commitEv + 576
17 QuartzCore 0x0000000114b596fa _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
18 CoreFoundation 0x000000010fc44c27 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x000000010fc3f0be __CFRunLoopDoObservers + 430
20 CoreFoundation 0x000000010fc3f751 __CFRunLoopRun + 1537
21 CoreFoundation 0x000000010fc3ee11 CFRunLoopRunSpecific + 625
22 GraphicsServices 0x00000001188c21dd GSEventRunModal + 62
23 UIKitCore 0x000000011313181d UIApplicationMain + 140
24 Den Hartog 0x000000010d48e7c7 main + 71
25 libdyld.dylib 0x0000000110d99575 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type
NSException
(lldb)









share|improve this question























  • Can you post your crash log?
    – DionizB
    Nov 10 at 18:30










  • Yes, I editted my question
    – user9244481
    Nov 10 at 18:39














up vote
0
down vote

favorite












I'm trying to load the names of my documents in Firestore and show them in my tableViewController. Everytime I try i get an error and I don't know where it's coming from. I've tried a lot of things and I can't seem to find the solution. The delegate methods are called before the info is loaded, but if I reload the tableView the app crashes. If you can help me, thanks! :)



class ViewController: UITableViewController 




var db:Firestore!
var docArray = [String]()




override func viewDidLoad()
super.viewDidLoad()

navigationController?.navigationBar.prefersLargeTitles = true

db = Firestore.firestore()
loadData()

DispatchQueue.main.async
self.tableView.reloadData()



func loadData()

print("loaded")
db.collection("Producten").getDocuments (snap, error) in

for doc in (snap?.documents)!
self.docArray.append(doc.documentID)


DispatchQueue.main.async
self.tableView.reloadData()





override func numberOfSections(in tableView: UITableView) -> Int

return 1


override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

return docArray.count


override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

print(docArray)

let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel?.text = docArray[indexPath.row]
return cell




crash log:



2018-11-10 19:31:17.551261+0100 Den Hartog[57326:4767154] *** Assertion 
failure in [UITableView_dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-
3698.93.8/UITableView.m:8054
2018-11-10 19:31:17.559180+0100 Den Hartog[57326:4767154] ***
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'unable to dequeue a cell
with identifier cell - must register a nib or a class for the
identifier or connect a prototype cell in a storyboard'
*** First throw call stack:

0 CoreFoundation 0x000000010fce01bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010f27e735 objc_exception_throw + 48
2 CoreFoundation 0x000000010fcdff42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010dfef877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0x000000011335a5b1 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 868
5 UIKitCore 0x000000011335a219 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 91
6 Den Hartog 0x000000010d48b386 $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtF + 422
7 Den Hartog 0x000000010d48b5ec $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtFTo + 108
8 UIKitCore 0x000000011337566e -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 771
9 UIKitCore 0x0000000113375bfb -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
10 UIKitCore 0x000000011333cc36 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2863
11 UIKitCore 0x000000011335d8ee -[UITableView layoutSubviews] + 165
12 UIKitCore 0x000000011361b795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
13 QuartzCore 0x0000000114ba3b19 -[CALayer layoutSublayers] + 175
14 QuartzCore 0x0000000114ba89d3 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
15 QuartzCore 0x0000000114b217ca _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
16 QuartzCore 0x0000000114b5897e _ZN2CA11Transaction6commitEv + 576
17 QuartzCore 0x0000000114b596fa _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
18 CoreFoundation 0x000000010fc44c27 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x000000010fc3f0be __CFRunLoopDoObservers + 430
20 CoreFoundation 0x000000010fc3f751 __CFRunLoopRun + 1537
21 CoreFoundation 0x000000010fc3ee11 CFRunLoopRunSpecific + 625
22 GraphicsServices 0x00000001188c21dd GSEventRunModal + 62
23 UIKitCore 0x000000011313181d UIApplicationMain + 140
24 Den Hartog 0x000000010d48e7c7 main + 71
25 libdyld.dylib 0x0000000110d99575 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type
NSException
(lldb)









share|improve this question























  • Can you post your crash log?
    – DionizB
    Nov 10 at 18:30










  • Yes, I editted my question
    – user9244481
    Nov 10 at 18:39












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to load the names of my documents in Firestore and show them in my tableViewController. Everytime I try i get an error and I don't know where it's coming from. I've tried a lot of things and I can't seem to find the solution. The delegate methods are called before the info is loaded, but if I reload the tableView the app crashes. If you can help me, thanks! :)



class ViewController: UITableViewController 




var db:Firestore!
var docArray = [String]()




override func viewDidLoad()
super.viewDidLoad()

navigationController?.navigationBar.prefersLargeTitles = true

db = Firestore.firestore()
loadData()

DispatchQueue.main.async
self.tableView.reloadData()



func loadData()

print("loaded")
db.collection("Producten").getDocuments (snap, error) in

for doc in (snap?.documents)!
self.docArray.append(doc.documentID)


DispatchQueue.main.async
self.tableView.reloadData()





override func numberOfSections(in tableView: UITableView) -> Int

return 1


override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

return docArray.count


override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

print(docArray)

let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel?.text = docArray[indexPath.row]
return cell




crash log:



2018-11-10 19:31:17.551261+0100 Den Hartog[57326:4767154] *** Assertion 
failure in [UITableView_dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-
3698.93.8/UITableView.m:8054
2018-11-10 19:31:17.559180+0100 Den Hartog[57326:4767154] ***
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'unable to dequeue a cell
with identifier cell - must register a nib or a class for the
identifier or connect a prototype cell in a storyboard'
*** First throw call stack:

0 CoreFoundation 0x000000010fce01bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010f27e735 objc_exception_throw + 48
2 CoreFoundation 0x000000010fcdff42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010dfef877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0x000000011335a5b1 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 868
5 UIKitCore 0x000000011335a219 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 91
6 Den Hartog 0x000000010d48b386 $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtF + 422
7 Den Hartog 0x000000010d48b5ec $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtFTo + 108
8 UIKitCore 0x000000011337566e -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 771
9 UIKitCore 0x0000000113375bfb -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
10 UIKitCore 0x000000011333cc36 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2863
11 UIKitCore 0x000000011335d8ee -[UITableView layoutSubviews] + 165
12 UIKitCore 0x000000011361b795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
13 QuartzCore 0x0000000114ba3b19 -[CALayer layoutSublayers] + 175
14 QuartzCore 0x0000000114ba89d3 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
15 QuartzCore 0x0000000114b217ca _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
16 QuartzCore 0x0000000114b5897e _ZN2CA11Transaction6commitEv + 576
17 QuartzCore 0x0000000114b596fa _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
18 CoreFoundation 0x000000010fc44c27 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x000000010fc3f0be __CFRunLoopDoObservers + 430
20 CoreFoundation 0x000000010fc3f751 __CFRunLoopRun + 1537
21 CoreFoundation 0x000000010fc3ee11 CFRunLoopRunSpecific + 625
22 GraphicsServices 0x00000001188c21dd GSEventRunModal + 62
23 UIKitCore 0x000000011313181d UIApplicationMain + 140
24 Den Hartog 0x000000010d48e7c7 main + 71
25 libdyld.dylib 0x0000000110d99575 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type
NSException
(lldb)









share|improve this question















I'm trying to load the names of my documents in Firestore and show them in my tableViewController. Everytime I try i get an error and I don't know where it's coming from. I've tried a lot of things and I can't seem to find the solution. The delegate methods are called before the info is loaded, but if I reload the tableView the app crashes. If you can help me, thanks! :)



class ViewController: UITableViewController 




var db:Firestore!
var docArray = [String]()




override func viewDidLoad()
super.viewDidLoad()

navigationController?.navigationBar.prefersLargeTitles = true

db = Firestore.firestore()
loadData()

DispatchQueue.main.async
self.tableView.reloadData()



func loadData()

print("loaded")
db.collection("Producten").getDocuments (snap, error) in

for doc in (snap?.documents)!
self.docArray.append(doc.documentID)


DispatchQueue.main.async
self.tableView.reloadData()





override func numberOfSections(in tableView: UITableView) -> Int

return 1


override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

return docArray.count


override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

print(docArray)

let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel?.text = docArray[indexPath.row]
return cell




crash log:



2018-11-10 19:31:17.551261+0100 Den Hartog[57326:4767154] *** Assertion 
failure in [UITableView_dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-
3698.93.8/UITableView.m:8054
2018-11-10 19:31:17.559180+0100 Den Hartog[57326:4767154] ***
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'unable to dequeue a cell
with identifier cell - must register a nib or a class for the
identifier or connect a prototype cell in a storyboard'
*** First throw call stack:

0 CoreFoundation 0x000000010fce01bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010f27e735 objc_exception_throw + 48
2 CoreFoundation 0x000000010fcdff42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010dfef877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0x000000011335a5b1 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 868
5 UIKitCore 0x000000011335a219 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 91
6 Den Hartog 0x000000010d48b386 $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtF + 422
7 Den Hartog 0x000000010d48b5ec $S10Den_Hartog14ViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtFTo + 108
8 UIKitCore 0x000000011337566e -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 771
9 UIKitCore 0x0000000113375bfb -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
10 UIKitCore 0x000000011333cc36 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2863
11 UIKitCore 0x000000011335d8ee -[UITableView layoutSubviews] + 165
12 UIKitCore 0x000000011361b795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
13 QuartzCore 0x0000000114ba3b19 -[CALayer layoutSublayers] + 175
14 QuartzCore 0x0000000114ba89d3 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
15 QuartzCore 0x0000000114b217ca _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
16 QuartzCore 0x0000000114b5897e _ZN2CA11Transaction6commitEv + 576
17 QuartzCore 0x0000000114b596fa _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
18 CoreFoundation 0x000000010fc44c27 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x000000010fc3f0be __CFRunLoopDoObservers + 430
20 CoreFoundation 0x000000010fc3f751 __CFRunLoopRun + 1537
21 CoreFoundation 0x000000010fc3ee11 CFRunLoopRunSpecific + 625
22 GraphicsServices 0x00000001188c21dd GSEventRunModal + 62
23 UIKitCore 0x000000011313181d UIApplicationMain + 140
24 Den Hartog 0x000000010d48e7c7 main + 71
25 libdyld.dylib 0x0000000110d99575 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type
NSException
(lldb)






ios swift tableview google-cloud-firestore






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 18:39

























asked Nov 10 at 17:29









user9244481

103




103











  • Can you post your crash log?
    – DionizB
    Nov 10 at 18:30










  • Yes, I editted my question
    – user9244481
    Nov 10 at 18:39
















  • Can you post your crash log?
    – DionizB
    Nov 10 at 18:30










  • Yes, I editted my question
    – user9244481
    Nov 10 at 18:39















Can you post your crash log?
– DionizB
Nov 10 at 18:30




Can you post your crash log?
– DionizB
Nov 10 at 18:30












Yes, I editted my question
– user9244481
Nov 10 at 18:39




Yes, I editted my question
– user9244481
Nov 10 at 18:39












1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










UITableViewCell default identifier is "Cell", not "cell" and that's why your application is crashing when you are trying to reload tableView data.



Change this:



let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)


With this:



let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)





share|improve this answer




















  • Hmm it still crashes, do you have any other ideas?
    – user9244481
    Nov 10 at 18:51










  • Did you add your cell in storyboard?
    – DionizB
    Nov 10 at 18:51






  • 1




    That was the problem, thanks a lot!
    – user9244481
    Nov 10 at 18:53










  • Happy to help :D
    – DionizB
    Nov 10 at 18:55










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241580%2fhow-can-i-show-firestore-document-names-in-a-tableviewcontroller%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










UITableViewCell default identifier is "Cell", not "cell" and that's why your application is crashing when you are trying to reload tableView data.



Change this:



let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)


With this:



let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)





share|improve this answer




















  • Hmm it still crashes, do you have any other ideas?
    – user9244481
    Nov 10 at 18:51










  • Did you add your cell in storyboard?
    – DionizB
    Nov 10 at 18:51






  • 1




    That was the problem, thanks a lot!
    – user9244481
    Nov 10 at 18:53










  • Happy to help :D
    – DionizB
    Nov 10 at 18:55














up vote
0
down vote



accepted










UITableViewCell default identifier is "Cell", not "cell" and that's why your application is crashing when you are trying to reload tableView data.



Change this:



let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)


With this:



let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)





share|improve this answer




















  • Hmm it still crashes, do you have any other ideas?
    – user9244481
    Nov 10 at 18:51










  • Did you add your cell in storyboard?
    – DionizB
    Nov 10 at 18:51






  • 1




    That was the problem, thanks a lot!
    – user9244481
    Nov 10 at 18:53










  • Happy to help :D
    – DionizB
    Nov 10 at 18:55












up vote
0
down vote



accepted







up vote
0
down vote



accepted






UITableViewCell default identifier is "Cell", not "cell" and that's why your application is crashing when you are trying to reload tableView data.



Change this:



let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)


With this:



let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)





share|improve this answer












UITableViewCell default identifier is "Cell", not "cell" and that's why your application is crashing when you are trying to reload tableView data.



Change this:



let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)


With this:



let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 10 at 18:44









DionizB

8221310




8221310











  • Hmm it still crashes, do you have any other ideas?
    – user9244481
    Nov 10 at 18:51










  • Did you add your cell in storyboard?
    – DionizB
    Nov 10 at 18:51






  • 1




    That was the problem, thanks a lot!
    – user9244481
    Nov 10 at 18:53










  • Happy to help :D
    – DionizB
    Nov 10 at 18:55
















  • Hmm it still crashes, do you have any other ideas?
    – user9244481
    Nov 10 at 18:51










  • Did you add your cell in storyboard?
    – DionizB
    Nov 10 at 18:51






  • 1




    That was the problem, thanks a lot!
    – user9244481
    Nov 10 at 18:53










  • Happy to help :D
    – DionizB
    Nov 10 at 18:55















Hmm it still crashes, do you have any other ideas?
– user9244481
Nov 10 at 18:51




Hmm it still crashes, do you have any other ideas?
– user9244481
Nov 10 at 18:51












Did you add your cell in storyboard?
– DionizB
Nov 10 at 18:51




Did you add your cell in storyboard?
– DionizB
Nov 10 at 18:51




1




1




That was the problem, thanks a lot!
– user9244481
Nov 10 at 18:53




That was the problem, thanks a lot!
– user9244481
Nov 10 at 18:53












Happy to help :D
– DionizB
Nov 10 at 18:55




Happy to help :D
– DionizB
Nov 10 at 18:55

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241580%2fhow-can-i-show-firestore-document-names-in-a-tableviewcontroller%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党