Post

Replies

Boosts

Views

Activity

Voice Control does not work with any connected bluetooth devices
Our accessibility users are using Apple's Voice Control feature: https://support.apple.com/en-us/HT210417 Voice Control does not work with bluetooth devices. It doesn't seem to be natively supported by Apple and only the iOS device's microphone works. Airpods, Bose Headphones and Jabra BT devices do NOT work. Is there a way to get our application to run with Bluetooth devices? The current experience doesn't work with our accessibility users as they physically are unable to move closer to the device so bluetooth headphones are critical for their user experience to work correctly.
0
1
454
Sep ’23
Detect if user is running Voice Control
Our users are using Apple's native Voice Control feature: https://support.apple.com/en-us/HT210417 We want to enhance our accessibility experience by adding some additional voice controlled dialogs that show up specifically when Voice Control is enabled. It can be determined if other Apple accessibility features are turned on via a check like UIAccessibility.isVoiceOverRunning, however there is no option for Voice Control (note, different than Voice Over). How can I detect if a user is running Voice Control or not?
1
2
699
Sep ’23
Data equality checks have changed in iOS 17
Data equality checks have incorrectly changed on iOS 17. Step to reproduce: Run XCTestCase file in iOS 16. It will pass. Run XCTestCase file in iOS 17. It will fail. Suspected Cause: In iOS 17, Data has changed how it performs equality. Previously equality did not care about ordered keys, now it does. I've noticed if I modify the test case to use a JSONEncoder setting of encoder.outputFormatting = .sortedKeys, then it passes. Reason this is a bug: This is unexpected and changed behavior. Equality should not care what the ordering of the keys are when comparing one data object to another data object. Ordering is irrelevant for a JSON object. It's the content that matters. This will cause a huge regression for us in our previously released app if this hits production. XCTestCase: import XCTest final class JSONDecodingTest: XCTestCase { struct Address: Codable { let street: String let city: String let state: String let postalCode: String } struct OrderItem: Codable { let productID: String let productName: String let quantity: Int } struct Order: Codable { let orderID: String let totalAmount: Double let items: [OrderItem] } struct User: Codable { let id: Int let username: String let email: String let address: Address let orders: [Order] } struct RootObject: Codable { let user: User } func testData() throws { let object1Json: String = """ { "user": { "id": 12345, "username": "johndoe", "email": "john.doe@example.com", "address": { "street": "456 Elm St", "city": "Somewhere", "state": "NY", "postalCode": "54321" }, "orders": [ { "orderID": "A987", "totalAmount": 75.99, "items": [ { "productID": "P123", "productName": "Widget", "quantity": 2 }, { "productID": "P456", "productName": "Gizmo", "quantity": 1 } ] }, { "orderID": "B543", "totalAmount": 32.50, "items": [ { "productID": "P789", "productName": "Thingamajig", "quantity": 3 } ] } ] } } """ let encoder = JSONEncoder() encoder.outputFormatting = .sortedKeys let itemData = object1Json.data(using: .utf8)! let item = try JSONDecoder().decode(RootObject.self, from: itemData) let data1 = try encoder.encode(item) let data2 = try encoder.encode(item) XCTAssertTrue(data1 == data2) } } I've filed feedback here: https://feedbackassistant.apple.com/feedback/12995492 I noticed that in WWDC, Apple said they rewrote the entire JSONEncoder & JSONDecoder implementations. This is a massive regression: https://developer.apple.com/videos/play/wwdc2023/10164/
3
1
2k
Aug ’23
App crashes when calling UIApplication.open
My app is crashing and I suspect it is from MKMapView I am using an MKMapView in my application. I want to link the user to Apple Maps. The user may want to use Apple Maps, so I allow them to click a button, and when tapped it calls the following:      var url = URLComponents(string: "https://maps.apple.com")     let queryItems = URLQueryItem(name: "q", value: place.name)     url?.queryItems = [queryItems]          UIApplication.shared.open(url!.url!.absoluteURL) Approximately 80% of the time I call this, I am seeing a crash: libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument This is the stack trace Thread 1 Queue : com.apple.main-thread (serial) #0 0x00000001be057734 in __semwait_signal () #1 0x00000001993dba34 in nanosleep () #2 0x00000001993db8f8 in usleep () #3 0x00000001932cb684 in CABackingStoreCollectBlocking () #4 0x0000000192cc0ab0 in __35-[UIWindowScene _prepareForSuspend]_block_invoke () #5 0x000000019208c7cc in -[_UIContextBinder purgeContextsWithPurgeAction:] () #6 0x0000000192cc0a38 in -[UIWindowScene _prepareForSuspend] () #7 0x0000000191ec6490 in -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] () #8 0x0000000191ec74c8 in -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] () #9 0x0000000192537b5c in -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] () #10 0x000000019f5baeb8 in -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] () #11 0x000000019f5e74f0 in __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 () #12 0x000000019f5c96a4 in -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] () #13 0x000000019f5e741c in __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke () #14 0x0000000101105d90 in _dispatch_client_callout () #15 0x000000010110981c in _dispatch_block_invoke_direct () #16 0x000000019f60dfa0 in __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ () #17 0x000000019f60dc30 in -[FBSSerialQueue _targetQueue_performNextIfPossible] () #18 0x000000019f60e184 in -[FBSSerialQueue _performNextFromRunLoopSource] () #19 0x000000018ffd8848 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ () #20 0x000000018ffd8744 in __CFRunLoopDoSource0 () #21 0x000000018ffd7a48 in __CFRunLoopDoSources0 () #22 0x000000018ffd1a28 in __CFRunLoopRun () #23 0x000000018ffd11c0 in CFRunLoopRunSpecific () #24 0x00000001a75b9734 in GSEventRunModal () #25 0x0000000192a3f7e4 in -[UIApplication _run] () #26 0x0000000192a45054 in UIApplicationMain () #27 0x000000010095d2f8 in main at /Users/ZXX/Developer/ZXZZ/AppLogic/AppDelegate.swift:14 #28 0x000000018fc8dcf8 in start () Thread 3#0 0x00000001dba81744 in start_wqthread () com.apple.uikit.eventfetch-thread (5)#0 0x00000001be0324fc in mach_msg_trap () #1 0x00000001be031884 in mach_msg () #2 0x000000018ffd7d10 in __CFRunLoopServiceMachPort () #3 0x000000018ffd1bb0 in __CFRunLoopRun () #4 0x000000018ffd11c0 in CFRunLoopRunSpecific () #5 0x00000001912b1fac in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] () #6 0x00000001912b1e78 in -[NSRunLoop(NSRunLoop) runUntilDate:] () #7 0x0000000192af438c in -[UIEventFetcher threadMain] () #8 0x00000001914232fc in __NSThread__start__ () #9 0x00000001dba78c00 in _pthread_start () Thread 6#0 0x00000001dba81744 in start_wqthread () Thread 11#0 0x00000001dba81744 in start_wqthread () com.apple.NSURLConnectionLoader (12)#0 0x00000001be0324fc in mach_msg_trap () #1 0x00000001be031884 in mach_msg () #2 0x000000018ffd7d10 in __CFRunLoopServiceMachPort () #3 0x000000018ffd1bb0 in __CFRunLoopRun () #4 0x000000018ffd11c0 in CFRunLoopRunSpecific () #5 0x00000001908aa4b8 in ___lldb_unnamed_symbol11592$$CFNetwork () #6 0x00000001914232fc in __NSThread__start__ () #7 0x00000001dba78c00 in _pthread_start () Thread 14#0 0x00000001dba81744 in start_wqthread () AVAudioSession Notify Thread (15)#0 0x00000001be0324fc in mach_msg_trap () #1 0x00000001be031884 in mach_msg () #2 0x000000018ffd7d10 in __CFRunLoopServiceMachPort () #3 0x000000018ffd1bb0 in __CFRunLoopRun () #4 0x000000018ffd11c0 in CFRunLoopRunSpecific () #5 0x0000000197a4df20 in GenericRunLoopThread::Entry(void*) () #6 0x0000000197a500d8 in CAPThread::Entry(CAPThread*) () #7 0x00000001dba78c00 in _pthread_start () Thread 16#0 0x00000001dba81744 in start_wqthread () Thread 17#0 0x00000001dba81744 in start_wqthread () Thread 18 Queue : com.Metal.CompletionQueueDispatch (serial) #0 0x00000001be057334 in __pthread_kill () #1 0x00000001dba79aa0 in pthread_kill () #2 0x00000001993deb90 in abort () #3 0x00000001a4bbebb8 in abort_message () #4 0x00000001a4bafeb0 in demangling_terminate_handler() () #5 0x00000001a4abc06c in _objc_terminate() () #6 0x00000001a4bbdfa0 in std::__terminate(void (*)()) () #7 0x00000001a4bbdf2c in std::terminate() () #8 0x00000001a4add91c in objc_terminate () #9 0x0000000101105e70 in _dispatch_client_callout4 () #10 0x0000000101123318 in _dispatch_mach_msg_invoke () #11 0x000000010110dcbc in _dispatch_lane_serial_drain () #12 0x000000010112431c in _dispatch_mach_invoke () #13 0x000000010110dcbc in _dispatch_lane_serial_drain () #14 0x000000010110ecf8 in _dispatch_lane_invoke () #15 0x000000010110dcbc in _dispatch_lane_serial_drain () #16 0x000000010110ecc4 in _dispatch_lane_invoke () #17 0x000000010111ba00 in _dispatch_workloop_worker_thread () #18 0x00000001dba7a7a4 in _pthread_wqthread ()
1
0
1.3k
May ’21