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 are currently developing a VoIP application that supports Local Push extention.
I would like to ask for your advice on how the extension works when the iPhone goes into sleep mode.
Our App are using GCD (Grand Central Dispatch) to perform periodic processing within the extension, creating a cycle by it.
[sample of an our source]
class LocalPushProvider: NEAppPushProvider {
let activeQueue: DispatchQueue = DispatchQueue(label: "com.myapp.LocalPushProvider.ActiveQueue", autoreleaseFrequency: .workItem)
var activeSchecule: Cancellable?
override func start(completionHandler: @escaping (Error?) -> Void) {
:
self.activeSchecule = self.activeQueue.schedule(
after: .init(.now() + .seconds(10)), // start schedule after 10sec
interval: .seconds(10) // interval 10sec
) {
self.activeTimerProc()
}
completionHandler(nil)
}
}
However In this App that we are confirming that when the iPhone goes into sleep mode, self.activeTimerProc() is not called at 10-second intervals, but is significantly delayed (approximately 30 to 180 seconds).
What factors could be causing the timer processing using GCD not to be executed at the specified interval when the iPhone is in sleep mode?
Also, please let us know if there are any implementation errors or points to note.
I apologize for bothering you during your busy schedule, but I would appreciate your response.
I am trying to implement Apple Login on the web.
The language I am using is PHP.
I have created the App ID, Service ID, and Key.
In the Service ID, I clicked the Configure button for Sign In With Apple and entered the domain and return URL.
However, when I click the login button, I only get an "invalid_client" error screen.
This is my php code:
<?php
$clientId = 'com.fallinf.signin.service';
$redirectURI = 'https://www.fallinf.com/?id=inc&action=apple_auth';
$scope = 'email';
$state = bin2hex(random_bytes(5));
?>
<html>
<head>
<meta name="appleid-signin-client-id" content="<?=$clientId?>">
<meta name="appleid-signin-redirect-uri" content="<?=$redirectURI?>">
<meta name="appleid-signin-scope" content="<?=$scope?>">
<meta name="appleid-signin-state" content="<?=$state?>">
<meta name="appleid-signin-use-popup" content="true">
</head>
<body>
<div id="appleid-signin" data-color="black" data-border="true" data-type="sign in"></div>
<script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/ko_KR/appleid.auth.js"></script>
<script type="text/javascript">
document.addEventListener('AppleIDSignInOnSuccess', (data) => {
console.log("AppleIDSignInOnSuccess")
});
document.addEventListener('AppleIDSignInOnFailure', (error) => {
console.log("AppleIDSignInOnFailure")
});
</script>
</body>
</html>
Topic:
App & System Services
SubTopic:
General
Tags:
Sign in with Apple REST API
Sign in with Apple
Sign in with Apple JS
I am trying to implement Apple Login on the web.
The language I am using is PHP.
I have created the App ID, Service ID, and Key.
In the Service ID, I clicked the Configure button for Sign In With Apple and entered the domain and return URL.
However, when I click the login button, I only get an "invalid_client" error screen.
Topic:
App & System Services
SubTopic:
General
Tags:
Sign in with Apple REST API
Sign in with Apple
Sign in with Apple JS
We're facing a strange issue where UIImagePickerController opens with a black screen (no camera preview) for some users only. The camera permissions are granted, and the picker is presented without errors. This problem does not reproduce on all devices — it's been reported on:
iPhone 14 – iOS 18.4
iPhone 13 – iOS 18.5
Other unknown devices (users didn’t share details)
We are using UIImagePickerController to open the rear camera, and presenting it from appDelegate.window?.rootViewController. All required permissions are in place (NSCameraUsageDescription is added in Info.plist, runtime permissions checked and approved).
Still, for a subset of users, the screen goes black when trying to capture a photo. We suspect either a system-level issue with iOS 18.4+, a session conflict, or an issue with how we present the picker.
Looking for advice or known issues/workarounds. Would switching to AVCaptureSession help?
What We’ve Verified:
NSCameraUsageDescription is set in Info.plist
Camera permission is requested and granted at runtime
Users tried:
Reinstalling the app
Restarting the phone
Switching between front/rear camera
Still, the camera preview remains black
No crash logs or exceptions
Below is the Code Level Example:-
let imagePicker = UIImagePickerController()
let Capture = UIAlertAction(title: "TAKE_PHOTO".localized, style: .destructive) { _ in
self.imagePicker.sourceType = .camera
self.imagePicker.cameraDevice = .rear
self.imagePicker.showsCameraControls = true
self.imagePicker.allowsEditing = false
appDelegate.window?.rootViewController?.present(self.imagePicker, animated: true, completion: nil)
}
Hi, I am using Location Push Service Extension in my app but as soon as my app gets an update Location Extension fails to launch. From the console I can see OS is terminating this process. What could be the reason ? When user launches the app after update the extension starts to work as expected.
I'm trying to update data displayed in my Watch Complications (WidgetKit). I have an iOS app that sends data to the Apple Watch using WCSession.default.transferUserInfo. However, the data only updates on the complications or widgets after I open the watchOS app manually.
Ideally, I'd like the Watch widget/complication to reflect the updated data as soon as it's sent from the iPhone, without requiring the user to open the Watch app.
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
Watch Connectivity
WatchKit
Watch Complications
I'm using AirPods Pro 2 with an iPhone 15 Pro Max. After installing the IOS 26 beta I'm not able to get the new features to work. Does anyone have thoughts or info? Thanks
When creating a new project in Xcode 26, the default for defaultIsolation is MainActor.
Core Data creates classes for each entity using code gen, but now those classes are also internally marked as MainActor, which causes issues when accessing managed object from a background thread like this.
Is there a way to fix this warning or should Xcode actually mark these auto generated classes as nonisolated to make this better? Filed as FB13840800.
nonisolated
struct BackgroundDataHandler {
@concurrent
func saveItem() async throws {
let context = await PersistenceController.shared.container.newBackgroundContext()
try await context.perform {
let newGame = Item(context: context)
newGame.timestamp = Date.now // Main actor-isolated property 'timestamp' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
try context.save()
}
}
}
Turning code gen off inside the model and creating it manually, with the nonisolated keyword, gets rid of the warning and still works fine. So I guess the auto generated class could adopt this as well?
public import Foundation
public import CoreData
public typealias ItemCoreDataClassSet = NSSet
@objc(Item)
nonisolated
public class Item: NSManagedObject {
}
I have a SwiftUI document-based app that for the sake of this discussion stores accounting information: chart of accounts, transactions, etc. Each document is backed by a SwiftData DB.
I'd like to incorporate search into the app so that users can find transactions matching certain criteria, so I went to Core Spotlight. Indexing & search within the app seem to work well.
The issue is that Spotlight APIs appear to be App based & not Document based. I can't find a way to separate Spotlight data by document.
I've tried having each document maintain a UUID as a document-specific identifier and include the identifier in every CSSearchableItem. When performing a query I filter the results with CSUserQueryContext.filterQueries that filter by the document identifier. That works to limit results to the specific file for search operations.
Index updates via CSSearchableIndexDelegate.reindex* methods seem to be App-centric. A user may have file #1 open, but the delegate is being asked to update CSSearchableItems for IDs in other files.
Is there a proper way to use Spotlight for in-app search with a document-based app?
Is there a way to keep Spotlight-indexed data local within the app & not make it available across the system? I.e. I'd like to search within the app only. System-level searches should not surface this data.
I have the following struct doing some simple tasks, running a network request and then saving items to Core Data.
Per Xcode 26's new default settings (onisolated(nonsending) & defaultIsolation set to MainActor), the struct and its functions run on the main actor, which works fine and I can even safely omit the context.perform call because of it, which is great.
struct DataHandler {
func importGames(withIDs ids: [Int]) async throws {
...
let context = PersistenceController.shared.container.viewContext
for game in games {
let newGame = GYGame(context: context)
newGame.id = UUID()
}
try context.save()
}
}
Now, I want to run this in a background thread to increase performance and responsiveness. So I followed this session (https://developer.apple.com/videos/play/wwdc2025/270) and believe the solution is to mark the struct as nonisolated and the function itself as @concurrent.
The function now works on a background thread, but I receive a crash: _dispatch_assert_queue_fail. This happens whether I wrap the Core Data calls with context.perform or not. Alongside that I get a few new warnings which I have no idea how to work around.
So, what am I doing wrong here? What's the correct way to solve this simple use case with Swift 6's new concurrency stuff and the default main actor isolation in Xcode 26?
Curiously enough, when setting onisolated(nonsending) to false & defaultIsolation to non isolating, mimicking the previous behavior, the function works without crashing.
nonisolated
struct DataHandler {
@concurrent
func importGames(withIDs ids: [Int]) async throws {
...
let context = await PersistenceController.shared.container.newBackgroundContext()
for game in games {
let newGame = GYGame(context: context)
newGame.id = UUID() // Main actor-isolated property 'id' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
}
try context.save()
}
}
I'd like to determine, definitively, if nesting of "binaries" within other "binaries" is possible with iOS.
I put binaries in quotes because I've read documentation/forum posts stating things like nested frameworks isn't supported in iOS. A framework is a binary isn't it, or contains one. So does a statement such as that apply specifically and only to nested frameworks, or does it also apple to other scenarios - such as a SPM binary integrated into a framework?
Here's the specific scenario I'm seeking clarity on - suppose an SDK providing an API/functionality is built as an .xcframework and that SDK contains dependencies on two other components (Firebase, AlmoFire, RealmSwift, CocoaLumberjack, whatever etc.).
Lets say the SDK has two dependencies X and Y and it integrates them via SPM.
Q1: If there is an app A which integrates the SDK, and A doesn't use X and Y itself, then can X and Y be embedded within the SDK and thus opague to A? Is this possible in iOS?
Q2: If A integrates the SDK as above, but additionally, it itself uses X and Y independently of the SDK, then is this situation possible in iOS?
Presumably in Q1 the SDK needs to embed X and Y into the framework?
While presumably in Q2 it should not - because the app will be and hence that would lead to duplicate symbols and potential undefined behaviour (and therefore X and Y's SPM package spec needs to specify dynamic?)
I've been trying to get a clear picture of this for literally weeks and weeks, without reaching a clear conclusion.
So some definitive answer would be very much appreciated.
I just adding a way to donate my app's data to Core Spotlight using CSSearchableIndex, but I'm finding that spotlight is only searching for the title of the CSSearchableItem I create. I know the index is working, because it always finds the item through the title property, but nothing else.
This is how I'm creating the CSSearchableItem:
- (CSSearchableItem *) createSearchableItem {
CSSearchableItemAttributeSet* attributeSet = [[CSSearchableItemAttributeSet alloc] initWithContentType: UTTypeText];
attributeSet.title = [self titleForIndex];
attributeSet.displayName = [self titleForIndex];
attributeSet.contentDescription = [self contentDescriptionForIndex];
attributeSet.thumbnailData = [self thumbnailDataForIndex];
attributeSet.textContent = [self contentDescriptionForIndex];
CSSearchableItem *item = [[CSSearchableItem alloc] initWithUniqueIdentifier: [self referenceURLString] domainIdentifier:@"com.cjournal.cjournal-Logs" attributeSet:attributeSet];
item.expirationDate = [NSDate distantFuture];
return item;
}
There's a lot of confusing tips around which say specifying the 'textContent' should work, and/or setting the displayName is essential, but none of these are working.
Is there something I'm missing with my setup?
Thanks.
Hello! We use Apple's "master account" scheme to register new clients trough API due to the fact that the number of merchant IDs in a developer account cannot exceed 100 records. It's been almost a year since we successfully used the master account ( ex. "merchant.com.xxx") and register clients via Postman. At the moment, the certificates for the master merchant ID start to expire on July 11 which will affect all customers which is under Master ID. We know that when updating certificates at the identifier level(our master id), new universal identity certificate files that we use to send to the merchants (merchant_id.pem, privkey.key) will be generated for authentication on the merchant side, as well as a new keystore. Since many of our clients are integrated with current files and keystores and have live traffic, we would like to know—is it possible to update certificates on the master account without changing the keystores and certificate identities? The impossibility of this will entail a large gap when switching to new certificates. Thanks in advance for your answer.
Topic:
App & System Services
SubTopic:
Apple Pay
I’m trying to determine the most appropriate modern method for detecting whether a user originally downloaded a paid app (prior to transitioning the app to freemium/IAP-based access).
Historically, this was done by checking for a valid App Store receipt and using SKReceiptRefreshRequest to ensure a fresh one was available. However, SKReceiptRefreshRequest and many related aspects of StoreKit receipt handling are now deprecated in iOS 17+.
The current Apple documentation on receipt validation still refers to SKReceiptRefreshRequest, which makes things unclear. With so many deprecations and the push toward StoreKit 2, what’s the recommended path to:
Check for a valid App Store receipt
Confirm that the app was originally purchased (as a paid app, not via IAP)
Persist this info to exempt the user from paywalling the app in the future
I don’t need to validate purchases of IAPs — just to detect a legacy paid app download.
Any guidance on best practice for this use case, preferably using non-deprecated APIs (StoreKit 2 or otherwise), would be appreciated.
Topic:
App & System Services
SubTopic:
StoreKit
this error occurred during the StoreKit1 payment process. Could you please tell me the reason?
SKErrorDomain Code=0 "发生未知错误\" UserInfo= {NSLocalizedDescription=发生未知错误,NSUnderlyingError=0x17652ee50 {Error Domain=ASDErrorDomain Code=500"(null)\"Userlnfo={NSUnderlyingError=0x17652d530 {Error Domain=AMSErrorDomain Code=203 "(null)" Userlnfo= {NSUnderlyingError=0x17652c3c0 {Error Domain=AMSErrorDomain
Code=203"(null)\"UserInfo=0x1663e5940(not
displayed)}}}
On iOS17, UIDevice.current.batteryLevel is returning values rounded to 0.05, such as 1, 0.95, 0.9.
We have an application which is written in Swift, which activates Transparent Proxy network extension. We are using Jamf MDM profile for deployment.
To avoid the user deleting / disabling the extension from General -> LogIn Items & Extension -> Network Extensions screen, we are using "Non-removable system extensions from UI" attribute under Allowed System Extensions and Teams IDs section.
In new Mac OS 26 (Tahoe), user can also enable/disable the extension from General -> LogIn Items & Extension -> Apps tab. The "Non-removable system extensions from UI" attribute set in Jamf MDM profile does not apply to this tab.
Same attribute is working for General -> LogIn Items & Extension -> Extensions tab and there the slider is greyed out and Remove option is not available under more menu.
Is there any new key/configuration defined to disable the slider from General -> LogIn Items & Extension -> Apps tab?
Created https://feedbackassistant.apple.com/feedback/18198031 - FB18198031 feedback assistant ticket as well.
Topic:
App & System Services
SubTopic:
General
Tags:
Network Extension
System Extensions
Device Management
I am trying to write a unit test for an AppIntent and override the AppDependencyManager so I can inject dependencies for the purposes of testing. When I run a test, the app crashes with:
AppIntents/AppDependencyManager.swift:120: Fatal error: AppDependency of type Int.Type was not initialized prior to access. Dependency values can only be accessed inside of the intent perform flow and within types conforming to _SupportsAppDependencies unless the value of the dependency is manually set prior to access.
App Intent:
import AppIntents
struct TestAppIntent: AppIntent {
@AppDependency var count: Int
static var title: LocalizedStringResource { "Test App Intent "}
func perform() async throws -> some IntentResult {
print("\(count)")
return .result()
}
}
extension TestAppIntent {
init(dependencyManager: AppDependencyManager) {
_count = AppDependency(manager: dependencyManager)
}
}
Unit Test
import Testing
import AppIntents
@testable import AppIntentTesting
struct TestAppIntentTests {
@Test("test")
func test() async throws {
let dependencyManager = AppDependencyManager()
dependencyManager.add(dependency: 5)
let appIntent = TestAppIntent(dependencyManager: dependencyManager)
_ = try await appIntent.perform()
}
}
Hi! I am using the Automations in shortcuts in macOS 26 dev beta 1 and I have all my shortcuts working except this one. Why?(photo included). All the others are very similar except they do other things not make pdf. They work. Why does this one not. I tried changing the extension to .doc, or .docx instead of doc and docx I tried using if name ends in .docx I tried file filtering nothing. Any ideas? Thanks!
Could someone please explain how to use a custom sound when setting up an alarm using AlarmKit? It keeps playing a default sound.
Also, I keep having an issue where the alarm sound plays but doesn’t show the alarm interface buttons unless the screen is locked.
Topic:
App & System Services
SubTopic:
General