For myself, I was not able to get the process newbee outlined to work. Till issue is resolved, I have installed and used the iOS 16.0 simulator in Xcode 14.1 and it works as expected.
Mathias - since it is working in simulator and not device, is it possible your simulator is iOS 16.0 and your device is iOS 16.1?
Post
Replies
Boosts
Views
Activity
Same. For the moment, till it is fixed, I have worked around by using the 16.0 simulator as you mentioned.
From the log I am guessing you app is called CardScanner, and the first step you should perform is getting the log 'symbolicated', it will be more apparent where the crash is occurring:
3 CardScanner 0x100485c2c 0x1001d0000 + 2841644
4 CardScanner 0x100436e10 0x1001d0000 + 2518544
When symbolicated, those numbers (0x100485c2c 0x1001d0000 + 2841644) will turn into method names, which will help.
You should be able to symbolicate from Xcode -> Window -> Organiser and selecting Crashes, or on the device by selecting the device in Devices and Simulators, then view logs, then right click on your app name and selecting re-symbolicate
From the top of the log I can see that the thread that crashed was Thread 3:
Triggered by Thread: 3
So, check you're not updating the UI off that thread? (UI updates should be Dispatched onto main thread).
The exception is:
EXC_CRASH (SIGABRT)
So check there's not a nil somewhere that shouldn't be there, eg: inserting nil into an array or a dictionary, or setting something that is not an optional to nil ( or you've force unwrapped an optional using '!' )
Which version of Xcode are you using?
Only Xcode 12.5 and later have support for iOS 14.6. Also, Xcode 12.5 only installs on Big Sur and later.
If you're using Xcode 12.5 navigate to Xcode -> Window -> Devices and Simulators. You will need to connect your device via USB and wait for the device support files to be downloaded and installed.
Once the support files are downloaded, you should see some folders names for the iOS version off your home folder in ~/Library/Developer/Xcode/iOS DeviceSupport. Additionally, you should see a Developer section in the Device in Settings on the device, just after Game Center.
Earlier versions of Xcode include device support files bundled within the Xcode app (but only for the devices that version of Xcode directly supported). Xcode 12.5 includes bundled device support files - but not for iOS 14.6, it must be downloaded.
You can see what device support is bundled in Xcode by right clicking on the Xcode app (in Finder) -> 'Show Package Contents' and navigate to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport. You'll see a list of the bundled device support files.
If you're on Catalina or earlier, and Xcode 12.4 or earlier you can still run and test on iOS 14.6, but you need to get the developer support files onto the actual device first, using the Xcode 12.5 method.
Date() includes current date and time all in one package. You just need to extract the time parts from it. Have a look at Calendar class DateComponents method to get hour and minute as variables, or DateFormat() to just format them as a string. Examples:
import UIKit
// current date and time
let date = Date()
// Calender dateComponents
let components = Calendar.current.dateComponents([.hour,.minute], from: date)
let hour = components.hour
let minute = components.minute
// DateFormatter
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "hh:mm"
let hoursMinutesString = dateFormatter.string(from: date)
I would navigate to Build Settings Tab -> Signing for each target (main app, security, findersync) and then for each Configuration (Debug, Release) compare what has been configured by Xcode, and possibly manually override what has been automatically configured.