I'm not a developer, so my knowledge is limited. I only know enough to update the content of my app from time to time using Xcode. The app is database driven and includes hundreds of photos. It has worked fine for years and has never crashed. However, after I updated Xcode to 16.1 my app crashes when I run it on an iOS 18 Simulator. (It works fine on an iOS 17 Simulator.) The problem seems to have something to do with UItableView. Before I spend a lot of $$ for a developer to look into this, I'm wondering if the crashes might be because of a bug that will be fixed in future. Is there any way to tell? I have the crash report, but it's very long so I won't post it unless asked to. If it's helpful, this is the section of code that crashes:
// MARK: UITableViewDataSource extension DetailCollectionViewCell: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard let tableViewData = tableViewData else { fatalError("no tableViewData") } **Thread 1: fatal error: No tableViewData**
return tableViewData.count
Most probably, it is an error in your code. Problem comes likely from how tableViewData was declared.
Where and how did you define
- DetailCollectionViewCell
- tableViewData ?: was it declared as private var ? It should not. How was it initialised ? May be too late and not yet when tableView is called.
That could explain the error in iOS 18: you may have made wrong assumptions on the fact that tableViewData would exist at the time tableView function is called. It did work in iOS 17, because system happily let enough time to initialise. But no more in iOS 18 (optimised, or just changed).
But that would not be a bug in iOS.
Please show more code. It is hard to tell otherwise.
And show the part of the crash report dealing with thread 1.