External Accessory

RSS for tag

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

External Accessory Documentation

Posts under External Accessory tag

109 Posts
Sort by:
Post not yet marked as solved
1 Replies
265 Views
I can successfully connect and show ExternalView() on the external display on IOS target. However, mac catalyst is unable to detect the display connection in NotificationCenter. How do I use NotificationCenter in mac catalyst to detect and connect an external display? import Combine import SwiftUI @main struct ScreensApp: App {   @ObservedObject var externalDisplayContent = ExternalDisplayContent()   @State var additionalWindows: [UIWindow] = []   private var screenDidConnectPublisher: AnyPublisher<UIScreen, Never> {     NotificationCenter.default       .publisher(for: UIScreen.didConnectNotification)       .compactMap { $0.object as? UIScreen }       .receive(on: RunLoop.main)       .eraseToAnyPublisher()   }   private var screenDidDisconnectPublisher: AnyPublisher<UIScreen, Never> {     NotificationCenter.default       .publisher(for: UIScreen.didDisconnectNotification)       .compactMap { $0.object as? UIScreen }       .receive(on: RunLoop.main)       .eraseToAnyPublisher()   }   var body: some Scene {     WindowGroup {       ContentView()         .environmentObject(externalDisplayContent)         .onReceive(           screenDidConnectPublisher,           perform: screenDidConnect         )         .onReceive(           screenDidDisconnectPublisher,           perform: screenDidDisconnect         )     }   }   private func screenDidConnect(_ screen: UIScreen) {     print("connected")     let window = UIWindow(frame: screen.bounds)     window.windowScene = UIApplication.shared.connectedScenes       .first { ($0 as? UIWindowScene)?.screen == screen }       as? UIWindowScene     let view = ExternalView()       .environmentObject(externalDisplayContent)     let controller = UIHostingController(rootView: view)     window.rootViewController = controller     window.isHidden = false     additionalWindows.append(window)     externalDisplayContent.isShowingOnExternalDisplay = true   }   private func screenDidDisconnect(_ screen: UIScreen) {     print("disconnected")     additionalWindows.removeAll { $0.screen == screen }     externalDisplayContent.isShowingOnExternalDisplay = false   } }
Posted
by rakutek.
Last updated
.
Post not yet marked as solved
1 Replies
320 Views
For a while now there seem to be an issue with airplay/bluetooth. Im not really sure if it is an hardware or software issue. A simple uses case is when i airplay from my m1 mac mini, to an homepod mini. There are two main issues: Bluetooth lag, any action on the mac takes a very long second to take affect on the destination device, in this case the homepod. Connection lost, every now and then there is a drop in connection, although the mac seems to still stream, the receiver device is losing signals. After a look into the logs, few error keeps on show: blutoothd (as process) and the error is: setReportResponse: Unexpected entry on OSX AirPlayXPCHelper (as process) and the error is: metadataSender_sendAPProgressMetadata:720: got error -6727/0xFFFFE5B9 kNotFoundErr My question is then is there a way to fix these? i'm not hoping that the lag issue will be resolved entirely but my hope is these are software issues rather than hardware ones.
Posted Last updated
.
Post not yet marked as solved
0 Replies
259 Views
I am working on the ios swiftui app, and I need to communicate with an external embedded device using a USB cable and Bluetooth, I read some articles about MFI, and I figured out that I need to enroll in the MFI program. My questions: Am I need to apply the MFI and sign the NDA before starting the development and testing the communication? Is there any tutorial, demo app illustrating the process of using the EA framework using the app?
Posted Last updated
.
Post not yet marked as solved
8 Replies
5.9k Views
After updating to macOS Big Sur ver 11.0.1, Mac Book Pro MacBook Pro (Retina, 13', 2014) doesn´t recognize anymore two additional displays connected through i-Tec USB 3.0 Docking Station. Reinstalling driver Display-Link and i-Tec Driver hasn´t solved the problem.
Posted
by Gerd_H_P.
Last updated
.
Post not yet marked as solved
0 Replies
192 Views
Hello, I'm building iOS app to read/write files from MFI certified USB flash drive. Now the app can launch and detect the accessory with the correct protocol strings. From the External Accessory framework documentation, the data needs to read/write with the NSInputStream & NSOutStream interfaces. Would you give advices on how to parse the stream data? Am I doing it wrong? Or are there other easy methods to achieve this? Thanks!
Posted
by mwy001.
Last updated
.
Post not yet marked as solved
0 Replies
142 Views
Hello, I'm building iOS app to read/write files from MFI certified USB flash drive. Now the app can launch and detect the accessory with the correct protocol strings. From the External Accessory framework documentation, the data needs to read/write with the NSInputStream & NSOutStream interfaces. Would you give advices on how to parse the stream data? Am I doing it wrong? Or are there other easy methods to achieve this? Thanks!
Posted
by mwy001.
Last updated
.
Post not yet marked as solved
0 Replies
213 Views
Hello, guys, We are iOS app development team. If we have the authorization from a MFI licensed lightning cable accessory manufacturer and get the correct protocol strings from them, is it possible to trigger our app launch when the cable is connected to iPhone? Is it possible for our app to communicate with the device connected at the other side of the cable (e.g. USB flash drive). Thanks.
Posted
by mwy001.
Last updated
.
Post not yet marked as solved
0 Replies
206 Views
Some camera vendors support a FAT interface over a Lightning to camera/usb port. This would let an iOS app read files off the camera using a document browser (and it works just fine). The files are huge videos, and in some cases take over 50% of the record time to transfer over WiFi. One vendor unfortunately does not support this. They run PTP over their USB-C to Lightning cable, which means that Photos (or maybe Files, unsure now, I did verify it a while ago) on iOS can see and transfer the files. But my app is SOL - there is no apparent way to do this per Quinn. However - suppose the vendor would get certified with Apple as an ExternalAccessory - my app could then access the camera through some method they would support. This is going to be a tough sell, and just wondering what the minimal amount of technical work would be required on the vendors part to allow file retrieval.
Posted
by dhoerl.
Last updated
.
Post not yet marked as solved
0 Replies
206 Views
Since upgrade to Monterey I've facing bluetooth issues. Volume is not working correctly, it seems stuck. And now, every time I open my macbook I hear the fans at all power. Activity Monitor shows this. I've tried everything. Reset PRAM, Reset SMC, deleting .plist. Don't know more I can do. Only use bluetooth with speaker (Sony Hear Go)
Posted Last updated
.
Post not yet marked as solved
0 Replies
191 Views
My external ssd doesn't show up on the desktop. It is visible in disk utility but it has become unwritable. I can't repair, split or erase the disk' Does anyone have an advise for this issue?
Posted
by Lance-scs.
Last updated
.
Post not yet marked as solved
3 Replies
181 Views
Hey all - been racking my brain last few weeks with the same issue; macOS v12.1. Seems to apply to all drive types I have: thunderbolt-2 mechanical, usb-3 SSD and SD card. REALLY causing huge distractions for back-up etc. Wondering if @Apple would like to chip in on this and give us a steer? I see similar questions outside the dev forum too. Would be great to have some formal acknowledgement and feedback to other potential actions.
Posted Last updated
.
Post not yet marked as solved
1 Replies
778 Views
I’m trying to read the battery level of a connected Apple Watch on an iPhone app. The built-in iOS Batteries widget shows the current Apple Watch battery level, so I know the data is being sent from Apple Watch to iPhone frequently, however I could not find a public API to read the level in my iOS app. My best solution so far was to build an Apple Watch app that periodically sends the battery level of the Apple Watch to the iPhone using WatchConnectivity. Then, I found this app. It can show the battery level of my paired Apple Watch without ever installing an app on the Apple Watch. To try to accomplish this same thing, I have tried a few different approaches. First, I tried Core Bluetooth, but after a lot of exploring, troubleshooting, and asking at a Core Bluetooth lab, I’ve ruled that out since Apple Watch does not expose its battery information that way. I experimented with the External Accessory framework, but that doesn’t seem like the right approach either, since it's for MFi accessories and I couldn't find a way to get Apple Watch info with it. How is it possible to read the Apple Watch battery level in an iPhone app without sending it from a companion Apple Watch app? Or is the app I linked to probably using private APIs?
Posted Last updated
.
Post not yet marked as solved
1 Replies
858 Views
External usb foot pedal driver should not generate mouse click NSEvents In Monterey external usb foot pedal driver unexpectedly also acts as a mouse device and generates NSLeftMouseDown/NSRightMouseDown events. If I click the middle button of external usb foot pedal and then NSRightMouseDown gets received then it has to be a system problem (or a driver problem) How to solve this issue?
Posted Last updated
.
Post not yet marked as solved
1 Replies
356 Views
Hi, We have an app that broadcast UUIDs as beacons to the Suntech vehicle tracker device in the foreground and background. This app broadcast UUIDs to vehicle tracker devices when the app is in range of the device, and when the application is away from the device then it will send alerts to users. But this is working properly when the app is in the foreground. And when the user puts the application in the background then broadcasting stops and UUIDs format is also changed. So can you guide us, on how we can broadcast in the background for a long time and when the app is killed?
Posted Last updated
.
Post not yet marked as solved
4 Replies
7.5k Views
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
Posted Last updated
.
Post marked as solved
2 Replies
894 Views
I made up my own iAP2-BT-device, which is perfectly running by use the BT-list and the External Accessory Framework. Now, following the instruction for MFI developers, I would like to show the showBluetoothAccessoryPicker using the following swift code: EAAccessoryManager.shared().showBluetoothAccessoryPicker(withNameFilter: nil) { (error) in             if let error = error {                 switch error {                 case EABluetoothAccessoryPickerError.alreadyConnected:                     break                 default:                     break                 }             }         } Wherever I put this snipple in my app code the picker is never shown (device unpaired by "forget device") and I always get the console message: A constraint factory method was passed a nil layout anchor.  This is not allowed, and may cause confusing exceptions. Break on BOOL _NSLayoutConstraintToNilAnchor(void) to debug.  This will be logged only once.  This may break in the future. I have no idea what to do to get this picker shown ... Thanks for your help
Posted
by PrinzAkim.
Last updated
.
Post not yet marked as solved
1 Replies
183 Views
Hello, I have some issues with my new Logitech keyboard (MX Keys mini) and mouse (Anywhere MX3), both connected via bluetooth. Every time MacOS loads mouse and keyboard is not working, so I need to connect Magic keyboard to enter system. Is there any way to make it work? All drivers updated, permissions checked in security section in settings. Thanks in advance for your assist and answers.
Posted
by vashenko.
Last updated
.
Post not yet marked as solved
1 Replies
545 Views
The iMac runs perfectly when no external monitor is plugged, but as soon as the monitor is connected it crushes within an hour. Did anyone found any solution to this problem? It happened both with Catalina and after updating to BigSur Thank you in advance to anyone responding. Here is the error I get after restarting: panic(cpu 2 caller 0xffffff800b36ea25): userspace watchdog timeout: no successful checkins from com.apple.WindowServer in 120 seconds service: com.apple.logd, total successful checkins since load (763856 seconds ago): 76379, last successful checkin: 0 seconds ago service: com.apple.WindowServer, total successful checkins since load (763826 seconds ago): 76363, last successful checkin: 120 seconds ago service: com.apple.remoted, total successful checkins since load (763856 seconds ago): 76377, last successful checkin: 0 seconds ago Backtrace (CPU 2), Frame : Return Address 0xffffffb0969db670 : 0xffffff80080b9aed  0xffffffb0969db6c0 : 0xffffff80081fc6e3  0xffffffb0969db700 : 0xffffff80081ecd1a  0xffffffb0969db750 : 0xffffff800805ea2f  0xffffffb0969db770 : 0xffffff80080b938d  0xffffffb0969db890 : 0xffffff80080b9678  0xffffffb0969db900 : 0xffffff80088be434  0xffffffb0969db970 : 0xffffff800b36ea25  0xffffffb0969db980 : 0xffffff800b36e678  0xffffffb0969db9a0 : 0xffffff800884569e  0xffffffb0969db9f0 : 0xffffff800b36dab4  0xffffffb0969dbb20 : 0xffffff800884f86b  0xffffffb0969dbc80 : 0xffffff80081a7d81  0xffffffb0969dbd90 : 0xffffff80080bf0e7  0xffffffb0969dbe00 : 0xffffff8008095905  0xffffffb0969dbe60 : 0xffffff80080ad012  0xffffffb0969dbef0 : 0xffffff80081d0ec3  0xffffffb0969dbfa0 : 0xffffff800805f216        Kernel Extensions in backtrace:          com.apple.driver.watchdog(1.0)[7AE04EA4-D026-39A0-B2D5-5C9E4EE72967]@0xffffff800b36d000->0xffffff800b36efff Process name corresponding to current thread: watchdogd Boot args: chunklist-security-epoch=0 -chunklist-no-rev2-dev Mac OS version: 20C69 Kernel version: Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASEX8664 Kernel UUID: 82E2050C-5936-3D24-AD3B-EC4EC5C09E11 KernelCache slide: 0x0000000007e00000 KernelCache base:  0xffffff8008000000 Kernel slide:      0x0000000007e10000 Kernel text base:  0xffffff8008010000 _HIB  text base: 0xffffff8007f00000 System model name: iMac20,1 (Mac-CFF7D910A743CAAF) System shutdown begun: NO Hibernation exit count: 0 System uptime in nanoseconds: 763861744423305 Last Sleep:           absolute           basetsc          basenano   Uptime  : 0x0002b6ba6bef13d4   Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000   Wake    : 0x0000000000000000 0x0000001b5478f86e 0x0000000000000000 last started kext at 754770714032314: >AudioAUUC 1.70 (addr 0xffffff7fa8583000, size 12288) last stopped kext at 763795517110493: >usb.!UHostPacketFilter 1.0 (addr 0xffffff800ae5b000, size 8192) loaded kexts: org.virtualbox.kext.VBoxNetAdp 6.1.16 org.virtualbox.kext.VBoxNetFlt 6.1.16 org.virtualbox.kext.VBoxUSB 6.1.16 org.virtualbox.kext.VBoxDrv 6.1.16 AudioAUUC 1.70 @filesystems.smbfs 3.4.1 !ATopCaseHIDEventDriver 4020.6 !APlatformEnabler 2.7.0d0 AGPM 119 X86PlatformShim 1.0.0 @filesystems.autofs 3.0 @fileutil 20.036.15 !AHIDALSService 1 !AUpstreamUserClient 3.6.8 @kext.AMDRadeonX6000 4.0.2 @kext.AMDRadeonServiceManager 4.0.2 !AGraphicsDevicePolicy 6.2.2 @AGDCPluginDisplayMetrics 6.2.2 pmtelemetry 1 LuaHardwareAccess 1.0.16 |IOUserEthernet 1.0.1 !A!IKBLGraphics 16.0.1 |IO!BSerialManager 8.0.2f9 @DontStealMacOS_X 7.0.0 !AHV 1 !ADiskImages2 1 !A!ICFLGraphicsFramebuffer 16.0.1 !AThunderboltIP 4.0.3 !ABridgeAudio!C 100.2 !A!ISlowAdaptiveClocking 4.0.0 !AMCCSControl 1.14 !A!IPCHPMC 2.0.1 !AGFXHDA 100.1.431 BridgeAudioCommunication 100.2 !AAVEBridge 6.1 !UCardReader 511.60.2 BCMWLANFirmware4378.Hashstore 1 BCMWLANFirmware4377.Hashstore 1 BCMWLANFirmware4364.Hashstore 1 BCMWLANFirmware4355.Hashstore 1 @filesystems.tmpfs 1 |!ABCM5701Ethernet 11.0.0 !ABCMWLANBusInterfacePCIeMac 1 @filesystems.hfs.kext 556.60.1 @BootCache 40 @!AFSCompression.!AFSCompressionTypeZlib 1.0.0 @!AFSCompression.!AFSCompressionTypeDataless 1.0.0d1 @filesystems.apfs 1677.60.23 @private.KextAudit 1.0 !AACPIButtons 6.1 !ASMBIOS 2.1 !AACPIEC 6.1 !AAPIC 1.7 @!ASystemPolicy 2.0.0 @nke.applicationfirewall 310 |IOKitRegistryCompatibility 1 |EndpointSecurity 1 !AHIDKeyboard 222 |IOUSBUserClient 900.4.2 !AMultitouchDriver 4400.28 !AInputDeviceSupport 4400.35 !AHS!BDriver 4020.6 IO!BHIDDriver 8.0.2f9 @kext.triggers 1.0 @kext.AMDRadeonX6200HWLibs 1.0 @kext.AMDRadeonX6000Framebuffer 4.0.2 @kext.AMDSupport 4.0.2 @kext.AMDRadeonX6000HWServices 4.0.2 |IOAVB!F 900.12 |IOAccelerator!F2 439.52 |IO!BHost!CUARTTransport 8.0.2f9 |IO!BHost!CTransport 8.0.2f9 X86PlatformPlugin 1.0.0 @!AGPUWrangler 6.2.2 |IOSlowAdaptiveClocking!F 1.0.0 !ASMBus!C 1.0.18d1 IOPlatformPlugin!F 6.0.0d8 |IONDRVSupport 585 |IOAudio!F 300.6.1 @vecLib.kext 1.2.0 !ASMBusPCI 1.0.14d1 !AGraphicsControl 6.2.2 @!AGraphicsDeviceControl 6.2.2 |IOGraphics!F 585 !A!ILpssUARTv1 3.0.60 !A!ILpssUARTCommon 3.0.60 !AOnboardSerial 1.0 @plugin.IOgPTPPlugin 900.11 |IOEthernetAVB!C 1.1.0 usb.cdc.ncm 5.0.0 usb.cdc 5.0.0 usb.networking 5.0.0 usb.!UHostCompositeDevice 1.2 !AHPM 3.4.4 !A!ILpssI2C!C 3.0.60 !A!ILpssI2C 3.0.60 !A!ILpssDmac 3.0.60 !AThunderboltPCIDownAdapter 4.1.1 !AThunderboltDPInAdapter 8.1.4 !AThunderboltDPAdapter!F 8.1.4 !AThunderboltNHI 7.2.8 |IOThunderbolt!F 9.3.2 !ABSDKextStarter 3 !ABCMWLANCoreMac 1.0.0 |IOSerial!F 11 |IO80211!FV2 1200.12.2b1 IOImageLoader 1.0.0 corecapture 1.0.4 |IOSurface 289.3 |IOSkywalk!F 1 mDNSOffloadUserClient 1.0.1b8 @filesystems.hfs.encodings.kext 1 usb.!UVHCIBCE 1.2 usb.!UVHCICommonBCE 1.0 usb.!UVHCI 1.2 usb.!UVHCICommon 1.0 !AEffaceableNOR 1.0 |IOUSB!F 900.4.2 |IOBufferCopy!C 1.1.0 |IOBufferCopyEngine!F 1 |IONVMe!F 2.1.0 usb.!UXHCIPCI 1.2 usb.!UXHCI 1.2 !AEFINVRAM 2.1 !AEFIRuntime 2.1 !ASMCRTC 1.0 |IOSMBus!F 1.1 |IOHID!F 2.0.0 $!AImage4 3.0.0 |IOTimeSync!F 900.11 |IONetworking!F 3.4 DiskImages 493.0.0 |IO!B!F 8.0.2f9 |IOReport!F 47 |IO!BPacketLogger 8.0.2f9 $quarantine 4 $sandbox 300.0 @kext.!AMatch 1.0.0d1 |CoreAnalytics!F 1 !ASSE 1.0 !AKeyStore 2 !UTDM 511.60.2 |IOUSBMass!SDriver 184.40.6 |IOSCSIBlockCommandsDevice 436.40.6 |IO!S!F 2.1 |IOSCSIArchitectureModel!F 436.40.6 !AMobileFileIntegrity 1.0.5 @kext.CoreTrust 1 !AFDEKeyStore 28.30 !AEffaceable!S 1.0 !ACredentialManager 1.0 KernelRelayHost 1 |IOUSBHost!F 1.2 !UHostMergeProperties 1.2 usb.!UCommon 1.0 !ABusPower!C 1.0 !ASEPManager 1.0.1 IOSlaveProcessor 1 !AACPIPlatform 6.1 !ASMC 3.1.9 |IOPCI!F 2.9 |IOACPI!F 1.4 watchdog 1 @kec.pthread 1 @kec.corecrypto 11.1 @kec.Libm 1
Posted Last updated
.