Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

New features for APNs token authentication now available
Team-scoped keys introduce the ability to restrict your token authentication keys to either development or production environments. Topic-specific keys in addition to environment isolation allow you to associate each key with a specific Bundle ID streamlining key management. For detailed instructions on accessing these features, read our updated documentation on establishing a token-based connection to APNs.
0
0
1.4k
Feb ’25
HKObserverQuery stops delivering updates in background on watchOS 26
Hello, I’m building a health-related app for both watchOS and iOS, which needs to monitor certain health data (e.g., heart rate, active energy). Before updating to watchOS 26, the queries worked reliably without any issues. However, after adapting to watchOS 26, some users have reported that health data updates stop being delivered. What I’ve observed: HKObserverQuery with enableBackgroundDelivery is set up normally. On WatchOS 26, the query sometimes stops delivering updates entirely after a certain point, and once an update is missed, it may stop delivering further updates completely. Restarting the Apple Watch temporarily restores delivery, but the problem reoccurs after some time. This makes background health data monitoring unreliable for my app. Here’s a simplified version of the code we are using: guard let heartType = HKObjectType.quantityType(forIdentifier: .heartRate) else { return } let query = HKObserverQuery(sampleType: heartType, predicate: nil) { query, completionHandler, error in if let error = error { logEvent("Observer error: \(error.localizedDescription)") return } logEvent("Heart rate changed") MyNotificationManager.shared.sendNotification() // Send a local notification completionHandler() } healthStore.execute(query) healthStore.enableBackgroundDelivery(for: heartType, frequency: .hourly) { success, error in if success { logEvent("Background heart rate delivery enabled") } else { logEvent("Failed to enable background heart rate delivery: \(error?.localizedDescription ?? "Unknown error")") } } Could you please clarify: Is this a known issue with HKObserverQuery and enableBackgroundDelivery on watchOS 26? Are there any recommended workarounds or best practices to ensure continuous background delivery of health data? Thank you in advance for your help.
1
1
88
10h
Sandbox Testing
Hi, I set up a Sandbox Tester account in my company’s Apple Developer Program and signed in on my iPhone under Settings → App Store → Sandbox Account. When I go to Wallet → Add, I only see options for Credit or Debit Card or Travel Card. The option to add an Apple Pay Sandbox Card is missing, and when I try entering the test card numbers from Apple’s documentation (developer.apple.com/apple-pay/sandbox-testing), the card is not valid. Has anyone experienced this and found a solution? Thanks! PS: I can't post this to Wallet Category, I keep getting error that it contains sensitive text.
1
1
161
2w
Stability issues with Apple Pay Sandbox Cards
We are writing to report a recurring stability issue with the Apple Pay sandbox environment. We are using the official sandbox test cards provided on the Apple Developer website for our testing: https://developer.apple.com/apple-pay/sandbox-testing/ We are experiencing frequent, intermittent failures when attempting to add these sandbox cards to the Wallet for testing purposes. The issue typically occurs a couple of times per day. When the failure occurs, the card provisioning process fails unexpectedly. The issue is not limited to a single card; we have observed this behavior across all available card networks. In some instances, all cards (Visa, Mastercard, Discover, Amex) fail to provision simultaneously. At other times, the issue appears to be isolated to specific networks while others work correctly. Crucially, the issue appears to be temporary. After some time passes (ranging from minutes to an hour), we are able to add the exact same card successfully without making any changes to our test environment or configuration. We have diligently checked our setup to rule out configuration errors on our end. This includes verifying: The device is set to a supported region. We are signed in with a valid sandbox tester Apple ID. All other prerequisites for sandbox testing are met. The fact that the process works correctly at other times strongly suggests that this is a server-side stability issue within the Apple Pay sandbox environment rather than a persistent misconfiguration on our part. To help with your investigation, we have attached an image that demonstrates a failed attempt to add a card. Could you please investigate the stability of the sandbox card provisioning service? Please let us know if this is a known issue or if there is any further information we can provide. Thank you for your time and assistance.
2
0
166
20h
Are iPad apps that are closed with the red traffic light prevented from running background tasks?
In iOS Background Execution limits, I see this: When the user ‘force quits’ an app by swiping up in the multitasking UI, iOS interprets that to mean that the user doesn’t want the app running at all. iOS also sets a flag that prevents the app from being launched in the background. That flag gets cleared when the user next launches the app manually. However, I see that when I close an app on iPadOS 26 with the red X, the app doesn't appear in the multitasking UI. So are they treated as force closes and prevented from running background tasks?
1
0
31
6h
Apple Wallet Silent Push Notification not triggering GET /passes endpoint
Hello, We’re developing a loyalty program using Apple Wallet passes, and everything works except the silent push update flow. Context PassTypeIdentifier: pass.order.com.lealtad.xxxx Device is physical (not simulator) Pass is installed and visible in Wallet Correct pushToken is stored in our backend Push response from APNs: StatusCode: 200 OK apns-id: DBFF9693-D053-AA20-D737-3B24414105F3 WebServiceURL is reachable: https://xxxxx.net GET /passes/{passTypeIdentifier}/{serialNumber} endpoint is implemented and logs all calls No call is received from Apple to GET /passes/... after the push .pkpass is signed and installs correctly push payload json Copiar Editar { "aps": { "content-available": 1 }, "serialNumbers": ["9a4c9376d4"], "updated": true } pass.json json Copiar Editar { "formatVersion": 1, "passTypeIdentifier": "pass.order.com.lealtad.xxxxx", "teamIdentifier": "xxxxxxxx", "serialNumber": "9a4c9376d4xxxxxx", "webServiceURL": "https://xxxxxx.net", "authenticationToken": "xxxxxxxxxxxxxxxxx", ... } We have verified: Pass is installed and contains the correct authentication token. Pass registration via POST /devices/... happens and is logged. Push notifications are sent successfully and received (APNs 200 OK). Our endpoint GET /passes/... responds properly with Authorization: Bearer {{token}}. Certificate used to send the push is the same type as the one used to sign the .pkpass. What could cause Apple Wallet to ignore the push? We would appreciate guidance on what might be preventing Wallet from calling the webServiceURL after a valid push. Is there a way to trace why Apple is not triggering the request? Thanks in advance for your help. Best regards, José Ruiz
1
0
171
10h
App widget not appearing in widget list (intermittent)
There seems to be a long running issue with WidgetKit where some users don't see the widget when trying to add to their Home Screen. (even after opening the app for the first time). I have been able to reproduce myself intermittently, and typically restarting the phone or re-installing the app fixes the problem. However, some of my users have encountered this and end up requesting refunds because they think the app is broken. Has anybody else experienced this issue? Would be great to get this bug resolved as it's frustrating for users.
1
2
503
10h
EAWiFiUnconfiguredAccessoryBrowser "Accessory Setup" UI selects blank/null SSID by default
We've received several reports of a new bug while setting up our products with WAC. The Accessory Setup UI appears with a blank network selected and the message 'This accessory will be set up to join "(null)".' at top. The user can tap "Show Other Networks..." to select another network, but this experience is very confusing. Why does this UI present a choice that is known to be invalid when other valid choices exist? I've captured a screenshot and sysdiagnose from this case. In most cases this problem happens only intermittently, but I can reproduce it consistently by disconnecting my iPhone from any WiFi network (WiFi remains enabled). My suggestion for a better user experience is that this UI should select the default network according to these rules: The network to which iPhone is currently connected. Any network which is in the known/my list for this iPhone Any valid network I believe rule #1 is the existing behavior, but applying rules #2 and #3 as fallbacks would be an improvement. Is there anything I can change in my iOS code or in my accessory's WAC server to improve this experience?
4
0
121
10h
Stop Updating PKPass from Wallet
For our project we publish and endpoint to update a PKPass from wallet. It works fine. We are facing a problem with expired passes, due to the Automatic Updates configuration in each device our server received a lot request included those from expired passes. I cannot find any configuration inside the pass to avoid this request to my server.
1
0
82
10h
How to restore macOS routing table after VPN crash or routing changes?
Hi, I have a VPN product for macOS. When activated, it creates a virtual interface that capture all outgoing traffic for the VPN. the VPN encrypt it, and send it to the tunnel gateway. The gateway then decapsulates the packet and forwards it to the original destination. To achieve this, The vpn modifies the routing table with the following commands: # after packets were encoded with the vpn protocol, re-send them through # the physical interface /sbin/route add -host <tunnel_gateway_address_in_physical_subnet> <default_gateway> -ifp en0 > /dev/null 2>&1 # remove the default rule for en0 and replace it with scoped rule /sbin/route delete default <default_gateway> -ifp en0 > /dev/null 2>&1 /sbin/route add default <default_gateway> -ifscope en0 > /dev/null 2>&1 # create new rule for the virtual interface that will catch all packets # for the vpn /sbin/route add default <tunnel_gateway_address_in_tunnel_subnet> -ifp utunX > /dev/null 2>&1 This works in most cases. However, there are scenarios where the VPN process may crash, stop responding, or another VPN product may alter the routing table. When that happens, packets may no longer go out through the correct interface. Question: Is there a way to reliably reconstruct the routing table from scratch in such scenarios? Ideally, I would like to rebuild the baseline rules for the physical interface (e.g., en0) and then reapply the VPN-specific rules on top. Are there APIs, system utilities, or best practices in macOS for restoring the original routing configuration before reapplying custom VPN routes? Thanks
4
0
176
10h
privacySensitive on lockScreen does not seem to work...
Documentation seems to say that privacySensitive is supposed to redact on the lockScreen. I've disabled "Allow Access when locked" for "Lock Screen Widgets" just in case. It does not work for me. If I add "redacted(reason:) into the view hierarchy it redacts all the content all the time including on the home screen. I've read articles. I gone through a lot of documentation. None of them seem to give the magic formula for redacting sensitive content on the lock screen. I'm using iOS 18.7 on a real iPhone 14 Pro Max.
1
0
65
10h
Notification coordination between iOS and watchOS is not working properly
Notification coordination between iOS and watchOS is not working properly watchOS and iOS try to coordinate between phone and watch notifications. The concept here is that if there is a main app and a companion app, they could both be sending a notification, then the notification would alert on both, which is a deviation from how notification mirroring is handled if there is an iOS app but no watch app. The watch waits for the iOS notification to fire so they can determine if this is the same notification that needs to be deduped, displayed on one device but not the other, or separate notifications to be displayed both. If there is no notification on the phone, the watch will timeout after 13 seconds and alert anyway. If you have an iOS companion app, the best solution to this is to send the same notification on both devices simultaneously, and ensuring the UNNotificationRequest.identifier matches on both notifications. This will let the systems determine how to handle the notification correctly and quickly, and the notification will alert right away. https://developer.apple.com/forums/thread/765669 According to the above article, "when a notification arrives on watchOS alone first, it coordinates with iOS," but in reality, it doesn't work properly. Detailed process of this phenomenon watchOS receives a notification. On watchOS, the notification is not immediately shown to the user. iOS receives a notification with the same UNNotificationRequest.identifier as in (1). The notification in (3) does not appear on either iOS or watchOS. However, the notification from (3) does appear in iOS Notification Center. Thirteen seconds after watchOS received the notification, the notification from (1) is shown to the user on watchOS. In the end, the iOS and watchOS notifications are not consolidated and each remains in its respective notification center. Up to (3) there are no issues. Starting with (4), both iOS and watchOS exhibit a lot of odd behavior. This phenomenon occurs with both local notifications and push notifications. When iOS receives the notification first, there is no problem. The notification for watch received later is processed appropriately, and the watchOS notification is not additionally displayed to the user. Expected proper process Same as above. Same as above. Same as above. The notification in (1) is integrated into the notification in (3). The notification in (3) is alerted to the user immediately. 2 sample projects to reproduce Only the main code is attached. Sample project1: local notifications Swift code for local notification app (iOS, watchOS) - App.swift.txt Sample project2: push notifications This sample project is implemented using Firebase Functions and Firebase Cloud Messaging. Swift code push notification app (iOS, watchOS) - App.swift.txt Server side JavaScript code for FirebaseFunction - index.js.txt Tested devices and OS This phenomenon occurred in both of the following patterns. Pattern 1 Xcode 26.0 iPhone 16 (iOS 26.0) Apple Watch series 10 (watchOS 26.0) Pattern 2 Xcode 16.4 iPhone 11 (iOS 18.6) Apple Watch SE 2nd gen (watchOS 11.6) Question Is this phenomenon a bug? Or is my understanding or implementation incorrect? Feedback Assistant number FB20339772
1
0
43
11h
limitations of UserSendCDB in SCSIPeripheralsDriverKit?
I've made a dext and a user client that overrides IOUserSCSIPeripheralDeviceType00, with the object of writing device firmware to the driver. I can gain and relinquish exclusive access to the device, I can call UserReportMediumBlockSize and get back a sensible answer (512). I can build command parameters with the INQUIRY macro from IOUserSCSIPeripheralDeviceHelper.h and send that command successfully using UserSendCB, and I receive sensible-looking Inquiry data from the device. However, what I really want to do is send a WriteBuffer command (opcode 0x3B), and that doesn't work. I have yet to put a bus analyzer on it, but I don't think the command goes out on the bus - there's no valid sense data, and the error returned is 0xe00002bc, or kIOReturnError, which isn't helpful. This is the code I have which doesn't work. kern_return_t driver::writeChunk(const char * buf, size_t atOffset, size_t length, bool lastOne) { DebugMsg("writeChunk %p at %ld for %ld", buf, atOffset, length); SCSIType00OutParameters outParameters; SCSIType00InParameters response; memset(&outParameters, 0, sizeof(outParameters)); memset(&response, 0, sizeof(response)); SetCommandCDB(&outParameters.fCommandDescriptorBlock, 0x3B, // byte 0, opcode WriteBuffer command lastOne ? 0x0E : 0x0F, // byte 1 mode: E=save deferred, F = download and defer save 0, // byte 2 bufferID (atOffset >> 16), // byte 3 (atOffset >> 8), // byte 4 atOffset, // byte 5 (length >> 16), // byte 6 (length >> 8), // byte 7 length, // byte 8 0, // control, byte 9 0, 0, 0, 0, 0, 0); // bytes 10..15 outParameters.fLogicalUnitNumber = 0; outParameters.fBufferDirection = kIOMemoryDirectionOut; outParameters.fDataTransferDirection = kSCSIDataTransfer_FromInitiatorToTarget; outParameters.fTimeoutDuration = 1000; // milliseconds outParameters.fRequestedByteCountOfTransfer = length; outParameters.fDataBufferAddr = reinterpret_cast<uint64_t>(buf); uint8_t senseBuffer[255] = {0}; outParameters.fSenseBufferAddr = reinterpret_cast<uint64_t>(senseBuffer); outParameters.fSenseLengthRequested = sizeof(senseBuffer); kern_return_t retVal = UserSendCDB(outParameters, &response); return retVal; }
1
0
45
11h
SwiftUI issue with onTap using Map using IOS 26
I have a sample that stop working on IOS 26, using the latest XCode and IOS sdk, the onTapGesture event is no longer happening. Maybe this is no longer the way to drop pins on the map. Also not working on the iPhone 17 sim or iPhone 16 max pro device upgrading to IOS 26 Thanks, any help Sample: import SwiftUI import MapKit import CoreLocation import Foundation struct Pin: Identifiable { let id = UUID() let coordinate: CLLocationCoordinate2D } struct ContentTestPinDropView: View { @State private var pins: [Pin] = [] var body: some View { MapReader { reader in Map(selection: .constant(nil)) { ForEach(pins) { pin in Marker("Pin", coordinate: pin.coordinate) } } .onTapGesture { screenPoint in if let coordinate = reader.convert(screenPoint, from: .local) { pins.append(Pin(coordinate: coordinate)) } } } } }
1
0
33
12h