I built my first app on my iPhone 14 running iOS 16, including any updated versions of iOS 16 since June. It is an OBD-II app to read vehicle data through the BLE adapter on my vehicle. I have ran the app for ~20+ hours of testing on iOS 16 with zero errors, warnings or crashes in Xcode, and more on my drive to/from school with just my phone.
I updated my phone to iOS 17.0.3 four days ago and it has been crashing ever since. I open the app, and as soon as I try to connect to my Bluetooth adapter via button press, it crashes. It will do this countless times and then randomly work once. I was hoping the update today for iOS 17.1 would fix the issue but it hasn't.
It shows this error, highlighted in red on the "struct DataManagementApp: App {" line of my code, right after the @main:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
When it randomly decides to work, it also prints this warning each time I move between views. It is highlighted in yellow in the console window:
Snapshotting a view (0x105879710, _UIButtonBarStackView) that is not in a visible window requires afterScreenUpdates:YES.
Lastly, as I am new to iOS development, I have been trying to figure out how to look at debugging and logs. Somewhere along the way I had this print into the console, highlighted in green:
warning: Module "/Users/bs/Library/Developer/Xcode/iOS DeviceSupport/iPhone15,2 17.1 (21B74)/Symbols/usr/lib/system/libsystem_kernel.dylib" uses triple "arm64e-apple-ios17.1.0", which is not compatible with the target triple "arm64-apple-ios17.0.0". Enabling per-module Swift scratch context.
I never had any of these pop up or my app crash throughout the development or testing. It has only started happening since I updated my phone to iOS 17. I'm not sure on how to find the problem, or what it might be. I figured it was an issue with the software updates, either iOS or Xcode. To make it even more confusing, the app still works on my iPad after updating to iPadOS 17.0.3.
Any help would be much appreciated.