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
Activity
We have developed a Parental/Self control app using Screen time API.
We have used individual authentication to authorize the app, using the instructions here:
https://developer.apple.com/documentation/familycontrols/authorizationcenter
The problem is , that individual auth can be disabled easily , by the following steps:
enter Settings app.
in Settings app, click on the Parental/Self control app.
click to disable screen time restriction.
show the device owner's face/fingerprint. (or pin code)
Why is that a problem:
Parental control apps, or self-control apps, are about giving control to the software, To make it hard for the user to disable the restrictions.
So using the flow I have introduced above, it's super-easy for a user to disable his Parental control restrictions, which misses the entire point of Parental/Self control idea.
Furthermore, not only the user have the means to unlock his screen time restrictions, he also MUST have the means to unlock it.
This makes Screen time (with individual auth) useless:
I have a code ready to make a great parental control app for my clients, with amazing ideas, but I can't use the Screen time API unless this problem is fixed.
Why child-parent auth is not enough:
My clients are grownups people between ages of 15-40, that are interested in self-control, so they don't have iCloud child accounts.
also, the child-parent auth solution forces my clients to give some control to other person, and my clients prefer their privacy. Some of them prefer self-control and not parental-control.
What I suggest as a solution:
1: Give more options to users how to disable the Screen time restrictions. including:
a second faceID / FingerPrint (that isn't the same as the one used to unlock the device)
a second pin password.
a string password
2: Give the users the option to choose to not have the device's owner Face/Finger/Pincode ID , as a method to disable the Screen time restrictions.
Hi,
I’m looking for guidance on enabling push notifications for new emails in the native iOS Mail app (com.apple.mobilemail).
Currently, I send push notifications using macOS Server (formerly OS X Server) Mail, but since it has been discontinued and renewal is no longer possible, I want to transition to the standard method used by email providers to notify the stock Mail app about new messages.
To achieve this, I need access to the com.apple.mobilemail.push.com.zuplu APNs topic. This follows the same pattern used by other providers:
iCloud: com.apple.mobilemail.push.com.me.mail.castle
Fastmail: com.apple.mobilemail.push.com.fastmail
Since Fastmail (as a third-party provider) has access to this, I assume there is a way for independent mail providers to integrate with XAPPLEPUSHSERVICE.
In the interest of a free market and fair competition, I trust that Apple provides a means for email providers to notify the stock Mail app of IMAP server changes, allowing it to fetch new messages instantly.
Under EU competition law, particularly Article 102 TFEU, dominant companies must not engage in anti-competitive behavior, including restricting access to essential services in a discriminatory manner. Furthermore, the Digital Markets Act (DMA) explicitly prohibits gatekeepers from favoring their own services or restricting interoperability without justification.
Any insights or official guidance would be greatly appreciated!
Thanks,
DragonWork
Logging in with my Apple ID anywhere in the system (feedback assistant, Xcode, iCloud, etc.) fails when running under virtualization. Is this a known 'issue'? (networking in general is working fine)
Hi all,
Has anyone stumbled upon the SwiftData equivalent of @SectionedFetchRequest? Is there a way to do it with @Query? I'll keep going through the documentation but if anyone has an answer, it would be much appreciated!!
Thank you.
I am trying to follow the guidance for testing a Local Experience, as listed in the Testing Your App Clip’s Launch Experience - https://developer.apple.com/documentation/app_clips/testing_your_app_clip_s_launch_experience documentation. I have successfully created my App Clip target, and can confirm that running the App Clip on my device does launch the App Clip app as I expected. Further, I can successfully test the App Clip on device, by setting the _XCAppClipURL argument in the App Clip's scheme.
I would like to test a Local Experience. The documentation states that for testing Local Experiences;
To test your app clip’s invocation with a local experience, you don’t need to add the Associated Domains Entitlement, make changes to the Apple App Site Association file on your web server, or create an app clip experience for testing in TestFlight. Therefore, I should be able to configure a Local Experience with any desired domain in Settings -> Developer -> Local Experience, generate a QR code or NFC tag with that same URL, and the App Clip experience should appear. I have taken the following steps;
Built and run my App Clip on my local device.
In Settings -> Developer -> Local Experience, I have registered a new experience using a URL prefix https://somewebsite.com
Set my Bundle ID to com.mycompany.myapp.Clip, which exactly matches the Bundle Identifier, as listed in Xcode, under my App Clip target.
Generated a QR code which directs me to https://somewebsite.com
In theory, I believe I should be able to open the Camera app on my device, point the camera at the QR code, and the App Clip experience should appear. However, I received mixed experiences. 50% of the time, I receive a pop-up directing me to open https://somewebsite.com in Safari, the other 50% of the time, no banner or action occurs whatsoever.
Is this an issue anyone has faced before, or have I pursued these steps out of order?
Hi! Could you please clarify when and why the subscription auto-renewal rate in TestFlight was changed to a daily cycle? Now, the subscription lasts for 6 days! This is causing significant issues in testing. Previously, the 5-minute auto-renewal for weekly subscriptions was an excellent solution.
Is there a way to adjust the auto-renewal timing for an account in TestFlight?
Documentation link: https://developer.apple.com/help/app-store-connect/test-a-beta-version/subscription-renewal-rate-in-testflight.
Thank you for your clarification!
Since the iOS 18 and Xcode 16, I've been getting some really strange SwiftData errors when passing @Model classes around.
The error I'm seeing is the following:
SwiftData/BackingData.swift:409: Fatal error: This model instance was destroyed by calling ModelContext.reset and is no longer usable.
PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://34EE9059-A7B5-4484-96A0-D10786AC9FB0/TestApp/p2), implementation: SwiftData.PersistentIdentifierImplementation)
The same issue also happens when I try to retrieve a model from the ModelContext using its PersistentIdentifier and try to do anything with it. I have no idea what could be causing this.
I'm guessing this is just a bug in the iOS 18 Beta, since I couldn't find a single discussion about this on Google, I figured I'd mention it.
if someone has a workaround or something, that would be much appreciated.
On macOS Sequoia, the settings to enable FIFinderSync seem to have gone. I have already figured out that Extensions are no longer in the Privacy & Security section, but they are now at General › Login Items & Extensions. Here there is a Finder section, but that is just for the Finder-Extensions, not the Finder-Sync-Extensions. Those previously did not have their own section and were hidden away in the Added Extensions section that apparently no longer exists. I expect that it has been forgotten when migrating.
Where are the settings for this – have they been forgotten?
I've been testing out SwiftData but haven't bee able to get ModelContext notifications working. I've tried both an objc observer and for await patterns but it never fires. If I listen for the older nsmanagedcontext notifications they are firing, but I am hoping that the new ones give an ID instead of an objectId. Has anyone got these working?
Attempt 1:
class NotificationObserver {
init() {
let didSaveNotification = ModelContext.didSave
NotificationCenter.default.addObserver(self, selector: #selector(didSave(_:)),
name: didSaveNotification, object: nil)
}
@objc func didSave(_ notification: Notification) {
print(notification.name)
}
}
Attempt 2:
class NotificationObserver {
init() {
let didSaveNotification = ModelContext.didSave
Task {
for await note in NotificationCenter.default.notifications(named: didSaveNotification) {
print(note)
}
}
}
}
It seems that subscription status gives different results with XCode testing and Sandbox testing.
I am using StoreKit2 to implement an IAP of an autorenewable subscription. I want to determine whether the subscription has been cancelled, so that the UI reflects that the subscription will stop after the expiry date and not be renewed.
the 'willAutoRenew' property of the subscription status renewalInfo seems to do exactly what is required, and works fine in XCode testing. My setup is very similar to the StoreKit demo associated with the WWDC21 session available here:
https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_a_store_in_your_app_using_the_storekit_api/
To demonstrate its use, add:
print(renewalInfo.willAutoRenew)
after line 79 of the SubscriptionsView in the demo project. When you run the app, and purchase a Standard Navigation assistance subscription, the console shows 'true'. If you then cancel the subscription in XCode (Debug:StoreKit:Manage Transactions), the console will show 'false' as expected
So far so good. My problem is that when I move to Sandbox testing, and cancel the subscription in another way (eg using the .manageSubscriptionsSheet view modifier, or in Settings:App Store:Sandbox Account), the willAutoRenew property remains true, even though the subscription is in fact cancelled (ie it disappears after the expiry date)
Does anyone know a workaround to determine cancellation status?
Description
The Shortcut Automation Trigger Transaction frequently times out, ultimately causing the shortcut automation to fail. Please see the attached trace for details.
Additionally, the Trigger is activated even when the Transaction is declined.
Details
In the trace I see the error:
[WFWalletTransactionProvider observeForUpdatesWithInitialTransactionIfNeeded:transactionIdentifier:completion:]_block_invoke Hit timeout waiting for transaction with identifier: <private>, finishing.
Open bug report: FB14035016
I added my first subscription to my app using StoreKit's SubscriptionStoreView. Everything worked as expected in the debug environment and also in TestFlight. So I submitted my app and subscriptions to App Store Connect, got everything Approved and released.
After updating my app through App Store and checking the Subscription View, it just says "Subscription Unavailable. The subscription is unavailable in the current storefront."
I waited around 3 days and still getting the same message. Now the very strange behavior starts. I went to App Store Connect, I made and edit to the subscription description, saved, removed the edit, saved, and submitted to review. 15 minutes later the subscriptions appear in my app and everything works as expected. After getting the edit approved, the Subscription View in my app again only showed the message "Subscription Unavailable. The subscription is unavailable in the current storefront." No user is able to see the subscriptions anymore, even though it worked as expected before the edit was approved.
So I did the same as before. Again, make an edit to the subscription description, save, remove the edit, save, submit to review. 15 minutes later the subscriptions are again available in my app and it works as expected.
This is definitely not the expected behavior and submitting the subscription edits every day is wasting the App Review Team's time as well as mine. I contacted Apple Developer Support but I didn't get any reply back (at least yet).
I am not the only one experiencing this. I found a friend online who has the exact same issue, and is able to temporarily solve it by making an edit to the subscription description as well.
So far it has been a huge headache, and we are losing customers this way. Please if anyone has experience with this problem, or has any suggestions, they will be greatly appreciated.
Thank you so much,
Tomas
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
App Store Connect
In-App Purchase
I have encountered an issue that when using a ModelActor to sync data in the background, the app will crash if one of the operations is to remove a PersistentModel from the context.
This is running on the latest beta of Xcode 16 with visionOS 1.2 as target and in Swift 6 language mode.
The code is being executed in a ModelActor.
The error is first thrown by:
#5 0x00000001c3223280 in PersistentModel.getValue<τ_0_0>(forKey:) ()
Thread 1: Fatal error: Context is missing for Optional(SwiftData.PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://97AA86BC-475D-4509-9004-D1182ABA1922/Reminder/p303), implementation: SwiftData.PersistentIdentifierImplementation))
func globalSync() async {
await fetchAndSyncFolders()
let result = await fetchReminders()
switch result {
case .success(let ekReminders):
var localReminders = (try? await fetch(FetchDescriptor<Reminder>())) ?? []
// Handle local reminders with nil ekReminderID by creating new EKReminders for them
for reminder in localReminders {
if reminder.ekReminderID == nil {
await self.createEkReminder(reminder: reminder)
}
}
// Re-fetch local reminders to include newly created EKReminderIDs
localReminders = (try? await fetch(FetchDescriptor<Reminder>())) ?? []
var localReminderDict = [String: Reminder]()
for reminder in localReminders {
if let ekReminderID = reminder.ekReminderID {
if let existingReminder = localReminderDict[ekReminderID] {
self.delete(model: existingReminder)
} else {
localReminderDict[ekReminderID] = reminder
}
}
}
let ekReminderDict = createReminderLookup(byID: ekReminders)
await self.syncReminders(localReminders: Array(localReminderDict.values), localReminderDict: localReminderDict, ekReminderDict: ekReminderDict)
// Merge duplicates
await self.mergeDuplicates(localReminders: localReminders)
save()
case .failure(let error):
print("Failed to fetch reminders: \(error.localizedDescription)")
}
}
We are experiencing an issue with StoreKit in the sandbox environment. When performing an SKProductsRequest, some or all of the product identifiers we provide are returning in invalidProductIdentifiers of SKProductsResponse, even though all of them are valid and approved.
This issue started occurring today and seems intermittent—occasionally, a previously failing product identifier works after one or two retries without any changes on our end.
We have verified that:
All product identifiers are correctly configured and approved in App Store Connect.
There are no recent changes to our product configuration.
The same identifiers have worked previously without issue.
Could you please assist us in identifying the cause of this behavior or let us know if there is an ongoing issue affecting StoreKit sandbox services?
Thank you for your support.
I have an existing iOS app with shortcuts support, and I am trying to bring the same shortcuts to my Mac app in macOS Monterey. In my case, I have added the same intents definition file to my Mac target app, added "Intents eligible for in-app handling" to my Info.plust file and added the intent names, and made sure all the intent handling code is part of both iOS and Mac targets. Still, when I build and run the app on macOS Monterey, the new shortcuts don't show in the shortcut editor at all. I've tried closing and restarting the Shortcuts app, but no luck. The build logs do show the intents being built, but they're just not showing up in the Shortcuts app.
I tried 'donating' one of the intents in my Mac app code, but got an error:
Cannot donate interaction with intent that has no valid shortcut types
Not sure what to try to make it work.
Thanks.
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
wwdc21-10232
App Intents
Shortcuts
I've got a problem with compatibility with Swift6 in iOS app that I have no idea how to sort it out.
That is an extract from my main app file
@MainActor
@main struct LangpadApp: App {
...
@State private var notificationDataProvider = NotificationDataProvider()
@UIApplicationDelegateAdaptor(NotificationServiceDelegate.self) var notificationServiceDelegate
var body: some Scene {
WindowGroup {
TabView(selection: $tabSelection) {
...
}
.onChange(of: notificationDataProvider.dateId) { oldValue, newValue in
if !notificationDataProvider.dateId.isEmpty {
tabSelection = 4
}
}
}
}
init() {
notificationServiceDelegate.notificationDataProvider = notificationDataProvider
}
}
and the following code shows other classes
@MainActor
final class NotificationServiceDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate
{
var notificationDataProvider: NotificationDataProvider?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -&gt; Bool {
UNUserNotificationCenter.current().delegate = self
return true
}
func setDateId(dateId: String) {
if let notificationDataProvider = notificationDataProvider {
notificationDataProvider.dateId = dateId
}
}
nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async {
// After user pressed notification
let content = response.notification.request.content
if let dateId = content.userInfo["dateId"] as? String {
await MainActor.run {
setDateId(dateId: dateId)
}
}
}
nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -&gt; UNNotificationPresentationOptions {
// Before notification is to be shown
return [.sound, .badge, .banner, .list]
}
}
@Observable
final public class NotificationDataProvider : Sendable {
public var dateId = ""
}
I have set Strict Concurrency Checking to 'Complete.' The issue I'm facing is related to the delegate class method, which is invoked after the user presses the notification.
Current state causes crash after pressing notification. If I remove "nonisolated" keyword it works fine but I get the following warning
Non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
I have no idea how to make it Swift6 compatible. Does anyone have any clues?
Hi, I have deployed my app on Test Flight, I have two subscriptions, monthly and yearly. User can have one of them at a time and upgrade, downgrade to the other. Upgrade, downgrade, cancel from the Apple Settings worked fine in the sandbox environment when testing locally. Now when I have deployed the app on TestFlight, I was able to purchase the subscription successfully from my app. Now when I want to cancel my subscription from the Apple Settings it gives me the following error after confirming cancellation, 'Your request is temporarily unable to be processed. Please try again later.' Also the other subscription offer (yearly) is also not shown to which I could upgrade, even though in the sandbox I was able to upgrade downgrade from the settings. Another thing I have noticed is that the app Icon or name is not shown anywhere in settings with the subscription. Instead of app icon only empty square is shown. Even though app icon shows fine everywhere else.
Can someone please help me figure out this issue?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
TestFlight
App Store Server API
There is an issue with StoreKit. The line let products = try await StoreKit.Product.products(for: ids) doesn't always work correctly. Sometimes it returns an array with the correct data, and sometimes it returns an empty array. I'm passing the correct ids to products(for:).
This problem only occurs when using the sandbox environment (in TestFlight builds). In the App Store version, everything works fine.
StoreKit configuration is none. All IAPs are approved.
Everything was working fine before this. The problem was discovered on May 1, 2025.
I am working on an app for a home automation device.
If I were using HomeKit exclusively I could add custom services or custom characteristics on standard services and these things would all be reported to my app via HomeKit. There is sample code from Apple that demonstrates how to do this.
When a Matter device is commissioned using HomeKit you might expect custom clusters and/or custom attributes in a standard cluster would be translated to appropriate HomeKit services and characteristics, but this doesn't appear to be the case.
Is there a way to have HomeKit do this?
If not it seems I would need to use Matter directly rather than via HomeKit to access custom features. But if I commission the device using Matter in my app then I understand a new fabric is created and the device would not show in the Home app. Maybe the user needs to commission the device twice, once with my custom app and once with the Home app? That seems like a poor user experience to me. Perhaps that is the price paid for using a cross-platform standard?
Is there a better way to get the same level of customization using Matter that I am able to get using HomeKit?
There are use cases where someone who's using an Apple Pencil may not want to enter text via Scribble. A simple example is writing "UIViewController" in a text view is unlikely to be successful.
I'd like to disable Scribble in this case and let the keyboard become the input mechanism. (Disabling Scribble system-wide in Settings is both cumbersome and overkill.)
The closest I can come to making this happen is by adding a UIScribbleInteraction on a UITextView and returning false when scribbleInteraction(shouldBeginAt:) is called.
This disables Scribble on the text view, and prevents writing from being converted into text, but the input widget still appears on screen and isn't very useful.
Here is a sample project that demonstrates the problem:
http://files.iconfactory.net/craig/bugs/Scribbler.zip
Hopefully, I'm doing something wrong here. If not, I'm happy to submit this as a FB.
-ch