ios – XCode Preview simulator changes to optionals


I wanted to ask if anyone can point to documentation changes with XCode for Xcode 15.01 running iOS 17 “PREVIEW” simulators.

This code:

Text("Budgeted Details for \(categoryRecord.category)")

which is data retrieved from FMDB which returns an OPTIONAL used to work just fine in my preview.

Now it crashes in the XCode PREVIEW and the error is:
app “crashed due to implicitly unwrapped optional in BudgetedIncomeDetailForCategoryView.swift at line 43.”

The fix is simple:

Text("Budgeted Details for \(categoryRecord.category ?? " " )")

I just don’t recall seeing this change being reported anywhere?

The interesting thing for me is that the code as written runs fine in the run simulator and also when installed on my iPad.

It is only the preview simulator where this crash occurs.

Bug or feature??

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img