Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

Can I Present AlarmKit's UI in Expanded Dynamic Island when its fired?
Can I Present AlarmKit's Alarm UI in Expanded Dynamic Island that I implement with SwiftUI when its fired? not System AlarmUI, but my the view that I implemented. I've implemented Dynamic Island properly, and tried various scenarios but I can't find out the way to present AlarmKit UI in Expanded Dynamic Island when it is fired. I don't know why, but, sometimes, it is presented in Expanded Dynamic Island UI which is I Implemented. But when I try lots of times, It is presented in System AlarmKit UI not my SwiftUI View. Can you please tell me how can I present my SwiftUI Expanded Dynamic Island when it is fired? Sincerely
0
0
20
1w
Seeking Recommended Approach for Sharing VPN Profile Private Keys Between Sandboxed macOS App and Packet Tunnel System Extension
Hello Apple Developer Community, We are developing a full-tunnel VPN app for macOS that utilizes a packet tunnel network system extension (via NEPacketTunnelProvider). We're committed to using a system extension for this purpose, as it aligns with our requirements for system-wide tunneling. The app is sandboxed and intended for distribution on the Mac App Store. Here's the workflow: The app (running in user context) downloads a VPN profile from our server. It generates private keys, appends them to the profile, and attempts to save this enhanced profile securely in the keychain. The packet tunnel system extension (running in root context) needs to access this profile, including the private keys, to establish the VPN connection. We've encountered challenges in securely sharing this data across the user-root boundary due to sandbox restrictions and keychain access limitations. Here's what we've tried so far, along with the issues: Writing from the App to the System Keychain: Attempted to store the profile in the system keychain for root access. This fails because the sandboxed app lacks permissions to write to the system keychain. (We're avoiding non-sandboxed approaches for App Store compliance.) Extension Reading Directly from the User Login Keychain: Tried having the extension access the user's login keychain by its path. We manually added the network extension (located in /Library/SystemExtensions//bundle.systemextension) to the keychain item's Access Control List (ACL) via Keychain Access.app for testing. This results in "item not found" errors, likely due to the root context not seamlessly accessing user-keychain items without additional setup. Using Persistent References in NETunnelProviderProtocol: The app stores the profile in the user keychain and saves a persistent reference (as Data) in the NETunnelProviderProtocol's identityReference or similar fields. The extension then attempts to retrieve the item using this reference. We manually added the network extension (located in /Library/SystemExtensions//bundle.systemextension) to the keychain item's Access Control List (ACL) via Keychain Access.app for testing. However, this leads to error -25308 (errSecInteractionNotAllowed) when the extension tries to access it, possibly because of the root-user context mismatch or interaction requirements. Programmatically Adding the Extension to the ACL: Explored using SecAccess and SecACL APIs to add the extension as a trusted application. This requires SecTrustedApplicationCreateFromPath to create a SecTrustedApplicationRef from the extension's path. Issue 1: The sandboxed app can't reliably obtain the installed extension's path (e.g., via scanning /Library/SystemExtensions or systemextensionsctl), as sandbox restrictions block access. Issue 2: SecTrustedApplicationCreateFromPath is deprecated since macOS 10.15, and we're hesitant to rely on it for future compatibility. We've reviewed documentation on keychain sharing, access groups (including com.apple.managed.vpn.shared, but we're not using managed profiles/MDM) as the profiles are download from a server, and alternatives like XPC for on-demand communication, but we're unsure if XPC is suitable for sensitive data like private keys during tunnel creation. And if this is recommended what is going to be the approach here. What is the recommended, modern approach for this scenario? Is there a non-deprecated way to handle ACLs or share persistent references across contexts? Should we pursue a special entitlement for a custom access group, or is there a better pattern using NetworkExtension APIs? Any insights, code snippets, or references to similar implementations would be greatly appreciated. We're targeting macOS 15+. Thanks in advance!
1
0
37
1w
Trying to make the URL filter sample work
Hello, I've been experimenting with the new NEURLFilter API and so far the results are kind of strange. SimpleURLFilter sample contains a bloom filter that seems to be built from this dataset in pir-service-example. I was able to run SimpleURLFilter sample and configure it to use PIRService from the example repo. I also observed the requests that iOS has been sending: requesting config and then sending /queries request. What I haven't seen is any .deny verdict for any URL. Even when calling NEURLFilter.verdict(for: url) directly I cannot see a .deny verdict. Is there anything wrong with the sample or is there a known issue with NEURLFilter in the current beta (beta 8) that prevents it from working?
2
2
190
1w
Storekit configuration broken in Xcode 16.4 the file has been changed
Hi everyone, After updating to Xcode 16.4, my StoreKit configuration stopped working. Whenever I run the app with a .storekit file set as the active scheme, I immediately get this alert: “The file has been changed. Do you want to save your changes or revert to the file on disk?” No matter if I choose Save Anyway or Revert, StoreKit testing does not work - the purchases are not simulated, and the scheme is basically broken. This issue didn’t exist in Xcode 15.4 - the same StoreKit configuration file works fine there. What I tried so far: Clearing Derived Data - no effect Making sure no scripts/tools modify the .storekit file - still happens Restarting Xcode and macOS - no change Environment: Xcode 16.4 Happens in both Simulator and on device Reproducible 100% Has anyone else seen this in 16.4? Any known workarounds until Apple fixes it? Thanks!
3
1
79
1w
Alarms scheduled using AlarmKit is not reliable
The alarms that I am scheduling using alarmKit is not reliable at all, especially in beta 8 (Used to have this issue in previous betas, But they were inconsistent). The alarm fires anywhere after 5 mins to 45 mins from the actual scheduled time. I'll share the relevant code block here in case if it is me who is doing something wrong. This code block doesn't throw any errors and I am also able to see the scheduled alarms when I query them. The issue is with alarms not firing on the specified time let alert = AlarmPresentation.Alert( title: "Wakey Wakey!", stopButton: .init(text: "stop", textColor: .red, systemImageName: "stop.fill") ) let presentation = AlarmPresentation(alert: alert) let attributes = AlarmAttributes<CountDownAttribute>( presentation: presentation, metadata: .init(), tintColor: .orange ) let schedule = Alarm.Schedule.fixed(alarmTime) let config = AlarmManager.AlarmConfiguration( schedule: schedule, attributes: attributes ) let id = UUID() do { let alarm = try await AlarmManager.shared.schedule(id: id, configuration: config) print("Alarm set successfully for \(alarmTime) - \(alarm)") } catch { print("Failed to schedule alarm: \(error)") }
2
0
131
1w
AppIntent, StartWorkoutIntent, and Siri
I'm a bit confused as to what we're supposed to be doing to support starting a workout using Siri in iOS/watchOS 26. On one hand, I see a big push to move towards App Intents and shortcuts rather than SiriKit. On the other hand, I see that some of the things I would expect to work with App Intents well... don't work. BUT - I'm also not sure it isn't just developer error on my part. Here are some assertions that I'm hoping someone more skilled and knowledgable can correct me on: Currently the StartWorkoutIntent only serves the Action button on the Watch Ultra. It cannot be used to register Shortcuts, nor does Siri respond to it. I can use objects inherited from AppIntent to create shortcuts, but this requires an additional permission to run a shortcut if a user starts a workout with Siri. AppIntent shortcuts requires the user to say "Start a workout in " - if the user leaves out the "in " part, Siri will not prompt the user to select my app. If I want to allow the user to simply say "Start a Workout" and have Siri prompt the user for input as to which app it should use, I must currently use the older SiriKit to do so. Are these assertions correct - or am I just implementing something incorrectly? Using the latest Xcode 26 beta for what it is worth.
1
1
89
1w
Custom HCE payment UI
We are currently developing a wallet solution that uses the iOS EEA HCE API. During the development of our solution we have been unable to identify how we can opt out of using the native HCE payment modal screen or biometric authentication UI so that we can customise the experience to align with our overall customer experience. The only available customisation is a label below the title of the screen which does not meet our needs. Please can you advise how we can opt out of using the native HCE payment modal screen. If it is not possible to opt out of using the native HCE payment modal screen, please can you provide the rationale for this given the Digital Marketing Act interoperability guidelines and EU Commitments in case AT.40452.
1
3
167
1w
IAPs after rejection
Hi everyone, After my app was initially rejected, all my IAPs now show the status “Developer Action Needed.” There’s nothing I need to change on them — they were just returned because it was the first submission and the app itself was rejected. Do I need to do anything with the IAPs before I resubmit, or will they still be attached and reviewed automatically with the next binary? I’ve seen conflicting answers, so I’d like to confirm the correct process. Thanks, Cris
1
0
67
1w
Trouble with OSDeclareDefaultStructors.
Hi guys! OK, reaching out for some help here. I am having all kinds of trouble with OSDeclareDefaultStructors. I have seriously been at this for nearly a week now and have come to the conclusion that I need to reach out for help from people that are more experience using Xcode. I believe entirely that my issue is just that I can't for whatever reason see how to set up includes and libraries and things like that. I have this line: OSDeclareDefaultStructors(NukeVirtualGamepad) No matter what I do, Xcode will not recognize OSDeclareDefaultStructors. The project builds a DriverKit &gt; Driver extension. I have literally tried absolutely everything with this. I am at a loss for words. I even set up a new blank project and it still will not recognize OSDeclareDefaultStructors. I did a lot of research and it looks like expo needs OSDeclareDefaultStructors in order for the extension to build with a binary in it instead of being just a codeless extension. Here is the code with the issue: #pragma once #include &lt;DriverKit/OSMetaClass.h&gt; #include &lt;HIDDriverKit/IOUserHIDDevice.h&gt; #include &lt;DriverKit/OSData.h&gt; class NukeVirtualGamepad : public IOUserHIDDevice { OSDeclareDefaultStructors(NukeVirtualGamepad) // The problem is right here! This line! public: // Keep it minimal; no 'override' keywords since the .h types may not mark them virtual bool init(); void free(); kern_return_t Start(IOService* provider); void Stop (IOService* provider); OSData* newReportDescriptor(); // (Optional) helper you’ll use later to inject input matching your report kern_return_t PostInput(uint16_t buttons, int8_t x, int8_t y); }; I do have to mention to everyone that I am still very new with Xcode. So there is a ton that I don't know yet or might be misunderstanding. Has anyone seen this before? Thank you in advance.
4
0
142
1w
Verify with wallet run in simulator
I am fallowing the steps mention here https://developer.apple.com/wallet/get-started-with-verify-with-wallet/ and https://developer.apple.com/documentation/passkit/requesting-identity-data-from-a-wallet-pass to run a POC in simulator but I am getting a crash DigitalPresentmentSession requestDocument fatal error from xpc: This app has crashed because it called an API it is not entitled to use. :0: Fatal error: This app has crashed because it called an API it is not entitled to use.
2
0
240
1w
Clarification on Apple Pay Domain Verification File Behavior
I'm implementing Apple Pay in my Flutter web app and I'm following the guidelines for domain verification using the apple-developer-merchantid-domain-association file. When I access the file at https://mydomain.com/.well-known/apple-developer-merchantid-domain-association through my web app, the browser silently downloads the file instead of displaying its content on the webpage. My question is: Is this the expected behavior for the apple-developer-merchantid-domain-association file? Should the browser download the file silently, or is there another step required, such as displaying the content on the webpage for verification purposes? I've consulted some resources and they indicate that the file download is the correct behavior. However, I'd appreciate confirmation from the community to ensure I'm implementing the verification process correctly. Summary is how do we know if apple has verified it?
1
0
235
1w
PKPassLibrary.requestAutomaticPassPresentationSuppression Behavior
We are implementing a feature that uses PKPassLibrary.requestAutomaticPassPresentationSuppression to prevent the Wallet from appearing when unlocking a lock. We have already completed the approval process for the entitlement to enable Pass Presentation Suppression. In most cases, our code snippet works as expected, and the result is .success. However, we are also encountering other results, such as .denied, .alreadyPresenting, and .cancelled or .notSupported, which cause the Wallet to appear for users. Here's the code snippet we're using: PKPassLibrary.requestAutomaticPassPresentationSuppression { result in logger.log( .info, "PKPassLibrary suppression result: \(result.description)", LogContext.homeFeature ) } I would appreciate clarification on the following points: What's the meaning of each result type (.denied, .alreadyPresenting, .cancelled, .notSupported) beyond what is mentioned in the documentation? The documentation here does not provide additional details. What is the recommended handling for these specific result states? Should we be taking different actions or retries based on each case? Thank you very much for your help. Best, Ramiro.
4
2
266
1w
About review app and subscription
When submitting an app for review, will any unreviewed auto-renewing subscriptions within the app be reviewed simultaneously? I own an app that has passed review and offers an auto-renewing subscription A within the app that has also passed review. To test a new service, I plan to create a new auto-renewing subscription B, which I do not intend to submit for review. After creating Subscription B, I plan to submit the app for review as part of an app update. In that case, is there a possibility that Subscription B will also be reviewed?
1
0
82
1w
Which distinct logic does FetchRequest use with "returnsDistinctResults"?
If I use <FetchRequest.returnsDistinctResults> with unique "identifier" property, and there happened to be multiple NSManagedObjects in Core Data that contains the same "identifier", does the FetchRequest retrieve the latest modified/created object? Is there a way to define the <FetchRequest.returnsDistinctResults> logic to be based on another property (e.g. "creationDate" / "modifiedDate") and the ascension order?
1
0
202
1w
In-App Purchase Failing
hello, I have an app with In-App purchase set up, it works fine in TestFlight on an iOS device but the download from the App Store gives me a transaction failed message. I tried to replicate in the simulator but from what I've read is that you can't do in-app purchase testing in the simulator. Perhaps I'm wrong here but I've tried multiple sandbox accounts, etc.. and still get an unusual "...password can't be reused..." error (pasted below) in the debug description. I'm curious if anyone else has dealt with this scenario and if so how did you go about researching/identifying the issue and/or resolving it. Partial error message: <SKPaymentQueue: 0x60000000e370>: Payment completed with error: Error Domain=ASDErrorDomain Code=530 "(null)" UserInfo={NSUnderlyingError=0x600000c74750 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed The authentication failed." UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=AMSErrorDomain Code=2 "Password reuse not available for account The account state does not support password reuse." UserInfo={NSDebugDescription=Password reuse not available for account The account state does not support password reuse., AMSDescription=Password reuse not available for account, AMSFailureReason=The account state does not support password reuse.}"
1
0
168
1w
SwiftData Inheritance Query Specialized Model
Hi, I am currently experiencing some trouble when using parent model property in a predicate of a child model. I have an Item class that define parent-child relationship: @Model class Item { var timestamp: Date @Relationship(inverse: \Item.children) var parent: Item? var children: [Item] init(parent: Item? = nil, children: [Item] = [], timestamp: Date = .now) { self.parent = parent self.children = children self.timestamp = timestamp } } I subclass this model like that: @available(iOS 26, *) @Model final class CollectionItem: Item { /* ... */ } When i make a Query in my View like that the system crashes: @Query( filter: #Predicate<CollectionItem> { $0.parent == nil }, sort: \CollectionItem.name, ) private var collections: [CollectionItem] CrashReportError: Fatal Error in DataUtilities.swift AppName crashed due to fatalError in DataUtilities.swift at line 85. Couldn't find \CollectionItem.<computed 0x000000034005d4e8 (Optional<Item>)> on CollectionItem with fields [SwiftData.Schema.PropertyMetadata(name: "name", keypath: \CollectionItem.<computed 0x000000034003c120 (String)>, defaultValue: nil, metadata: nil), SwiftData.Schema.PropertyMetadata(name: "icon", keypath: \CollectionItem.<computed 0x000000034003ca04 (Optional<String>)>, defaultValue: nil, metadata: nil), SwiftData.Schema.PropertyMetadata(name: "timestamp", keypath: \Item.<computed 0x0000000340048018 (Date)>, defaultValue: nil, metadata: nil), SwiftData.Schema.PropertyMetadata(name: "parent", keypath: \Item.<computed 0x0000000340048a4c (Optional<Item>)>, defaultValue: nil, metadata: Optional(Relationship - name: , options: [], valueType: Any, destination: , inverseName: nil, inverseKeypath: Optional(\Item.<computed 0x0000000340048fe8 (Array<Item>)>))), SwiftData.Schema.PropertyMetadata(name: "children", keypath: \Item.<computed 0x0000000340048fe8 (Array<Item>)>, defaultValue: nil, metadata: nil)] When I query as Item it works but then i cannot sort on CollectionItem field and must add unnecessary down casting: @Query( filter: #Predicate<Item> { $0.parent == nil && $0 is CollectionItem }, ) private var items: [Item] Am I missing something? Is it a platform limitation or a known issue?
9
0
218
1w
Go to Settings” button in Core NFC system alert does not navigate on iOS 26 beta
Description: While testing Core NFC functionality on iOS 26 beta, when the NFC switch is turned off, the system automatically displays an alert. The alert contains two buttons: “Cancel” and “Settings”. Expected Behavior: When the user taps the “Settings” button, the system should navigate to the system settings page where the NFC switch can be turned on. Actual Behavior: The alert appears as expected Tapping the “Settings” button does not navigate to the system settings page No callback is triggered in the app’s NFC session Steps to Reproduce: Turn off the NFC switch on an iOS 26 beta device Trigger Core NFC functionality (e.g., NFCNDEFReaderSession or NFCTagReaderSession) The system alert appears indicating NFC is turned off Tap the “Settings” button Impact: Users cannot directly navigate to enable NFC from the system alert, making NFC features in the app unusable and negatively affecting user experience. Device Information: iOS Version: iOS 26 beta Device Model: iPhone 14pro App uses Core NFC APIs to trigger NFC sessions
2
0
55
1w
BLE connection issue with iPad A16 – Control Opcode 0xFF
We are testing BLE connectivity between a custom device (nRF52832, nRF5 SDK) and the latest iPad A16. Setup: Peripheral: nRF52832 running Nordic’s SoftDevice (nRF5 SDK v13) . Central: iPad A16 (Latest iPadOS 18.6.2). Issue: During the connection procedure, the iPad sends a Link Layer Control PDU with Opcode 0xFF. This is a vendor-specific LL control opcode. Our peripheral does not respond, since the Nordic SoftDevice does not implement handling for 0xFF. As a result, the link stability is affected (connection may drop / negotiation fails). Observations: With older iPads and iPhones (A14/A15 chips), no such control opcode is sent — connection and notifications work fine. Only the iPad A16 sends this vendor-specific opcode. Nordic’s SoftDevice responds to standard LL control opcodes, but ignores vendor-specific ones. Questions: Is this 0xFF LL control PDU expected behavior on A16 devices? Should peripherals ignore vendor-specific LL opcodes, or is a response required for stable connection? Are there known changes in BLE Link Layer negotiation with iPad A16?
1
1
95
1w