External Accessory

RSS for tag

Communicate with accessories connected to a device by the Apple Lightning connector or through Bluetooth using External Accessory.

Posts under External Accessory tag

80 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

AVAudioSession allowBluetoothA2DP not working on external device iOS17 playAndRecord session
I saw a similar post to this where the issue was fixed in the final iOS17 release, but I am still having a problem since my situation is slightly different. I am wondering if its a bug based on current behavior, but was hoping maybe someone knows if the issue is with my setup? I am trying to monitor an external USB camera's audio input using the new iOS17 external call for iPad, over bluetooth. func setupAudioSession() { let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(.playAndRecord, mode: .default, options: [.allowBluetoothA2DP, .defaultToSpeaker] ) try audioSession.setActive(true) } catch { print("Failed to set up audio session: \(error)") } } When my execution order is: setupAudioSession() // code above // discover and connect the session AV inputs to the external USB // start an audio engine // connect audio engine output to a buffer queue and play // start the session My app does not allow routing to the headphones and directly switches to speaker. However if I change the order to this: setupAudioSession() // code above // discover and connect the session AV inputs to the external USB // start an audio engine // start the session --- !starting before connecting output! // connect audio engine output to a buffer queue and play The session stays connected to Bluetooth and plays over the headphones. However if I suspend the app and relaunch, I get switched back to speaker. I understand maybe the system is trying to prevent an audio feedback loop? But don't understand why launching the session early would get the desired behavior. Any help would be greatly appreciated.
1
1
673
Oct ’23
Check whether there has been any iOS SDK framework or program that support developing a custom driver for our own hardware device via USB type C port (after the release of the new iPhone 15 with type C port supported)
I'd like to check whether there has been (or there will be) any iOS SDK framework or program that support developing a custom driver for our own hardware device via USB type C port, especially after the release of the new iPhone 15 with type C port supported. In addition, I'd like to understand how the app review process will work if we're releasing a Crypto Wallet application that utilizes the cold wallet hardware device, will it be necessary for us to send a set of hardware over to the Apple review team, or the app review can be arranged without the actual device?
3
0
760
Oct ’23
iOS 17.1 Beta 2 - Bluetooth audio levels not reaching max - iPhone 15 Pro
On iOS 17.0.2 my bluetooth devices (CarPlay and earbuds) were performing at normal levels with all sound settings at default. In the gym, I like to max out my bluetooth earbuds. However, after updating to iOS 17.1 Beta 2 (21B5056e), my bluetooth earbuds set at max volume sounded medium. My first troubleshooting method was to check the sound settings... all setting (including accessibility) were left at the default inputs. To further troubleshoot, I tried other downloaded albums on my music library/playlists...all noticeably lower at max volume. I was thinking this might be related to my earbuds. However, when driving, I decided to play the same album in my 2021 GMC Sierra via CarPlay... I had to turn up the dash knob audio substantially higher to replicate what was considered loud (or rather "comfortably loud") in my truck. Apple tech supports only recommendation was to do a system restore and roll back to 17.0.2. Has anyone else tested music quality/sound over bluetooth before and after they updated from 17.0.2. to 17.1 Beta 1/2 ?
2
0
1.2k
Oct ’23
Ventura 13.4 External Display Sleep Loop Bug
The Ventura 13.4 update introduced a display signal lost bug which when the monitor is put to sleep after power saving setting is reached or if manually using the shortcut keys to put sleep the display, it wakes up the monitor briefly then tries to go back to sleep for 15 seconds and then wakes up with the “no signal” warning in an infinite loop. It's starting to be reported by others, where this did not exist until after the update. Reddit: Ventura 13.4 Display Sleep Issue https://www.reddit.com/r/MacOS/comments/13lyu2y/macos_ventura_134_display_sleep_issue/ I tried everything from turning off power saving settings, turned off screen saver, WoL, uninstalled color calibration software, reset monitor to factory settings, booted into safe mood, nothing had an effect. Should I submit a bug report?
34
6
6.3k
Oct ’23
Allow app to access to USB accessory
Hi, I have an iOS app that interacts with a USB accessory. This works fine when running on an iPhone or iPad. However, when I compile the app in Xcode to run on my M1 Mac, the app won't see any USB devices. The target I use is "My Mac (designed for iPad)" which was the path of least resistance when compared to trying Catalyst. Is it possible to give my app access to USB accessories when running on my Mac? If so, what settings do I need to change? I've tried setting the "com.apple.security.device.usb" entitlement to true to no avail. Is the issue that the app is running in some sort of sandbox?
5
0
709
Oct ’23
How to retrieve Serial Number of USB Flash Drive connected with iPhone?
Hi Team, For our project requirement, we are developing iOS application inorder to retrieve Serial No. of USB flash drive programatically. Need your help in obtaining clarification on below query Query: i) We are accessing flash drive using "UIDocumentPickerViewController". Is there any class/method which can help us to get serial number of USB flash drive connected with iPhone13(Using lightening OTG adaptor)?
1
0
476
Oct ’23
1 minute Delay in External Accessory framework showBluetoothAccessoryPicker
I have to pair the classic Bluetooth device with my iOS application. For that, I have implemented showBluetoothAccessoryPicker with the External Accessory framework. EAAccessoryManager.shared().showBluetoothAccessoryPicker(withNameFilter: nil)), this is the code I have used for that. Added "Supported external accessory protocols" in .plist and enabled Wireless Accessory Configuration from capabilities. The actual issue is the picker displaying the device to pair with a 1-minute delay. What is the reason behind this reason and how can we resolve that?
1
0
832
Oct ’23
Assistance Needed for Data Recovery from HD External Drive
I am using a 2021 MacBook Pro 16" with an Apple M1 Max chip and 64 GB of RAM, running macOS Ventura 13.6. I have been using an external drive, the Seagate BarraCuda Compute 2TB Hard Drive. Last week, I used it about five times to save some photos and work on Excel files. However, when I tried to open it the following day, it prompted me for a password, but it failed to mount. The partition type is Apple_HFS, and it is encrypted because I used it with Time Machine a few years ago. I can hear the noise it typically makes when I was working on it, but it doesn't mount. So, I attempted to view it in Disk Utility, but to no avail. I can see the drive, but the partition I use appears gray, and the Mac attempts to mount it. When I try to click on it in Disk Utility, the application crashes, and I have to force quit it. I also tried purchasing a new external hard drive reader to use with my hard drive, but I encountered the same issue. I also tried to work with the Terminal, but it responds very slowly. For example, the 'diskutil list' command took approximately 5 minutes to generate a response, and when I attempted to eject it, it didn't work and remained stuck loading. I have the last six years of my life stored on this drive, so it would be incredible to recover the data. Do you have any suggestions?
1
0
342
Oct ’23
INCOMPATIBLE DISK error message upon launching Big Sur APFS vs MacOS Extended issue in Big Sur?
Running on: iMac 27" 5k late 2015 - 64gb ram and a 16tb Pegasus Promise2 R4 raid5 via Thunderbolt. After trying Big Sur - found issues with Luminar Photo app, decided to return to Catalina on the iMac. Reformatted my internal drive and reinstalled Catalina 15.5 and reformatted the raid. But I keep getting the following message upon restarting: "Incompatible Disk. This disk uses features that are not supported on this version of MacOS" and my Pegasus2 R4 portion no longer appears on the desktop or in Disk Utility... Looked into this and discovered that it may be an issue of Mac OS Extended vs APFS The iMac was formatted to APFS prior to installing OS11 so I reformatted to APFS when returning to Catalina. The issues persisted so I re-reformatted from a bootable USB - this time to Mac OS Extended (journaled) and the issues seems to be resolved. The iMac runs slower on MacOS Ext, but it is running and the Raid is recognised... I'd love to go back to APFS but am afraid it will "break" things. Any thought on this would be welcome. Thanks Nick
6
0
15k
Oct ’23
BLE MIDI auto connection/pairing
Hi there, We're developing a product which has a BLE module that advertises itself as a BLE MIDI device. The goal for our iOS app is to have the phone auto-connect to the device, which it already bonded with. Exactly like headphones; Bond one time, and everytime the headphones turn on, the phone automaticly pairs/connects to the headphones. At the moment, a new connection is required every time the the device turns on and advertises. I've read on the apple BLE documentation page, that from iOS 16 or later "the system automatically reconnects Bluetooth Low Energy (BLE) MIDI peripherals when powered on, if the device supports pairing. Previously, it was necessary to use Audio MIDI Setup to establish BLE MIDI connections." ( https://developer.apple.com/documentation/coremidi/midi_bluetooth/ ) However, neither our iPhones that run iOS 16+ or macOS 13+ devices re-connect to the BLE MIDI device. How can I achieve this? As per official BLE documentation, pairing is initiated by the central device (smartphone etc.) and the peripheral (BLE MIDI device) should simply store the MAC address + security information of the central device that it is currently bonded with.
0
0
584
Oct ’23
External Display Support in IOS App
Body: Hello, I am facing a challenging issue with my SwiftUI iOS application, which is designed to work on an iPad and connect to an external display. The app, called "EasyJoin," is intended to provide a single-touch interface for joining conference meetings. It pulls events from a calendar and provides a "Join" button to connect to the meeting. The Goal: Mirror the app on an external display in its native aspect ratio. Also mirror any other client applications launched from EasyJoin (such as Google Meet, Teams, WebEx, Zoom) to the external display in its native aspect ratio. The Issue: While I have been successful in displaying the app on the external display, the iPad screen goes black as soon as the external display is connected. I need both the iPad and the external display to show the app simultaneously, each in their native aspect ratios. What I've Tried: Created separate UIWindow objects for the internal and external displays. Used NotificationCenter to listen for UIScreen.didConnectNotification and UIScreen.didDisconnectNotification. Tried managing windows through both AppDelegate and SceneDelegate. Explicitly set windowLevel for both internal and external windows. Despite these efforts, the issue persists. The external display works as expected, but the iPad screen remains black. Here is a snippet of my SceneDelegate.swift: // ... (Code for setting up UIWindow and listening for screen connect/disconnect) @objc func screenDidConnect(notification: Notification) { // ... (Code for setting up external UIWindow) externalWindow?.isHidden = false } @objc func screenDidDisconnect(notification: Notification) { externalWindow?.isHidden = true externalWindow = nil } I would appreciate any guidance or suggestions to resolve this issue. Thank you! Feel free to copy and paste this into a new post on the Apple Developer Forums. Hopefully, you'll get some specialized assistance that can help resolve the issue.
4
0
1.1k
Sep ’23
Bluetooth Device Implementation
Hello all, I am interested in trying to develop a short-medium range (>100 meters) tracking device for a hobby project in order to gain some literacy in mobile phone software, and have a few questions. I am new to working with anything iOS so please correct me in any mistakes I make in this query. Is RFID or Bluetooth better for tracking and implementation on iOS? How difficult is device implementation into iOS and apps such as find my iPhone? How would one go about it? If I wanted a tracking device to send notifications based on location/distance from another device, could I do that with Apples framework or would I have to create my own app? What programming language would be used in this sort of endeavor? Would C++ work or does iOS use different ones? Thanks in advance, any and all advice is greatly appreciated.
1
0
536
Sep ’23
U2723QE, flickering as soon as DP OUT is connected on macOS
I know that multiple monitors are not working because macOS does not support MST/Daisy Chaining over DisplayPort. Though I have a Linux Laptop which supports it and I want to use it from time to time. Now the issue is, whenever I connect a second monitor into the Dell, the monitor starts to flicker. So whenever the DP OUT port is connected with my Dell, it becomes unusable with the Mac M2. This seems somewhat related to this issue on latest Ventura. Did anyone try to connect the DP OUT port with their Dell & Mac? What is the behavior? My understanding is that the 2. monitor should be mirrored. But what is happening right now is that the 1. monitor is basically becoming unusable as soon as a 2. one is connected.
0
0
337
Sep ’23
how can i make a ios bluetooth classic program? is this Mission Impossible?
i must make a code that ios app communicate with esp32 module over bluetooth classic . i have been searching for several weeks... but i didn't find out sample code for bluetooth classic. i found one code that use External Accessory Framework. but this needs a registration for that device some one says that i can't this. because ESP32 Module can't be registered . and i found another one it is coded by reactive native. but finally, this one use a MFi(Made For Iphone) that use External Accessory Framework. i guess.. is it impossilbe that making a ios app that communicate with other device over bluetooth classic ? so, now i am finding some apps that can communicate esp32 module that is coded by arduino IDE over bluetooth classic, and this arduino app can communicate with android bluetooth classic terminal app. please help me
9
0
2.0k
Sep ’23
Get List/Count of bluetooth connected devices to Ipad
I am working on a Application which requires to identify list of bluetooth paired devices connected to Ipad. I have used scanforperipherals(withServices:nil) in CoreBluetooth framework but I see state is always disconnected even though device is connected to iPad. output : <CBPeripheral: 0x281d000, identifier = 31EADDCE-5DBC-E57F-84DB-1488C20460F9, name = AirPods Pro, mtu = 0, state = disconnected> Later used Retrieveconnectedperipherals method (https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518924-retrieveconnectedperipherals ) and tried to fetch the Bluetooth connected devices list. But this method mandates to provide ServiceUUID list of the devices that needs to be fetched which doesn't help me as I need to fetch all devices list. I understand EAAccessoryManager framework gets the list of MFI devices but it mandates to provide protocol names of devices. let connectedDevices = EAAccessoryManager.shared().connectedAccessories as? [EAAccessory] Would like to know if there is any way to fetch the list/count of Bluetooth devices connected to iPad without providing UUIDs/Protocol names. Thanks in advance! Let me know if any other information is required.
0
0
482
Sep ’23
Problem that read-only of Directory service Media Management is canceled.
I have an issue where Directory service media read-only is disabled on macOS 11 and later. Media Management settings are below. file=mcxsetup.plist Operating procedure. (1) The login account is admin. (2) Place mcxsetup.plist in /Users/admin folder. (3) Execute the following in the terminal command. $ sudo dscl . -mcximport /Users/admin /Users/admin/mcxsetup.plist (4) Run the following command in the terminal and confirm that the value is set. $ dscl . -mcxexport /Users/admin (4) restart mac (5) login admin (6) Mount USB storage (7) Make sure the USB storage is set to Read Only. (8) admin logout (9) Login with account name=admin (10) USB storage becomes writable Question: (1) Have there been any specification changes since macOS 11? (2) Is it not possible to use it in local environment? (3) does anyone know a workaround? Configuration-Profile-Reference URL https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf
0
0
299
Sep ’23