On iOS 18.x when try to create EASession we get nil, but on iOS 17.x everything works.
We have app which use USB cable for connecting external accessories.
Scenario is when we have fresh instal, connecting with accessory work fine, EASession is created, streams are opened.
When we unplug USB, we close streams, remove any reference to session and accessory, remove accessory delegate.
When plug it again, creating EASession is returning nil. Only after restarting iPhone, we can create new EASession with appropriate protocol and accessory. Every next attempt without reseting iPhone is failing.
Logs from accessory is following:
00:05:51.811000 : onUSBDeviceFound(pDevice=0xffc818)) iPhone USB device already in the device list w/id=1 -> update status now[21;1H
00:05:51.830000 : setConnectionStatus(status=connected) [devId=1] state updated -> forward[21;1H
Capabilities indicate HostMode possibility => role switch is triggered
00:05:52.848000 : updateDIPODeviceConnections() iPhoneUSB w/caps=5 (=CarPlay or HostMode), deviceTag=2 in Device mode -> request role switch[21;1H
Role switch seems to be successful
00:05:54.914000 : setSwitching('stable') changed[21;1H
00:05:54.915000 : updateDIPODeviceConnections() iPhoneUSB w/caps=2, id=1, deviceTag=2 and native transport -> request app launch and call connectUSB[21;1H
00:05:54.967000 : ConnectiAP2(05ac:12a8, s/n='00008101000160921E90801E', writeFD='/dev/ffs/ep3', readFD='/dev/ffs/ep4', hostMode){3}[21;1H
Native transport should become available but does not (the following line is not present for failed case. Taken from successful case)
00:05:24.983000 : OnDBusPropChanged_NativeTransport(): deviceId=2, started=1, iAP2iOSAppIdentifier=1, sinkEndpoint=3, sourceEndpoint=4, TransactionID=1
EAP Start event not received (trace line from success try)
00:05:25.057000 : EAPSessionStart(ctx=0x74e0b800){2} called[21;1H
Is there any braking change on iOS 18 considering EASession?
Also what is strange is that it works on fresh instal/restart iPhone, but not working on second attempt?
Hardware
RSS for tagDelve into the physical components of Apple devices, including processors, memory, storage, and their interaction with the software.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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!
Dear Sir,
I have some questions of IC firmware development of Find My.
Any rule request that item must include dual bank feature in IC?
I am using Nordic SDK_Connect SDK, Apple has own SDK? If yes, can I download it to use?
In Find-My, Apple has service UUID in bluetooth IC?
Thank you.
Best regards,
Sam Ng
I am developing the electronic part of product, it includes a Find-My features. I saw some forum that testing Find-My feature needs a CSR and testing token. Can anyone teach me how to apply CSR and testing token step by step?
Thank you very much.
Best regards
Sam Ng
We are integrating the Microsoft Web Chat Control inside a WKWebView in our iOS application. The microphone button (used for speech input) works as expected when the app is active. However, we are facing an issue when the app is sent to the background and then brought back to the foreground.
Issue Details:
When the app returns from background to foreground:
🔹 The mic button becomes unresponsive (taps are not recognized).
🔹 No permission prompt or speech functionality is triggered.
🔹 Other elements of the Web Chat control continue to work fine.
This issue seems isolated to iOS and WKWebView usage.
We have verified that microphone permissions are granted and there are no system-level blocks.
Environment:
Platform: iOS
Web Container: WKWebView
Microsoft Web Chat Version: Devanshu Kinariwala add version here
iOS Version: iOS 18.3.1
Devices: iPhone 13, iPhone 14 Pro
error in browser console
[Error] A MediaStreamTrack ended due to a capture failure (x3)
[Error] WebSocket connection to 'wss://directline.botframework.com/v3/directline/conversations/JQ1k0phVogeJ30ZQddBvAQ-in/stream?watermark=-&t=eyJhbGciOiJSUzI1NiIsImtpZCI6ImlmOEs0aFg4R1hXVnZkS3pwdFRFWFJveURTUSIsIng1dCI6ImlmOEs0aFg4R1hXVnZkS3pwdFRFWFJveURTUSIsInR5cCI6IkpXVCJ9.eyJib3QiOiJhaWFhcy1xYS1jb252YWktYm90Iiwic2l0ZSI6InRWcW14cDBQZU9vIiwiY29udiI6IkpRMWswcGhWb2dlSjMwWlFkZEJ2QVEtaW4iLCJuYmYiOjE3NDI5NzE1MTgsImV4cCI6MTc0Mjk3MTU3OCwiaXNzIjoiaHR0cHM6Ly9kaXJlY3RsaW5lLmJvdGZyYW1ld29yay5jb20vIiwiYXVkIjoiaHR0cHM6Ly9kaXJlY3RsaW5lLmJvdGZyYW1ld29yay5jb20vIn0.Mx3MMVP3t9Ex36UW-YARskZLny0iORxc6-B0ewvNp0S-ivUjvOS43kZc0J5HoOgYRkoGaKemo00_JSkzryAbKKoSwqMjahf0VotqTZsJjoIgtyNJFfAYyGVriBHMV_6FfH_YEezDMD5puY6R89eM-atQOw-CfoClwrxn8jgVL5Kn19WdDZvmQwFIArklA7as8bboKcWv4PveEKptM9xCokttaGzv-S5pdbNETMoJzIhLcJDHmEVJ6oJ0TFs5XS7RGMSQlM_gs95TySzVjVL7XV6qEOt_A10lRzmx0PxPIUw_nqllEIbWFy5H7AfsxbKRtM1nLe4lRm1KS7_xw9dSlw' failed: The operation couldn’t be completed. Software caused connection abort
[Error] WebSocket connection to 'wss://eastus2.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US&format=detailed&Ocp-Apim-Subscription-Key=4JuKqIMwLMhgAxfORVDEYfiuTL6Hrbnj3isAeGfs7aks4AOltun6JQQJ99AKACHYHv6XJ3w3AAAYACOGJFYj&X-ConnectionId=A93B097C62F14C55B30A851798609F73' failed: The operation couldn’t be completed. Software caused connection abort
[Error] WebSocket connection to 'wss://eastus2.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US&format=detailed&Ocp-Apim-Subscription-Key=4JuKqIMwLMhgAxfORVDEYfiuTL6Hrbnj3isAeGfs7aks4AOltun6JQQJ99AKACHYHv6XJ3w3AAAYACOGJFYj&X-ConnectionId=E99DF3A6CE734E0294A5FB5296D725CC' failed: The operation couldn’t be completed. Software caused connection abort
[Error] WebSocket connection to 'wss://eastus2.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US&format=detailed&Ocp-Apim-Subscription-Key=4JuKqIMwLMhgAxfORVDEYfiuTL6Hrbnj3isAeGfs7aks4AOltun6JQQJ99AKACHYHv6XJ3w3AAAYACOGJFYj&X-ConnectionId=8B3370005E7A4946BEA174E804F64FF7' failed: The operation couldn’t be completed. Software caused connection abort
Swift: // Method to check microphone permission
func checkMicrophonePermission(completion: @escaping (Bool) -> Void) {
let authorizationStatus = AVCaptureDevice.authorizationStatus(for: .audio)
switch authorizationStatus {
case .authorized:
// Permission granted
completion(true)
case .notDetermined:
// Request permission
AVCaptureDevice.requestAccess(for: .audio) { granted in
DispatchQueue.main.async {
completion(granted)
}
}
case .denied, .restricted:
// Permission denied or restricted
completion(false)
@unknown default:
// Handle future cases
completion(false)
}
}
Topic:
App & System Services
SubTopic:
Hardware
I'm device manufacturer and in future planning to get my device matter certified.
If I want my device data for analytics purpose into my cloud than what is the best way possible.
My research says that the most latest approach suggested by apple is,
developing a custom mobile app using device homekit sdk and subscribe to device state and send it to my cloud.
If I go that route, will it work even though the device was onboarded via homekit app and homekit hub device is also there.
I want to make sure that both path will be active, device to hub to home app and device to custom app to my cloud, and both on matter ecosystem.
The homekit sdk and matter support mentioned here https://developer.apple.com/apple-home/matter, are these two same thing?
I am using NFC when the phone is near the NFC reader times below the error:
2024-07-15 15:43:03.608427+0800 TestNFC[16022:1038141] [xpc.exceptions] <NSXPCConnection: 0x282ba90e0> connection to service with pid 58 named com.apple.nfcd.service.corenfc: Exception caught during decoding of received selector didDetectExternalReaderWithNotification:, dropping incoming message.
Exception: Exception while decoding argument 0 (#2 of invocation):
Exception: decodeObjectForKey: class "NFFieldNotification" not loaded or does not exist
my code:
#import <CoreNFC/CoreNFC.h>
@interface ViewController ()<NFCTagReaderSessionDelegate>
@property (strong, nonatomic) NFCTagReaderSession *session;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor whiteColor];
if (@available(iOS 13.0, *)) {
// 初始化 NFC 设置代理 NFCTagReaderSessionDelegate
if (NFCNDEFReaderSession.readingAvailable)
{
self.session = [[NFCTagReaderSession alloc]
initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil];
// NFC 显示提示信息
self.session.alertMessage = @"准备扫描,请将卡片贴近手机";
// 开启 NFC
[self.session beginSession];
}
} else {
}
}
#pragma mark - NFCNDEFReaderSessionDelegate
//读取失败回调-读取成功后还是会回调这个方法
- (void)tagReaderSessionDidBecomeActive:(NFCTagReaderSession *)session API_AVAILABLE(ios(13.0)){
NSLog(@"tagReaderSessionDidBecomeActive");
}
- (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:(NSError *)error API_AVAILABLE(ios(13.0)){
NSLog(@"readerSession:didInvalidateWithError: (%@)", [error localizedDescription]);
}
- (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<__kindof id<NFCTag>> *)tags API_AVAILABLE(ios(13.0)){
}
We are currently managing our iPhones and iPads using Microsoft Intune and I wanted to get your feedback on other Enterprise management software that gives the admin the ability to manage more granular functions.
Topic:
App & System Services
SubTopic:
Hardware
Hi there,
I am using Core NFC and I established the connection with the card, but after sending the command 'tag.sendCommand()' I receive this message:
-[NFCTagReaderSession _connectTag:error:]:748 Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}.
The version of XCode I am using is 16.3, and the iPhone version is iOS 18.4
Here is my entitlements file:
com.apple.developer.nfc.readersession.formats
NDEF
TAG
And my info.plist:
NFCReaderUsageDescription
NFC
com.apple.developer.nfc.readersession.iso7816.select-identifiers
A000112233445566
Signing & Capabilities has added Near Field Communication Tag Reading.
Hi,
i'm unable to select a icc profile on the new macbook Pro M4.
How can i calibrate the internal screen by adding an icc profil made with my X-Rite color calibrator.
icc files cannot be selected (grey) from the import menu of the monitor preferences.
After hardware and mobile phone hid mode pairing, the first connection is successful, after a while disconnect and reconnect,APP monitoring Bluetooth error NSLocalizedDescription = "Peer removed pairing information"; Failed to connect
Hardware engineers detect the pairing information and find that the local pairing information of the iPhone has changed, which is a non-mandatory phenomenon
Hi,
We’re developing a BLE peripheral device and encountered a connection issue when connecting two devices (Device A and Device B) simultaneously to an iOS device.
Problem:
On iOS 18, we are experiencing occasional BLE timeouts and disconnections when both devices are connected at the same time.
On iOS 16, we did not encounter this issue under the same conditions.
What we’ve tried:
Adjusted the connection interval from 30ms to 15ms.
This seems to have improved stability somewhat.
However, we still observe intermittent timeout/disconnection issues.
Questions:
Are there any known changes in BLE connection handling or timing constraints in iOS 18?
Are there recommended connection parameter settings (interval, latency, timeout, etc.) for multi-device BLE connections in iOS?
Is there a way to debug or log more details about the disconnection reasons on the iOS side?
Any guidance or suggestions would be greatly appreciated.
While compiling nRF5340 target of Dockkit ADK 1.0 following the guide of README.md, I selected the latest Nordic SDK, because there is no specified SDK version in the README.md.
But it seems that ADK and SDK are not compatible with each others.
For example, it calls nrfx_gpiote_channel_alloc() with one argument in PAL\NCS\HAPPlatformExperience.c. But the difinition of this function needs two arguments.
Also I found that in some older version of Nordic SDK, this function needs only one argument.
So could you please make sure which version of Nordic SDK should developer use?
I have a question about Apple certification.
We are planning card reader via HID(human interface device) for iPad that support USB-C.
iPad will receive data as HID protocol.
In this case do I have to get certificate(for example MFi) like Apple USB accessory?
Topic:
App & System Services
SubTopic:
Hardware
Hello,
What is the best and Apple recommended way to get display name and its vendor information?
The CoreGraphics framework provides ModelNumber and VendorNumber only.
Looks like IOKit does not provide any documented way at all.
Are there any daemon safe way to get such information?
Thank you in advance,
Pavel
Hi, as other threads have already discussed, I'd like to record audio from a keyboard extension.
The keyboard has been granted both full access and microphone access. Nonetheless whenever I attempt to start a recording from my keyboard, it fails to start with the following error:
Recording failed to start: Error Domain=com.apple.coreaudio.avfaudio Code=561145187 "(null)" UserInfo={failed call=err = PerformCommand(*ioNode, kAUStartIO, NULL, 0)}
This is the code I am using:
import Foundation
import AVFoundation
protocol AudioRecordingServiceDelegate: AnyObject {
func audioRecordingDidStart()
func audioRecordingDidStop(withAudioData: Data?)
func audioRecordingPermissionDenied()
}
class AudioRecordingService {
weak var delegate: AudioRecordingServiceDelegate?
private var audioEngine: AVAudioEngine?
private var audioSession: AVAudioSession?
private var isRecording = false
private var audioData = Data()
private let targetFormat = AVAudioFormat(commonFormat: .pcmFormatInt16,
sampleRate: 16000,
channels: 1,
interleaved: false)!
private func setupAudioSession() throws {
let session = AVAudioSession.sharedInstance()
try session.setCategory(.playAndRecord, mode: .spokenAudio,
options: [.mixWithOthers, .allowBluetooth, .defaultToSpeaker])
try session.setPreferredIOBufferDuration(0.005)
try session.setActive(true, options: .notifyOthersOnDeactivation)
audioSession = session
}
func checkMicrophonePermission(completion: @escaping (Bool) -> Void) {
switch AVAudioApplication.shared.recordPermission {
case .granted:
completion(true)
case .denied:
delegate?.audioRecordingPermissionDenied()
completion(false)
case .undetermined:
AVAudioApplication.requestRecordPermission { [weak self] granted in
if !granted {
self?.delegate?.audioRecordingPermissionDenied()
}
completion(granted)
}
@unknown default:
delegate?.audioRecordingPermissionDenied()
completion(false)
}
}
func toggleRecording() {
if isRecording {
stopRecording()
} else {
checkMicrophonePermission { [weak self] granted in
if granted {
self?.startRecording()
}
}
}
}
private func startRecording() {
guard !isRecording else { return }
do {
try setupAudioSession()
audioEngine = AVAudioEngine()
guard let engine = audioEngine else { return }
let inputNode = engine.inputNode
let inputFormat = inputNode.inputFormat(forBus: 0)
audioData.removeAll()
guard let converter = AVAudioConverter(from: inputFormat, to: targetFormat) else {
print("Failed to create audio converter")
return
}
inputNode.installTap(onBus: 0, bufferSize: 1024, format: inputFormat) { [weak self] buffer, _ in
guard let self = self else { return }
let frameCount = AVAudioFrameCount(Double(buffer.frameLength) * 16000.0 / buffer.format.sampleRate)
guard let outputBuffer = AVAudioPCMBuffer(pcmFormat: self.targetFormat,
frameCapacity: frameCount) else { return }
outputBuffer.frameLength = frameCount
var error: NSError?
converter.convert(to: outputBuffer, error: &error) { _, outStatus in
outStatus.pointee = .haveData
return buffer
}
if error == nil, let channelData = outputBuffer.int16ChannelData {
let dataLength = Int(outputBuffer.frameLength) * 2
let data = Data(bytes: channelData.pointee, count: dataLength)
self.audioData.append(data)
}
}
engine.prepare()
try engine.start()
isRecording = true
delegate?.audioRecordingDidStart()
} catch {
print("Recording failed to start: \(error)")
stopRecording()
}
}
private func stopRecording() {
audioEngine?.inputNode.removeTap(onBus: 0)
audioEngine?.stop()
isRecording = false
let finalData = audioData
audioData.removeAll()
delegate?.audioRecordingDidStop(withAudioData: finalData)
try? audioSession?.setActive(false, options: .notifyOthersOnDeactivation)
}
deinit {
if isRecording {
stopRecording()
}
}
}
Granting the deprecated "Inter-App Audio" capability did not solve the problem either.
Is recording audio from a keyboard extension even possible in general? If so, how do I fix it?
Related threads:
https://developer.apple.com/forums/thread/108055
https://developer.apple.com/forums/thread/742601
I'm developing an iPad app and encountered a strange issue with external Bluetooth keyboards.
Issue:
I have a Bluetooth keyboard set to JIS layout in Settings > General > Keyboard > Hardware Keyboard > Keyboard Type.
If I connect the keyboard before launching the app, everything works fine, and the input follows the JIS layout.
However, if I launch the app first and then turn on the Bluetooth keyboard, the input behaves as if the keyboard is in ANSI layout, even though the settings still show JIS.
It seems like iPadOS defaults to ANSI if no external keyboard is connected when the app starts, and later connections do not update the layout properly.
Has anyone encountered a similar issue, and is there a programmatic way to ensure that the correct keyboard layout is applied after the keyboard is connected?
Any help or insights would be greatly appreciated!
Topic:
App & System Services
SubTopic:
Hardware
Today, I submitted the following proposal to Apple through the Feedback Assistant app. I'm not confident in how I phrased it—I'd appreciate any thoughts or feedback from fellow developers.
Proposal: "Apple Silicon.app" for macOS with Apple Silicon – Enhancing Performance and Swap Memory Control
This suggestion has been machine translated into English, so there may be some discrepancies.
If you need the actual text, please feel free to reply to this or ask at the email address below.
<mail address>
If the author of this proposal is to be credited, I would appreciate being listed under the nickname “DiamondGotCat,” where possible.
Summary:
- Currently, Apple Silicon-equipped Macs have many system-level features locked down or restricted.
- This proposal suggests a new application that enables certain advanced controls for power users.
- Tentatively named "Apple Silicon.app", the name may be subject to change if a more suitable alternative arises.
- I propose this application be added as a pre-installed utility on compatible systems:
macOS (M-series), iPadOS (A-series and M-series), and iOS (iPhones with Apple-designed A5 and newer chips, provided the latest OS is available for them).
Overview:
This proposal introduces "Apple Silicon.app", a new system-level utility designed to offer power users greater flexibility and control over Apple Silicon behavior, as part of a broader feature update for Apple devices.
I propose that Apple Silicon.app be automatically installed as a pre-installed application on Apple Silicon devices (Mac, iPad, iPhone, and select Vision devices) that support upcoming major system updates.
Suggested Features of Apple Silicon.app:
1. Performance Core Control
To describe this functionality, the following terminology will be used:
- P-cores: Performance cores
- E-cores: Efficiency cores
I understand that Apple Silicon emphasizes energy efficiency, but I believe there are users—myself included—who prioritize maximum performance regardless of power usage. Therefore, I propose that the app offer a drop-down menu with the following six modes for performance core usage:
A. Automatic (Recommended) – Default macOS behavior; automatically switches between P/E cores based on workload.
B. Performance Priority – Prioritizes P-cores for high-demand tasks, restricts E-cores. Ideal for developers, video editors.
C. Power Saving – Uses E-cores only whenever possible; limits P-core usage. Great for battery saving.
D. P-Core Exclusive Mode – User-defined processes always run on P-cores. Suitable for benchmarks or low-latency tasks.
E. E-Core Exclusive Mode – Prioritizes background tasks and thermal efficiency.
F. Manual Assignment (Advanced) – Users can manually assign P/E cores per application in a dedicated settings screen.
Additionally, I propose the following optional checkbox settings:
- Thermal Safety Mode: Automatically switches from P- to E-cores when system heat exceeds a threshold.
- Restore Core Settings on Wake: Remembers P/E settings after sleep/wake.
- Power Source Adaptive Mode: Switches to power-saving on battery, and performance mode when plugged in.
2. Swap Memory Configuration
The app should also enable user-level control over swap memory (i.e., using part of the SSD as virtual memory).
Currently, macOS manages swap space automatically with no user customization available. I propose the ability to manually configure the swap system with the following options:
- Enable Manual Configuration: Checkbox to switch from automatic to manual control.
- Swap Size: Adjustable in GB units, allowing users to allocate desired swap capacity.
3. Other Settings
At this point, these are the core features I propose. If additional useful features exist that align with this concept, I welcome further suggestions or expansion.
As users—at least speaking for myself—we look forward to such customization options becoming available.
My iPhone 16 pro max when on the magnetic charger at home or in my car. My phone just powers down and reboots on its own. This has happened several times a day since updating to iOS 18.4. Anyone else having this problem ?
Topic:
App & System Services
SubTopic:
Hardware
你好,有个问题想请教一下:
我们的app是一款与CGM实时血糖相关的app,app支持在后台通过蓝牙跟CGM血糖设备保持连接。
现在遇到一个问题:
首先,app在后台运行期间,蓝牙是开启状态的,跟CGM设备也是连接的状态。
某个时刻,监听到蓝牙的状态突然从 poweredOn 变为了 resetting ,然后蓝牙又恢复了,状态变为了 poweredOn
这时候,问题出现了:之前连接的那个CGM血糖设备一直无法扫描到了!!
我想问一下:
什么情况下,蓝牙状态会变为resetting
蓝牙状态恢复为poweredOn后,之前连接的那个CGM血糖设备一直无法扫描到了,为什么?我要怎么做才能恢复,重新扫描到之前连接的这个设备?