Developer Forums

RSS for tag

Ask questions about how to use the Apple Developer Forums. Discuss forums bugs and enhancements requests that you’ve filed via Feedback Assistant.

Post

Replies

Boosts

Views

Activity

Missing calls to L2CAP Stream Delegate
I have a C++/Objective-C command line application, running on MacOs (15.1.1 (24B91)), that communicates with a Bluetooth LE peripheral. The application is build with Apple clang 16.0.0 and CMake as build system using Boost.Asio. I'm able to establish a L2CAP channel and after the channel is established, the peripheral sends a first (quite small) SDU on that channel to the application. The PSM is 0x80 and was chosen by the peripherals BLE stack. The application receives the PSM via GATT notification. I can see the SDU being send in a single LL PDU with Wireshark. I can also see the SDU being received in Apples PacketLogger. But I miss the corresponding call to a stream event handler. For all other GATT related events, the corresponding delegates / callbacks are called. The code that creates a dispatch queue and passes it to the CBCentralManager looks like this: dispatch_queue = dispatch_queue_create("de.torrox.ble_event_queue", NULL); manager = [[CBCentralManager alloc] initWithDelegate:self queue:dispatch_queue options:nil]; When the L2CAP channel is established, the didOpenL2CAPChannel callback gets called from a thread within the dispatch_queue (has been verified with lldb): - (void)peripheral:(CBPeripheral *)peripheral didOpenL2CAPChannel:(CBL2CAPChannel *)channel error:(NSError *)error { [channel inputStream].delegate = self; [channel outputStream].delegate = self; [[channel inputStream] scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [[channel outputStream] scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [[channel inputStream] open]; [[channel outputStream] open]; ... // a reference to the channel is stored in the outside channel object [channel retain]; ... } Yet, not a single stream event is generated: - (void)stream:(NSStream *)stream handleEvent:(NSStreamEvent)event_code { Log( @"stream:handleEvent %@, %lu", stream, event_code ); ... } When I add a functionality, to poll the input stream, the stream will report the expected L2CAP input. But no event is generated. The main thread of execution is usually blocking on a boost::asio::io_context::run() call. The design is, to have the stream callback stream:handleEvent to post call back invocations on that io_context, and thus to wake up the main thread and get that callbacks being invoked on the main thread. All asynchronous GATT delegate calls are working as expected. The only missing events, are the events from the L2CAP streams. The same code worked in an older project on an older version of MacOs and an older version of Boost. How can I find out, why the stream delegates are not called?
0
0
38
1d
Scan feature on Iphone 16 or ios18.2
I use the scan feature notes frequently. Steps were: open app click paperclick click scan documents scan save then I share to my email. click mail icon on then I would normally be given a size to choose from small, medium or large it would ask about the subject which I always let blank. With my new phone/updated ios I am given an option to to mail drop or attach document. I have done both and my document size is large. I need to minimize to 25% to fit on computer screen. I spoke to apple support. How do I fix this?
1
0
56
1d
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.
0
0
63
3d
Issue with UWB ranging on DWM3001CDK using NINearbyAccessoryConfiguration in Background mode
Hi, I’m trying to perform UWB ranging between an iPhone and a Qorvo DWM3001CDK accessory using Apple NI’s NINearbyAccessoryConfiguration class. I’ve followed the steps described in the official Apple documentation (https://developer.apple.com/documentation/nearbyinteraction/ninearbyaccessoryconfiguration), specifically for enabling background mode using the init(accessoryData:bluetoothPeerIdentifier:) initializer. The configuration is successfully created, and background mode is enabled. However, when the iPhone starts the session, I doesn’t receive any ranging data from the DWM3001CDK, and the session ends with a timeout. Interestingly, if I use the init(data:) initializer, I can successfully receive ranging data, but this only works in foreground mode, which doesn’t meet my requirements. Steps I’ve followed: Used Core Bluetooth to discover and pair the accessory. Retrieved the configuration data from the accessory according to the third-party UWB device specifications. Initialized the configuration using NINearbyAccessoryConfiguration(accessoryData:bluetoothPeerIdentifier:) for background mode. Started the session with NISession.run(configuration). Waited for updates in the delegate method session(_:didUpdate:). Specific questions: Are there additional requirements for using init(accessoryData:bluetoothPeerIdentifier:) to enable background UWB ranging with the DWM3001CDK? Is there a known difference in how init(data:) and init(accessoryData:bluetoothPeerIdentifier:) handle the ranging process? Any advice or insights would be greatly appreciated. Thanks in advance!
0
0
48
4d
Automatic process in assembling app and send to Apple Store
Hello! We would like to know the steps required to build an application and submit it to the Apple Store using an automated process on a server. Here are our conditions: We have a server running macOS Sonoma 14.6.1 on Amazon EC2. Xcode 16.1 (Build version 16B40) is installed. We use only console commands, as the GUI is not available. We use Cordova to add the iOS platform to the application. A private key, certificate, and provisioning profile have already been created and are located on the server. Could you please clarify: What commands are needed to configure the Keychain to use the certificate and provisioning profile? How can we build the application using xcodebuild? What are the steps to sign and submit the application to the App Store with minimal human interaction? Thank you in advance for your assistance!
0
0
46
4d
Not able to log proc ID in controlFilter
I was trying to log the flow description using control filter and data filter. But when I am trying to log the proc ID in control filter, it is always 0, but in data filter, it logs some value. Same goes with the eproc ID. I want to use the flow description data in some other target so I will be sending the data using sockets and I cannot share data from data filter due to its restrictions and control filter isn't providing the proc ID. What should I do?
0
0
87
5d
Can't get forum notifications to work in Safari
Every time I visit these forums, a banner is displayed at the top asking me to opt-in to notifications. I click "opt-in," the banner disappears, and no notifications are sent. If I visit my forum profile, it says my browser isn't allowing notifications: If I look in Settings->Websites, in the list of "These websites have asked for permission to show alerts in Notification Center," there are no apple.com websites whatsoever, including developer.apple.com. "Allow websites to ask for permission to send notifications" is checked, and I have many other websites in that list. I consider this to be a bug in Safari, but maybe it’s an issue with the forum itself (although I doubt it). I've submitted a Radar for it, but haven't heard anything back (I never do). EDIT: I realize I should've put this in another category, but it won't let me change that now.
0
1
128
1w
Is it possible to publish an article on this forum?
Hello, forum admins. Thank you for your work in maintaining the forum in an active working condition. I have a question for you. Is it possible here, on the forum, not only to ask questions and get answers, but also to conduct technical discussions on current programming issues? For example, I would like to publish an article on design programming patterns and hear the opinions of other programmers working in this direction. I know that there are resources where we can publish articles. But here is the most big and active community of programmers using Apple technologies and it would be great to have the opportunity to publish articles here and organize thematic discussions. Best regards, John
3
0
159
2w
Is a spam an appreciated participation in the forums ?
There are at the moment a lot of spams for a bank phone number. https://developer.apple.com/forums/thread/769506 What is really surprising is to read App Store Connect Engineer answer, each time the same: We appreciate your interest in participating in the forums! These forums are for questions about developing software and accessories for Apple platforms. Your question seems related to a consumer feature and is better suited for the Apple Support Communities Is it an automatic answer (I cannot believe anyone who read the post did not notice it was a spam) ? If so, couldn't it simply detect it is a spam (Apple Intelligence could come to help) and delete the message (or the account) ? PS: it would also be a spam in Apple Support Communities PS2: I note the message has been deleted very rapidly.
0
1
168
3w
"Authentication service is unavailable."
Urgent Assistance Needed: Issue Logging into Apple Developer Enterprise Account via Visual Studio 2022 - "Authentication service is unavailable." Dear Apple Support Team, I am encountering an issue while attempting to log into my Apple Developer Enterprise account through Visual Studio 2022. The process consistently fails with the error message: "Authentication service is unavailable." Here are the steps I followed: Open Visual Studio 2022. Navigate to Tools -> Options -> Apple Developer Account -> Add Account -> Select Enterprise Account. Attempt to log in using my Apple Developer ID and password. Despite multiple attempts, I continue to face the error: "Authentication service is unavailable." This issue occurs on both Windows and Mac environments, with the same results. However, I am able to log into my Apple Developer account via the browser, and the Apple service status portal shows no outages. As this issue is impacting our ability to deliver to our customers, I kindly request your prompt assistance in resolving this matter. Thank you in advance for your help. I look forward to your quick response. Best regards, KanTime Dev Team Windows Machine Mac Machine
15
14
1.5k
Oct ’24
unable to build chain to self-signed root for signer "Apple Developer" XXXX
I have recently been added as an apple developer in an organization by our main developer. On my mac, within keychain access, I have two certificates, one under my name and one under the company name. Both are not trusted. I am not sure what steps I need to perform to get those certificates to be trusted. I suspect that maybe my account does not have the privileges required regarding generating trusted certificates despite me being a developer in the organization. I get the error mentioned in the title when trying to deploy my app on a real device for testing which I am convinced is tied to the fact that my certificates on my target machine are not trusted. All the solutions that I have read online have failed me and its quite impossible for me to proceed forward at this point without any assistance.
2
0
596
Jul ’24