[MTAgeRangeService requestEligibility:^(BOOL eligible) {
if (eligible) {
//您应用程序的用户所在的地区,需要执行特定年龄相关义务
[MTAgeRangeService requestAgeRangeWithAgeGates:18 in:[ViewU getCurrentVC] completion:^(enum ARResponseType responseType, ARAgeRange * _Nullable ageRange, NSError * _Nullable error) {
[weakself.ageRangeLoadingView dissmiss];
self->_ageRangeLoadingView = nil;
if (responseType == ARResponseTypeSharing) {
//用户同意并分享了年龄范围
if ([ageRange.lowerBound intValue] >= 18) {
//满18岁可以注册
}else{
//不到18岁不能注册,提示一下
}
}else{
//用户拒绝或者其他未知错误,需要提示
}else{
}
}
}] ;
}else{
}];
General
RSS for tagDelve 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
I'm facing a problem where notification permissions are working fine in the main app, but failing in the Device Activity Report Extension on iOS 26. This issue wasn’t present in earlier iOS versions. Despite having notification permissions granted in the main app, the extension fails to get authorization.
iOS 26:
"
Before iOS 26:
Topic:
App & System Services
SubTopic:
General
Tags:
Notification Center
User Notifications
Screen Time
Hello,
Regarding EKEventStore, the WWDC session mentions that “you should only have one of these for your application.”
In my app, I need to use the instance on both the main thread and a background thread, and I would like to share a single instance across them.
However, EKEventStore is a non-sendable type, so it cannot be shared across different isolation domains.
I would like to know what the recommended best practice is for this situation.
Also, do I need to protect the instance from data races by using a lock?
Thank you.
In iOS 26.1, after my app answers a VoIP call on the lock screen, tapping the bottom-left "More" button doesn't bring up the app icon to jump to the app. The same scenario works normally on iOS 26. How can I resolve this issue?
I followed the method outlined in Apple's documentation to test "Revocation of Consent." Our server received the notification sent by Apple, but the parsed data only contains the following content (some data has been modified for privacy, but the fields remain unchanged):
{
"receiptType": "Sandbox",
"bundleId": "com.xxx.xxxxx",
"receiptCreationDate": 1764932591296,
"requestDate": 1764932591296,
"originalPurchaseDate": 1375340400000,
"originalApplicationVersion": "1.0",
"appTransactionId": "705020051250081000",
"originalPlatform": "iOS"
}
How can we identify that "a parent/guardian has revoked authorization for a specific user"? We are unable to determine which minor user should be restricted from using certain features of our app.
I hope to receive a prompt response from Apple's technical experts!
Topic:
App & System Services
SubTopic:
General
I’m trying to fully understand the purpose of the ageGates parameter in the AgeRangeService.requestAgeRange API.
The official documentation includes the following statement:
“The system may return geo-specific age ranges that override your provided age gates based on the person’s location and applicable regulations.
When geo-specific ranges are required, the returned age range reflects regulatory requirements rather than the bounds of your age gates.”
Based on this, it seems that even if my app provides specific age thresholds through the ageGates parameter,
the system may override those boundaries depending on regional laws or regulations, and return a completely different lowerBound / upperBound than what my age gates would suggest.
My current understanding is:
ageGates indicates the thresholds my app uses to define its internal feature tiers,
but the actual age range returned by the OS is determined by legal or regional requirements (e.g., COPPA, GDPR-K, AADC, SB2420),
meaning the returned age range may not align with the age ranges implied by my ageGates values.
I’d like to confirm whether this interpretation is correct.
Additionally, if different regions may produce different lowerBound / upperBound values due to regulatory requirements,
then it seems that:
developers shouldn’t rely on fixed age buckets, and
instead must implement feature gating logic dynamically based on whatever age range the OS returns.
So my questions are:
Is my understanding correct that ageGates is simply a hint that describes my app’s tier thresholds, and the OS may override those boundaries to comply with local regulations?
If lowerBound / upperBound can vary across regions, what is the recommended way for developers to design their feature-gating logic?
Should we avoid hardcoded age buckets and instead build flexible logic that adapts to whatever range the OS returns?
I’d appreciate clarification so I can design our age-based policies appropriately and in a regulation-compliant way.
I followed the method outlined in Apple's documentation to test "Revocation of Consent." Our server received the notification sent by Apple, but the parsed data only contains the following content (some data has been modified for privacy, but the fields remain unchanged):
{
"receiptType": "Sandbox",
"bundleId": "com.xxx.xxxxx",
"receiptCreationDate": 1764932591296,
"requestDate": 1764932591296,
"originalPurchaseDate": 1375340400000,
"originalApplicationVersion": "1.0",
"appTransactionId": "705020051250081000",
"originalPlatform": "iOS"
}
How can we identify that "a parent/guardian has revoked authorization for a specific user"? We are unable to determine which minor user should be restricted from using certain features of our app.
I hope to receive a prompt response from Apple's technical experts!
Thanks A Lot !
Topic:
App & System Services
SubTopic:
General
In my case, when I try to block calls on iOS 26, the blocking doesn't occur; the scenarios seem intermittent. If I create two CallDirectory extensions, the first blocks the numbers, but the second doesn't. Interestingly, the extension marks the number as suspicious. There's also a case where, on iOS 26 on an iPhone 16 Pro, the functionality doesn't work at all. I'd like to know if there have been any changes to the use of CallKit in iOS 26, because users of my app on iOS 18 and below report successful blocking.
Hello!
I am experiencing some strange bugs around DeviceActivityEvents:
When creating a DeviceActivityEvent we can assign a threshold and applicationTokens.
The idea is, that after the user has spent said threshold on said apps, eventDidReachThreshold is called.
includesPastActivity is set to false.
On iOS 26 however, it happens (quite reliably after updating to a new beta seed) quite often that eventDidReachThreshold is called immediately (after a couple of seconds) instead of waiting for the threshold to be met.
Is anyone else seeing similar issues on iOS 26?
Only workaround I have found is to ask users to re-grant Screen Time permissions. This only holds for about two weeks though or at most until the next iOS 26 beta update is installed.
Feedback filed under:
FB18061981
FB18927456
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
Is it possible to develop for TelephonyMessagingKit on iOS 26 outside of the EU? If so, how is this accomplished? I have added the 'Default Carrier Messaging App' entitlement to my project, but I do not see an option to set my app as a default option in settings on my device. I am not located inside of the EU, but would like to test this functionality.
Topic:
App & System Services
SubTopic:
General
On macOS 26, I've run into a situation when a user “customizes” a folder icon with Finder by assigning/changing an SF Symbol or an emoji, QLThumbnailGenerator keeps returning the stale initially retrieved folder icon (no matter whether it had been customized or not) until my app quits. After the app is re-launched, the icon is correctly retrieved once again.
let generator = QLThumbnailGenerator.shared
let size: CGSize = CGSize(width: 64, height: 64)
let request = QLThumbnailGenerator.Request(fileAt: url, size: size, scale: NSScreen.main!.backingScaleFactor, representationTypes: .icon)
request.iconMode = true
do {
let thumb = try await generator.generateBestRepresentation(for: request)
thumb.nsImage.size = size
return thumb.nsImage
} catch {
print("generateThumbnail: \(error)")
return nil
}
It seems like the QuickLook Thumbnailing cache does not invalidate automatically upon folder customization. Is there any way to manually invalidate the QuickLook Thumbnailing cache?
I created my app with the wrong name and deleted it 3 days ago. When I want to create a new app, I can't use the old app's bundle id, even though I removed it. I opened a support case 2 days ago, but so far nothing changed.
Topic:
App & System Services
SubTopic:
General
My son uses an iPhone XS running iOS 18.7.2. He is able to bypass all Screen Time app limits by manually changing the date under Settings → General → Date & Time. When he sets the date/time forward or backward, the configured Screen Time restrictions no longer apply.
Please make it possible on iOS 18.7.2 (and future versions) to prevent manual date and time changes when Screen Time is enabled, so that children cannot use this method to circumvent app limits.
Topic:
App & System Services
SubTopic:
General
Hello fellow developers...first time posting. I wrote a small app that I'm currently testing. However, I inadvertently built the Swift code using my "free" account and did not use my "paid" account. Aside from the restrictions of a free account, I want to migrate the project to the paid developer account.
Is there an easy way to do this short of rebuilding from scratch???
Thanks in advance.
s
Topic:
App & System Services
SubTopic:
General
I'd like to set my macOS app written in Swift as default app when opening .mp4 file.
I think I can do it with setDefaultApplication(at:toOpen:completion:).
https://developer.apple.com/documentation/appkit/nsworkspace/3753002-setdefaultapplication
However, permission error occurs when I use it.
The error is:
Error Domain=NSCocoaErrorDomain Code=256 "The file couldn’t be opened." UserInfo={NSUnderlyingError=0x6000031d0150 {Error Domain=NSOSStatusErrorDomain Code=-54 "permErr: permissions error (on file open)"}}
I tried to give my app full-disk access, but it didn't work.
I also tried to use setDefaultApplication(at:toOpenFileAt:completion:), then it works with no error, but it effects on only one file.
What I want to do is to set my app as default app of all .mp4 files.
How do I achieve this?
My code is like below:
let bundleUrl = Bundle.main.bundleURL
NSWorkspace.shared.setDefaultApplication(at: bundleUrl, toOpen: .mpeg4Movie) { error in
print(error)
}
Thank you.
I encountered a concurrency compilation warning when calling the TranslationSession.translations(from: [TranslationSession.Request]) API, and I'm don't know how to resolve it. I reviewed the official demo, but it appears identical.
I'm working on a multi-process macOS application (based on Chromium/Electron) that uses Mach ports for inter-process communication between the main app and its helper processes.
Background
I have an MAS build working successfully via TestFlight for internal testing. However, public TestFlight testing requires Apple review, and while waiting for that review, I wanted to provide a
directly distributable build for external testers. I attempted to create a Developer ID signed build with App Sandbox enabled, expecting it to behave similarly to the MAS build.
The Problem
With App Sandbox enabled (com.apple.security.app-sandbox) and identical entitlements, I observe different behavior depending on the signing certificate:
Apple Distribution certificate: App launches successfully, mach-register and mach-lookup work
Developer ID certificate: App crashes at launch, mach-register is denied by sandbox
The Console shows this sandbox violation for the Developer ID build:
Sandbox: MyApp(13605) deny(1) mach-register XXXXXXXXXX.com.mycompany.myapp.MachPortRendezvousServer.13605
The crash occurs when the app calls bootstrap_check_in() to register a Mach service for child process communication.
What I've tried
Adding com.apple.security.temporary-exception.mach-register.global-name with wildcard pattern XXXXXXXXXX.com.mycompany.myapp.MachPortRendezvousServer.* to the main app's entitlements - this resolved the mach-register denial.
However, helper processes then fail with mach-lookup denial. Adding com.apple.security.temporary-exception.mach-lookup.global-name with the same wildcard pattern to the main app's entitlements (for inheritance) does not work.
Analysis of /System/Library/Sandbox/Profiles/application.sb
I examined macOS's App Sandbox profile and found that mach-register.global-name supports wildcard patterns via select-mach-filter:
(sandbox-array-entitlement
"com.apple.security.temporary-exception.mach-register.global-name"
(lambda (name)
...
(let ((mach-filter
(select-mach-filter name global-name-prefix global-name)))
(allow mach-register mach-filter))))
But mach-lookup.global-name does not - it only accepts exact names:
(sandbox-array-entitlement
"com.apple.security.temporary-exception.mach-lookup.global-name"
(lambda (name) (allow mach-lookup (global-name name))))
Since the Mach service name includes the PID (e.g., ...MachPortRendezvousServer.13605), it's impossible to specify exact names in entitlements.
I also verified that com.apple.security.application-groups grants mach-register and mach-lookup only for service names prefixed with the group ID (e.g., group.com.mycompany.myapp.), which
doesn't match the TEAMID.bundleid. prefix used by Chromium's MachPortRendezvousServer.
My questions
What mechanism allows Apple Distribution signed apps to use mach-register and mach-lookup for these service names without temporary exceptions? I don't see any certificate-based logic in application.sb.
Is there a way to achieve the same behavior with Developer ID signing for testing purposes?
Related threads
https://developer.apple.com/forums/thread/747005
https://developer.apple.com/forums/thread/685601
https://developer.apple.com/forums/thread/128714 (confirms temporary-exception can be used freely for Developer ID apps)
Environment
macOS 15.6 (Sequoia)
Xcode 16.4
Both certificates from the same Apple Developer account
Topic:
App & System Services
SubTopic:
General
Tags:
App Store
Entitlements
App Sandbox
Developer ID
Is this intended behavior? I want my app to act like the regular Clock app and snooze alarms when user taps volume down button but apparently volume down button stops the alarm. Is this normal or am I missing something?
Topic:
App & System Services
SubTopic:
General
Rejecting a Cellular Call Also Rejects Application Video Call
Steps:
1.When a user receives a cellular call and it is in the "ringing" state and application receives a video call which is reported to CallKit
2.User rejects the Cellular call from Callkit UI, Video call is also getting rejected.
3.Application is receiving performEndCallAction when user is rejecting the Cellular call
As a part of CXcallobserver Application is receiving call connected then disconnected for the cellular call
Irrespective of OS, the issue only reproduces on cellular calls if Live Voicemail is enabled.
Issue is not reproduced when Live Voicemail is disabled for cellular calls, and it is not reproducing on FaceTime calls, regardless of the Live Voicemail setting.
This results in a poor user experience because:
The recipient unintentionally misses the CallKit-reported call.
The initiator receives confusing and inaccurate status information, believing the recipient is busy rather than having chosen to decline the pending video call.
Our app receives a CallKit VoIP call. When the user taps “Answer”, the app launches and automatically connects to a real-time audio session using WebRTC or MobileRTC.
We would like to confirm whether the following flow (“CallKit Answer → app opens → automatic WebRTC or MobileRTC audio session connection”) complies with Apple’s VoIP Push / CallKit policy.
In addition, our service also provides real-time video-class functionality using the Zoom Meeting SDK (MobileRTC). When an incoming CallKit VoIP call is answered, the app launches and the user is automatically taken to the Zoom-based video lesson flow: the app opens → the user is landed on the Zoom Meeting pre-meeting room → MobileRTC initializes immediately. In the pre-meeting room, audio and video streams can already be active and MobileRTC establishes a connection, but the actual meeting screen is not joined until the user explicitly taps “Join”. We would like to confirm whether this flow for video lessons (“CallKit Answer → app opens → pre-meeting room (audio/video active) → user taps ‘Join’ → enter actual meeting”) is also compliant with Apple’s VoIP Push and CallKit policy.