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.
Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Install both Motiv Audio and Motiv Video apps from the App Store.
Open and use the Motiv Audio app. Remove audio app from background.
Open Motiv Video app.
Observe that the Motiv Audio app crashes.
Both apps are checking Free available space.
Both app are using Audio Engine
Topic:
App & System Services
SubTopic:
General
How do I set a custom icon for an app control that appears in Control Shortcuts (swipe down from iOS) ?
Where is the documentation for size and where to put the image, format etc?
Thank you.
Working Code (sfsymbol)
import Foundation
import AppIntents
import SwiftUI
import WidgetKit
// MARK: - Open App Control
@available(iOS 18.0, *)
struct OpenAppControl: ControlWidget {
let kind: String = "OpenAppControl"
var body: some ControlWidgetConfiguration {
StaticControlConfiguration(kind: kind, content: {
ControlWidgetButton(action: OpenAppIntent()) {
Label("Open The App", systemImage: "clock.fill")
}
}
})
.displayName("Open The App") // This appears in the shortcuts view
}
}
Sample Image
These apps use their own image. How can I use my own image?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
SwiftUI
WidgetKit
App Intents
Hey there,
We are being incorrectly blocked by Time Limits since the iOS 26 update released earlier this year. We are receiving complaints from parents that set a screentime limit for "All apps", and then add an exception for us, that they are still getting blocked by the OS after a certain period of time. While we originally thought this was fixed in 26.1, we have recently been made aware it still occurs.
Has anyone else experienced this issue? Is there something we can do from our side to protect ourselves from this? Telling customers to remove their "All app" limit isn't really practical given our customer base, so we're looking to see if there's something on Apple's end or our end that can alleviate this.
Topic:
App & System Services
SubTopic:
General
I’m configuring App Clip launch behavior and would appreciate some clarification.
In my setup, the App Clip launch URL is the same as the deep link used to open the full app. Both are configured in the Apple App Site Association (AASA) file.
Observed behavior:
Scanning a QR code with this URL correctly launches the App Clip.
Tapping the same URL when it’s shared (for example, via Messages) launches the full app via the deep link instead of the App Clip experience.
I’m reviewing the documentation here:
https://developer.apple.com/documentation/appclip/configuring-the-launch-experience-of-your-app-clip#Choose-App-Clip-experiences-you-want-to-support
The table mentions that an App Clip can be invoked via “A shared link to an App Clip in the Messages app.” However, when I tap the shared link in Messages, the deep link experience is triggered instead of the App Clip.
My questions are:
Is this behavior expected when the App Clip URL and the app’s deep link URL are the same?
Does launching an App Clip from a shared Messages link require a distinct URL or additional configuration beyond what’s in the AASA file?
Are there specific constraints or priorities between universal links for the full app and App Clip invocation in this scenario?
Any clarification or guidance would be greatly appreciated.
Thank you.
Is there any way of creating complete Shortcuts automations and bundling them with my app? Specifically, I would like the user to be able to
Take a photo and open it with my app
Or take a screenshot and open it with my app
Of course I could offer a Share extension, but going through the Share menu and selecting my app there is time consuming for the user. I would like the user to be able to configure his or her action button such that it takes a new picture and opens it with my app right away.
I can, of course, offer the respective App Shortcuts and let the user combine them into a pipeline with the Take Screenshot or Take Photo system actions. However, only power users would do this. Hence, I would like to bundle this complete pipeline with my app, such that the user just has to assign his/her Action Button to this pipeline if he/she wants to use this feature.
How to go about this? I was thinking of exporting the shortcut into a file, bundling it with the app as a resource, and offering it via a Share action for the user to install it, or by sharing it on iCloud and adding the iCloud link to the UI of my app. What is the recommended approach?
Hi all,
I’m trying to understand SwiftData’s runtime semantics around optional to-many relationships, especially in the context of CloudKit-backed models.
I ran into behavior that surprised me, and I’d like to confirm whether this is intended design or a potential issue / undocumented behavior.
Minimal example
import SwiftUI
import SwiftData
@Model
class Node {
var children: [Node]? = nil
var parent: Node? = nil
init(children: [Node]? = nil, parent: Node? = nil) {
self.children = children
self.parent = parent
print(self.children == nil)
}
}
struct ContentView: View {
var body: some View {
Button("Create") {
_ = Node(children: nil)
}
}
}
Observed behavior
If @Model is not used, children == nil prints true as expected.
If @Model is used, children == nil prints false.
Inspecting the macro expansion, it appears SwiftData initializes relationship storage using backing data placeholders and normalizes to-many relationships into empty collections at runtime, even when declared as optional.
CloudKit context
From the SwiftData + CloudKit documentation:
“The iCloud servers don’t guarantee atomic processing of relationship changes, so CloudKit requires all relationships to be optional.”
Because of this, modeling relationships as optional is required when syncing with CloudKit, even for to-many relationships.
This is why I’m hesitant to simply switch the model to a non-optional [Node] = [], even though that would match the observed runtime behavior.
Questions
Is it intentional that optional to-many relationships in SwiftData are never nil at runtime, and instead materialize as empty collections?
If so, is Optional<[Model]> effectively treated as [Model] for runtime access, despite being required for CloudKit compatibility?
Is the defaultValue: nil in the generated Schema.PropertyMetadata intended only for schema/migration purposes rather than representing a possible runtime state?
Is there a recommended modeling pattern for CloudKit-backed SwiftData models where relationships must be optional, but runtime semantics behave as non-optional?
I’m mainly looking to ensure I’m aligning with SwiftData’s intended design and not relying on behavior that could change or break with CloudKit sync.
Thanks in advance for any clarification!
NWPathMonitor appears to retain itself (or is retained by some internal infrastructure) once it has been started until cancelled. This seems like it can lead to memory leaks if the references to to the monitor are dropped. Is this behavior documented anywhere?
func nwpm_self_retain() {
weak var weakRef: NWPathMonitor?
autoreleasepool {
let monitor: NWPathMonitor = NWPathMonitor()
weakRef = monitor
monitor.start(queue: .main)
// monitor.cancel() // assertion fails unless this is called
}
assert(weakRef == nil)
}
nwpm_self_retain()
I came across this tool that enables supervised mode on iOS without resetting the data. it's essentially a macOS with a unix executable file underneath. a quick guide of how it works is here
https://www.techlockdown.com/guides/enable-supervised-mode-iphone
I would appreciate any guidance on how to recreate this, as this is behind a paywall, and would like to offer something similar for free to people who want to restrict their families devices.
Topic:
App & System Services
SubTopic:
Core OS
I'm building a photo editing app with a token-based subscription system using RevenueCat and StoreKit. Users purchase subscriptions that grant tokens for AI generations. There are no user accounts, the app is fully anonymous.
Currently, I generate an anonymous account ID via RevenueCat SDK and store it in iCloud Keychain. This allows users on the same iCloud account to restore both their subscription and token balance across devices. However, users on a different iCloud account can restore their subscription via Apple, but their token balance is lost because there's no way to link the anonymous IDs.
The problem is that if a user switches iCloud accounts or gets a new device without the same iCloud, their purchased tokens are orphaned. The subscription restores fine through Apple, but the token balance tied to the old anonymous ID becomes inaccessible.
I have a few constraints: no user accounts, no email or phone sign-in, must work across devices owned by the same person, and must comply with App Store guidelines.
My questions are: Is iCloud Keychain the right tool for this, or is there a better approach? Would CloudKit with an anonymous record zone be more appropriate? Are there any recommended patterns for persisting consumable balances tied to anonymous users across device migrations?
Any guidance would be appreciated.
Topic:
App & System Services
SubTopic:
iCloud & Data
Currently, I have implemented local cache update with server data when app is killed using Push Notification and Notification Service Extension. So it works even the app is killed by the user, but I wanted to know whether this is app review safe work around or not as I am not finding any documentation for this.
Need to vent a bit before relaxing for Christmas...
WatchOS IAP using Storekit 2 is such a mess...is nobody actually using this or does Apple just not care for the user experience here?
Lots of users experience after the purchase confirmation double tap on the side button an instant return to the purchase screen with nothing actually happening. No error message whatsoever. There is just one remedy: users need to unpair and re-pair their watch, including restoring a backup and setting up their wallet again. Nobody really wants to do this, or doesn't believe me and think this is just typical support BS, because their watch is paired and most things just work as they expect. And it turns away a customer, often leaving a bad review. And I can't do anything about it.
Other errors in the purchase process are reported, but like "process interrupted" in case the payment is not setup correctly (credit car no longer valid or sth.). How should the user know? There must be better ways of letting him know what exactly the problem is.
You need to implement a "Restore Purchase" function, otherwise you're not passing the review. But it really asks every time for the AppStore password, and users with crazy passwords -- that they rightfully should have! -- have almost no chance of typing them successfully on the tiny AW keyboard. Why is it not also just a side button double tap like for purchase? At the very least you would need access to the keychain PWs or allow pasting of sth. copied on the paired iPhone.
Promo Codes for IAP on AW-only apps just don't work. AW has no redemption at all, and on the iPhone the AppStore will try to talk to a companion app (which AW-only doesn't have) and the end up in a dead-end installation effort.
This all feels like never really tested in the field, and people are of course blaming the 3rd party dev. for all these issues. And opening a ticket is just leading nowhere -- at best it's closed after months with the hint "duplicate" but w/o any chance for me to see that one that they then actually work on and track progress.
It's all so frustratingly broken...
Problem Description:
After upgrading to iOS 26, I discovered that the ExtendedDistanceMeasurement feature in the Nearby Interaction framework is not working as expected. On the same device model, the issue did not occur on iOS 18, but it is present on iOS 26 (including the latest iOS 26.2), and it has started affecting the functionality of my app. I hope this issue can be resolved as soon as possible.
Problem Details:
On iOS 26 and later versions (including iOS 26.2), when using an iPhone and an Apple Watch both equipped with second-generation UWB chips, enabling isExtendedDistanceMeasurementEnabled initiates the distance measurement process successfully, but the distance information fails to update. The real-time distance between the devices does not display within the app.
Affected Devices and Versions:
iPhone Model: iPhone 15 Pro Max
iOS Version: iOS 26.2
Apple Watch Model: Apple Watch 10
watchOS Version: 26.2
Example Code:
The issue can be reproduced by adding the following code from the official sample code:
Nearby Interaction Framework Sample Code
Problem Description:
After upgrading to iOS 26, I discovered that the ExtendedDistanceMeasurement feature in the Nearby Interaction framework is not working as expected. On the same device model, the issue did not occur on iOS 18, but it is present on iOS 26 (including the latest iOS 26.2), and it has started affecting the functionality of my app. I hope this issue can be resolved as soon as possible.
Problem Details:
On iOS 26 and later versions (including iOS 26.2), when using an iPhone and an Apple Watch both equipped with second-generation UWB chips, enabling isExtendedDistanceMeasurementEnabled initiates the distance measurement process successfully, but the distance information fails to update. The real-time distance between the devices does not display within the app.
Affected Devices and Versions:
iPhone Model: iPhone 15 Pro Max
iOS Version: iOS 26.2
Apple Watch Model: Apple Watch 10
watchOS Version: 26.2
Example Code:
The issue can be reproduced by adding the following code to the official sample code:
Nearby Interaction Framework Sample Code
private func didReceiveDiscoveryToken(_ token: NIDiscoveryToken) {
if session == nil { initializeNISession() }
if !didSendDiscoveryToken { sendDiscoveryToken() }
os_log("running NISession with peer token: \(token)")
let config = NINearbyPeerConfiguration(peerToken: token)
// The issue can be reproduced by adding the following code to the official sample code
// Enable extended distance measurement if both devices support it
if NISession.deviceCapabilities.supportsExtendedDistanceMeasurement && token.deviceCapabilities.supportsExtendedDistanceMeasurement {
config.isExtendedDistanceMeasurementEnabled = true
}
session?.run(config)
}
Problem Behavior:
When either the iPhone or the Apple Watch does not support the second-generation UWB chip (i.e., deviceCapabilities.supportsExtendedDistanceMeasurement = false), the code works as expected.
However, when both the iPhone and the Apple Watch support the second-generation UWB chip (i.e., deviceCapabilities.supportsExtendedDistanceMeasurement = true), the code fails to work, and the distance does not update — meaning the real-time distance between the devices is not displayed.
Expectation:
I hope this issue can be resolved soon, as it is impacting my app. The problem persists in the latest iOS 26.2, and has yet to be fixed.
Hi, I am building an app that depends on multiple iOS devices connecting to a designated "coordinator" iOS device. I am using MPC, and it works great when the devices are connected to the same WiFi AP, with virtually 100% connection success. My definition of success is a near instant detection of available devices, >95% connection success rate, and a stable ongoing connection with no unexpected disconnects.
The issue arises when the devices are not connected to the same WiFi network (or connected to no network with WiFi and bluetooth still on). Devices detect each other immediately, but when initiating a connection, both devices initiate a handshake, but the connection is not successful. In the few times where the connection succeeds, the connection quality is high, stable, and doesn't drop.
Is this a known limitation of the framework? Could I be doing something wrong in my implementation?
Dear Apple Customer Support,
I’m developing a new Swift iPadOS app and I want the app to run in landscape only (portrait disabled).
In Xcode, under Target > General > Deployment Info > Device Orientation, if I select only Landscape Left and Landscape Right, the app builds successfully, but during upload/validation I receive this message and the upload is blocked:
“Update the Info.plist: Support for all orientations will soon be required.”
Could you please advise what the correct/recommended way is to keep an iPad app locked to landscape only while complying with the current App Store upload requirements?
Is there a specific Info.plist configuration (e.g., UISupportedInterfaceOrientations~ipad) or another setting that should be used?
Thank you,
Bit of an odd one here, just keen to understand if it’s just me or a more generic issue.
For all other apps, I can drag the icon from the dock to place into stage manager left, centre or right.
However when I try to do the same with Safari (and only Safari), it just doesn’t work at all.
I can repeat this 100%, has been an issue with 26.0, 26.1 and now 26.2. Can confirm this isn’t a problem on my 11” M4 iPad pro running same O/S.
Here is a video showing the issue (YouTube)
https://youtu.be/0WBGBZVHsfs
Topic:
App & System Services
SubTopic:
Core OS
When trying to use the MIDI Maestro app by Singular Sound, BLE peripherals experience unwanted connection-parameter renegotiation and disconnections on iOS 26, beta iOS 26.2 does not fix this issue. iOS 26 BLE communications are being sent too fast to be read correctly by the hardware device, and iOS 26.2 refuses communication altogether.
Topic:
App & System Services
SubTopic:
Hardware
I was looking through:
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html
And wondered how these are handled for SwiftUI
apps. What would I add or override?
Hi everyone,
I’ve removed my App Clip completely:
Deleted all Advanced App Clip Experiences
Removed the App Clip target from my build
Removed App Clip references from my apple-app-site-association file
Deleted the meta tag from my website:
But when I scan the QR code, the App Clip card still appears with:
"This App Clip is not currently available in your country or region."
Does anyone know why this is still showing and how to fully remove it? we need to show our website when this QRCode is scanned.
Thanks!
Hello,
I’m working on an authorization plugin which allows users to login and unlock their computer with various methods like a FIDO key. I need to add smart cards support to it. If I understand correctly, I need to construct a URLCredential object with the identity from the smart card and pass it to the completion handler of URLSessionDelegate.urlSession(_:didReceive:completionHandler:) method. I’ve read the documentation at Using Cryptographic Assets Stored on a Smart Card, TN3137: On Mac keychain APIs and implementations, and SecItem: Pitfalls and Best Practices and created a simple code that reads the identities from the keychain:
CFArrayRef identities = nil;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)@{
(id)kSecClass: (id)kSecClassIdentity,
(id)kSecMatchLimit: (id)kSecMatchLimitAll,
(id)kSecReturnRef: @YES,
}, (CFTypeRef *)&identities);
if (status == errSecSuccess && identities) {
os_log(OS_LOG_DEFAULT, "Found identities: %{public}ld\n", CFArrayGetCount(identities));
} else {
os_log(OS_LOG_DEFAULT, "Error: %{public}ld\n", (long)status);
}
When I use this code in a simple demo app, it finds my Yubikey identities without problem. When I use it in my authorization plugin, it doesn’t find anything in system.login.console right and finds Yubikey in authenticate right only if I register my plugin as non-,privileged. I tried modifying the query in various ways, in particular by using SecKeychainCopyDomainSearchList with the domain kSecPreferencesDomainDynamic and adding it to the query as kSecMatchSearchList and trying other SecKeychain* methods, but ended up with nothing. I concluded that the identities from a smart card are being added to the data protection keychain rather than to a file based keychain and since I’m working in a privileged context, I won’t be able to get them. If this is indeed the case, could you please advise how to proceed? Thanks in advance.