Hardware

RSS for tag

Delve into the physical components of Apple devices, including processors, memory, storage, and their interaction with the software.

Post

Replies

Boosts

Views

Activity

The impact of MicrophoneMode on my Mac application.
I have a 4-input, 4-output hardware device and an 8-input, 8-output virtual device, which I combine into an aggregate device. I am using the SimplyCoreAudio library to get the channel count. The code is as follows: aggregationDevice!.channels(scope: .input) =>> 12 aggregationDevice!.channels(scope: .output) =>> 12 When the program's MicrophoneMode is set to standard, the channel count is correct. However, when I set the MicrophoneMode to voiceIsolation, the channel count is incorrect: aggregationDevice!.channels(scope: .input) =>> 4 aggregationDevice!.channels(scope: .output) =>> 12 Below is the code for creating the aggregate device: func createAggregateDevice(mainDevice: AudioDevice, secondDevice: AudioDevice?, named name: String, uid: String) -> AudioDevice? { guard let mainDeviceUID = mainDevice.uid else { return nil } var deviceList: [[String: Any]] = [ [ kAudioSubDeviceUIDKey: mainDeviceUID, kAudioSubDeviceDriftCompensationKey:1 ] ] // make sure same device isn't added twice if let secondDeviceUID = secondDevice?.uid, secondDeviceUID != mainDeviceUID { deviceList.append([ kAudioSubDeviceUIDKey: secondDeviceUID, kAudioSubDeviceDriftCompensationKey:1, kAudioSubDeviceInputChannelsKey:8 ]) } let desc: [String: Any] = [ kAudioAggregateDeviceNameKey: name, kAudioAggregateDeviceUIDKey: uid, kAudioAggregateDeviceSubDeviceListKey: deviceList, kAudioAggregateDeviceMainSubDeviceKey: mainDeviceUID, kAudioAggregateDeviceIsPrivateKey:false, ] var deviceID: AudioDeviceID = 0 let error = AudioHardwareCreateAggregateDevice(desc as CFDictionary, &deviceID) guard error == noErr else { return nil } return AudioDevice.lookup(by: deviceID) } I hope someone can tell me the reason Thank you!
0
0
82
2d
IPad connected to DSLR captures incomplete image
At present, I am using the avfoundation external device API to connect my iPad to a DSLR camera for data collection. On my end, I am using AVCapture Video Data Output to obtain raw data for processing and rendering. However, the pixelbuf returned from the system layer is incomplete, with only a portion cropped in the middle. But using the Mac API is normal. I would like to ask how to obtain the complete pixelbuf of the image on iPad
0
0
120
1w
QuickLook Crash at iOS 18.x
Hello! In our App we found out the сrash at QuickLook after users updated their iPhones up to iOS 18. Crash report: SIGABRT 0x0000000000000000 Crashed: Thread 0 libsystem_kernel.dylib __abort_with_payload + 8 1 libsystem_kernel.dylib abort_with_payload_wrapper_internal + 104 2 libsystem_kernel.dylib abort_with_payload_wrapper_internal + 0 3 libobjc.A.dylib _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116 4 libobjc.A.dylib _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 0 5 libobjc.A.dylib weak_register_no_lock + 396 6 libobjc.A.dylib objc_initWeak + 440 7 UIKitCore -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1412 8 UIKitCore -[_UIRemoteViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 396 9 UIKitCore -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1180 10 UIKitCore -[_UISizeTrackingView _didMoveFromWindow:toWindow:] + 112 11 UIKitCore -[UIView(Internal) _didMoveFromWindow:toWindow:] + 712 12 UIKitCore __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 128 13 CoreAutoLayout -[NSISEngine withBehaviors:performModifications:] + 84 14 UIKitCore -[UIView _postMovedFromSuperview:] + 512 15 UIKitCore __UIViewWasRemovedFromSuperview + 136 16 UIKitCore -[UIView(Hierarchy) removeFromSuperview] + 248 17 QuickLook -[QLToolbarController setAccessoryView:animated:] + 576 18 QuickLook __55-[QLPreviewController _presentLoadedPreviewCollection:]_block_invoke + 120 19 QuickLookUICore QLRunInMainThread + 60 20 QuickLook -[QLPreviewController _presentLoadedPreviewCollection:] + 116 21 QuickLook __48-[QLPreviewController _presentPreviewCollection]_block_invoke_2 + 68 22 QuickLook (Missing) 23 libswift_Concurrency.dylib swift::runJobInEstablishedExecutorContext(swift::Job*) + 252 After research, we found out that a crash occurs in QuickLook when a user tries to open a file with unknown mimeType - application/octet-stream. QuickLook convert that files to known type (for an example - application/pdf), but crashes for the first opening the file. Any help would be greatly appreciated!
1
2
304
1w
Serial port speed limited to 3 Mbps
Six months ago I wrote FB14122473, detailing how the built-in CDC (or FTDI) VCP serial port driver is limited to 3 Mbps or less. Thing is, there are some FTDI devices that can do 12 Mbps (maybe more), and I have devices I need to communicate with at 4 Mbps. I had to use the FTDI SDK to be able to communicate with these. I was hoping this post might help draw attention to that bug report.
1
0
103
1w
what's wrong
i never imagined that an apple product could do such. a thing . i 've updated to the latest version , 15.3 what should i do next time? i've had to restart it three times, the last one finally helped here is the link https://youtu.be/-aqjzVKMZGA
0
0
88
2w
BLE HID Gamepad on nRF52805: Not Recognized on iOS
I am working on a Bluetooth Low Energy (BLE) project using the nRF52840 Development Kit (DK), which has been reconfigured to simulate an nRF52805 chip. The firmware is based on Nordic Semiconductor's ble_app_hids_keyboard example, with modifications to implement a BLE HID Gamepad. I am using the S113 SoftDevice and have successfully tested the functionality with Android devices. The gamepad is recognized as a HID device, and it works as expected on Android, verified using the hardwareTester website. However, when I connect the gamepad to an iPhone via BLE, the same hardwareTester website does not respond as it does on Android, indicating that the iPhone does not recognize the device as a gamepad. The BLE connection is established successfully, but it seems iOS does not interpret the HID report descriptor or the BLE HID service correctly. I suspect there might be compatibility issues with the HID descriptor or the GATT attributes for iOS-specific BLE HID requirements. I would like to have some help.
1
0
148
3w
Bluetooth HID Button Release Not Working on iPad for Bluetooth Pointer
I am developing a Bluetooth pointer device to control an iPad using HID. Most functionality works well, including mouse movement and button presses. However, I am encountering a strange issue with button releases. For the HID descriptor for the iPad I defined the following: 0501 0902 A101 8503 0509 // Mouse Buttons 1901 2902 // 2 buttons 1500 2501 9502 // Report count for two buttons 7501 8102 9501 7506 // Padding 8103 0501 0901 A100 1500 // Min value 26FF7F // Max value (0...32767) 0930 0931 7510 9502 8102 // Absolute coordinate pointer C0 Do you see an issue with the descriptor? Example packages sent over bluetooth: 0xA103 01 4F3A FB50 // 01 is a left button click, works well, an icon is clicked on iPad. 0xA103 00 4F3A FB50 // 00 should be a left button release, package is sent and received, but button is NOT released, but held on the iPad! The mouse coordinates are updated well, however, I expect the button to be released when sending 0xA103 00 4F3A FB50, but it is held down instead. Perhaps there is a special requirement for iOS to make this work? It is close to be fully functioning.
0
0
152
3w
builtInTrueDepthCamera cannot set exposure duration
Hello, I am making an app that requires the use of builtInTrueDepthCamera. I am trying to set a custom exposure mode but the completion for: open func setExposureModeCustom(duration: CMTime, iso ISO: Float) async -> CMTime never gets called. It works perfectly fine for builtInLiDARDepthCamera. In my function I am confirming that a custom exposure mode is supported and it is within the range of acceptable durations. Is it known that this just does not work? Here is my AVCaptureDevice extension function: extension AVCaptureDevice { func setExposureTime(to milliseconds: Double) async { print("setting exposure time 1") await withCheckedContinuation { continuation in // Check if custom exposure mode is supported guard self.isExposureModeSupported(.custom) else { print("Custom exposure mode is not supported on this device.") continuation.resume() // Resume immediately if not supported return } // Convert milliseconds to CMTime let exposureTime = CMTimeMake(value: Int64(milliseconds * 1_000), timescale: 1_000_000) print("Exposure time var : \(exposureTime.seconds * 1000)") print("Exposure time min : \(self.activeFormat.minExposureDuration.seconds * 1000)") print("Exposure time max : \(self.activeFormat.maxExposureDuration.seconds * 1000)") // Ensure the exposure time is within the supported range guard exposureTime >= self.activeFormat.minExposureDuration, exposureTime <= self.activeFormat.maxExposureDuration else { print("Exposure time is out of the supported range.") continuation.resume() // Resume immediately if out of range return } print("setting exposure time 2") // Attempt to set the exposure time do { try self.lockForConfiguration() print("setting exposure time 3") self.setExposureModeCustom(duration: exposureTime, iso: AVCaptureDevice.currentISO) { time in print("Exposure time set to: \(time.seconds * 1000) ms") continuation.resume() // Resume after the completion handler is executed } self.unlockForConfiguration() } catch { print("Failed to configure exposure: \(error)") continuation.resume() // Resume on failure } } } }
0
0
126
3w
How to Apply for a New Product Profile in HomeKit for a Standing Desk
Hello fellow developers, I’m developing a smart standing desk under my brand Beflo, which integrates technology with traditional furniture. As part of this, we’re working to make our Tenon smart desk compatible with the Apple HomeKit ecosystem. While exploring HomeKit profiles, I noticed there isn’t a specific profile for standing desks. However, there are similar profiles, such as curtains, which also use motors for operation and could align with our product's functionality, like height adjustments. I have a few questions: What is the process for proposing or applying for a new product profile in HomeKit? Is it feasible to adapt an existing profile (like curtains) in the interim while awaiting approval for a new profile? Has anyone had experience navigating this process, and are there any best practices or resources you recommend? I’d love to hear insights from anyone who has experience with HomeKit development or working on similar product integrations. Thank you for your time and guidance!
2
0
179
3w
Bluetooth and shared iCloud accounts
I know this will sound like a weird use case, but it is potentially relevant to a product I am working on. If I were to link two or more iPhones to the same iCloud account (I know this is uncommon and generally a bad idea, but it is possible so I have to consider it). Next I pair a BLE device to one of the phones using my app which has the background bluetooth permission with the app acting as the central so it can automatically restore a connection when the BLE device comes back into range. I then install the same app on the other iPhone(s) linked to this account and separate them physically so they are out of BLE range of each other. The BLE device is taken out of range of the first phone and into range of one of the others. First question is will the BLE device automatically connect to the other iPhone? If yes, will the app have any way of determining that it's running on a different iPhone with the same device connected? If yes, can the app prevent connection to the other phones in some way?
2
0
207
4w
Scanning Thread accessories in HomeKit
I'm trying to browse my Homekit accessories and try to show the different accessories communication protocols, i.e. Wifi, Thread, Zigbee, Z-wave! Zigbee and Z-wave I can have hard-coded depending on model because I have so few! But…. I can easily find all accessories which are wifi attached by using: isBriged == false and uniqueIdentifiersForBridgedAccessories == nil However, I can see that some of the accessories are thread enabled (I have read the documentation for the accessory) but still in the list. So, my questions: Are there any attributes in the accessory that is unique for a Thread accessory? for accessory in accessories { if(accessory.isBridged == false && accessory.uniqueIdentifiersForBridgedAccessories == nil ) { // Can be a Wifi device but need more controls // requiresThreadRouter??? if (true) { wifiAccessaries.append(accessory) } } }
3
0
158
Dec ’24
Questions abou Performing Long-Term Actions in the Background
We are reaching out to discuss an issue we have encountered with our app's activation process while running in the background. Currently, we are employing an iBeacon-based activation scheme, but we have noticed that after the app is activated, it is unable to receive UUID data from the scan-response while in the background. We are considering the possibility of embedding the UUID data into the advertisement so that the app can receive it once activated by the iBeacon. Additionally, we are preparing to use both Core Bluetooth’s “Performing Long-Term Actions in the Background” feature and the iBeacon scheme simultaneously for app activation. We would like to know if these two methods can coexist without any mutual interference. Currently, we are utilizing a method of updating the beacon advertisement after connection and disconnection to enhance the app's activation capability. However, in some scenarios where the signal is weak, the app does not detect the vehicle after being activated and will not be reactivated by the same beacon after going into sleep mode. Our current approach is to update the beacon advertisement every 10 seconds to improve this capability. We have outlined our proposed changes and would appreciate your confirmation on whether they could lead to better optimization: 1.Embedding the UUID from the scan-response into the advertisement. 2.Updating the iBeacon advertisement content every 10 seconds. 3. Simultaneously using Core Bluetooth's "Performing Long-Term Actions in the Background" feature along with the iBeacon scheme for app activation. Additionally, we would like to know if these changes could potentially cause any other issues. Thank you for your assistance, and I look forward to your insights on this matter.
1
0
237
Nov ’24
AccessorySetupKit - Peripheral devices with 16 bit UUID are not found in the ASKSample app.
My test was conducted by changing the pink dice to have a 16 bit UUID using the ASKSampleAccessory app. Afterwards, I ran AccessorySetupKit Picker in the ASKSample app, but Pink dice was not found. We confirmed that Pink dice was searched well in other apps. Does AccessorySetupKit not support 16 bit UUID? AccessorySetupKit Sample code : https://developer.apple.com/documentation/AccessorySetupKit/authorizing-a-bluetooth-accessory-to-share-a-dice-roll
1
0
210
Nov ’24
dockkit anomolies -- anyone else seen these?
I have two Dockkit anomolies to report. Hoping a DTS person has seen these and/or can comment. First, my setup: I am controlling the accessory by making repeated calls to set the angular velocity. And the first thing I do is make a call dockManager.setSystemTrackingEnabled(false) because I'm doing my own tracking. I would note that I tried calling track() on my own, with a bunch of observation rectangles (or even just one) but it didn't work well, even though I was calling at the correct rate. Instead, I measure the angular deviation to where I wish my camera was pointed, and set the angular velocity proportional to the error. First issue: in normal operation, the green tracking light is on, on the hardware (the Instaflow Pro 360 motorized dock). Squeezing the trigger toggles the green light on/off; only when the light is on will the dock accept my calls to set the angular velocity. Fine. But sometimes squeezing the trigger won't reactivate the green light. In this case, the ONLY thing that seems to work is switching to the Instaflow Pro 360 app, and activating the camera. Immediately the green light turns on, and I'm good (and can return to my own app, with the green light still on). So what hidden API call does Instaflow have, that I don't that can make this happen? Sure, it's their own app, but I imagine they don't have access to calls I don't, so how does their app manage to get the green light back on? It doesn't always happen. Would love to know how to snap out of this. Second issue: While I usually use rectangle from running the vision system to guide my camera position, sometimes I left the user directly control the angular "yaw" velocity (rotation around the vertical axis) directly (by issuing commands over the network). Sometimes, when the user sets a non-zero velocity, when they set a zero velocity a short time later, the camera doesn't immedately respond and stop. (It's not a network issue. I can verify the API sends a call to set the angular velocity to zero, and the camera keeps rotating for a good fraction of a second.) Most times the camera stops immediately, but sometimes it doesn't. Oddly, I never see this issue when letting the user set the angular velocity in the "pitch up/down" axis. Just the yaw axis. Anybody else seen this? I feel like it wasn't a problem till I got to iOS18 but I won't swear to it. Any advice/assistance/discussion greatly appreciated.
1
0
203
Nov ’24
Monitor flickering after MacOS Sonoma update
After update to MacOS Sonoma 14.7.1 (23H222) my external monitor immediately started to flicker (noticeable even on 100Hz refresh rate). During the update the external monitor was connected to the laptop. Flickering persist on personal Windows laptop too. Tried to connect/disconnect current cables, flickering persists. Tried to switch to another cable Display port to HDMI, flickering persists. Monitor now is basically unusable, the update damaged it.
1
0
168
Nov ’24