Hey Quinn! I am attaching the full crash report in this answer: SSSSSS PPPPP 1-4-22, 09-07.crash
Post
Replies
Boosts
Views
Activity
Hello Quinn, I have temporarily removed Sentry, re-tested and it still crashes. Please find the updated crash report attached.
SSSSSS PPPPP 4-4-22, 14-25.crash
I believe you are right. My host machine is indeed a Macbook Pro (14-inch, 2021) that has the M1 family chip.
On my Xcode project, I was excluding the "arm64" architecture for the simulator devices due to some old dependencies via the "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; flag.
As far as I can understand, this was triggering the simulator processes to spawn under Rosetta emulation, although this was not shown somewhere. Even the Activity Monitor window displayed 'Apple' instead of 'Intel' in the 'Kind' column:
When I removed the "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; flag, adjusted my dependencies and re-run the app on the Simulator, I was able to open the QuickLook preview controller without a crash, so I assume that this flag was to blame here.
As a general question, is there a way to know whether the simulator instance runs under Rosetta emulation?
If you undo your fix and look at your app in Activity Monitor, what do you see?
You are right: The iOS app shows up as 'Intel' kind in the Activity Monitor while the Simulator app shows up as 'Apple' kind.
Thanks Quinn!
Just noticed that I forgot to post the code that queries the value of the kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder flag:
if (@available(iOS 17.4, *)) {
CFTypeRef value = NULL;
OSStatus result = VTSessionCopyProperty(session,
kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder,
kCFAllocatorDefault,
&value);
if (result == noErr) {
NSLog(@"value: %@", value);
}
}
Something's that is also interesting is that when I set the kVTVideoEncoderSpecification_EnableLowLatencyRateControl flag during the creation of the compression session, then if I attempt to query back the value of the kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder flag using the code I pasted above, I get an error (-12900 kVTPropertyNotSupportedErr), which it's either wrong or it means that the low-latency mode does not support hardware acceleration?
Update
Just noticed that when the user adds contacts to their 'Selected Contacts' list, the application gets killed by the OS, so that's solved.
When they remove contacts from that list though, the OS doesn't kill the application, so the logic will still display and allow user to interact with contacts that they have since disallowed.
I have also noticed that if I issue a CNChangeHistoryFetchRequest when the application becomes active after the user has removed some of their 'Selected Contacts', then the CNFetchResult will include as many CNChangeHistoryAddContactEvent as the contacts that are allowed after the removal. The value of the currentHistoryToken property does not change.
Is this the proper way of detecting deletions on the 'Selected Contacts' list?