<Apple Developer Program许可协议>已更新并需要查阅。若要更新现有App和提交新 App,账户持有人必须登录账户,查看并接受更新后的协议。
apple 会费到期 续费以后 无法获取app内购数据,经排查可能是这个协议没有签署,签署后多久可以重新获取到app内购数据。
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
Hi,
I'm encountering a weird issue on iOS that happens:
for files with diacritics in their name, like "Gòmez.pdf" or "Télé.mp4",
when the iPhone or iPad main language is not set to English,
if the file has been created with a relatively low-level Unix function like fopen() or copyfile().
Then, the file cannot be previsualized using QuickLook or opened using other apps. Most of the time it fails silently, but on some occasions I get the following error message: "You do not have permission to save the file "filename.pdf" in the folder "myFolder"".
The issue is present in, at least, iOS 16 and 26. It seems worse in iOS 26. It seems that all three conditions are required, I don't see the issue when the iPhone or iPad is set to use English as the main language. I also don't see the issue if I rename the files in the Files app.
I'm probably doing something wrong, but what can it be?
(it's kind of weird that my recommendation for users becomes: if you want to use international characters in your file names, you need to set the iPad language to English...)
Topic:
App & System Services
SubTopic:
Core OS
Tags:
APFS
Internationalization
QuickLook
Files and Storage
We are getting vulnerabilities for passkit generator, used for apple wallet creation. Could you please suggest how to resolve this issue
In our system we updated MIME with latest version but passkit is referring older version 1.4.1
npm audit report
mime <1.4.1
Severity: high
mime Regular Expression Denial of Service when MIME lookup performed on untrusted user input - https://github.com/advisories/GHSA-wrvr-8mpx-r7pp
No fix available
node_modules/mime
passkit *
Depends on vulnerable versions of mime
node_modules/passkit
2 high severity vulnerabilities
Some issues need review, and may require choosing
a different dependency.
Topic:
App & System Services
SubTopic:
Wallet
I'm trying to understand the terminology around forward vs backward references in CloudKit.
Say I have two record types:
User
LeaderboardScore (a score belongs to a user)
The score record stores a user reference:
score["user"] = CKRecord.Reference(
recordID: userRecordID,
action: .deleteSelf
)
So:
LeaderboardScore → User
The user record does not store any references to scores
From a data-model perspective:
Is this considered a forward reference (child → parent)?
Or a back reference, since the score is "pointing back" to its owner?
My use case is having leaderboard in my app and so i have created a user table to store all the users and a score table for saving the scores of each user of the app.
Hello,
We're seeing a high rate of providerDidReset callbacks in production across a large user base (iOS 16, 17, 18, and 26). I'd like to understand both the correct way to handle this delegate method and strategies to reduce its frequency.
Background
The callback occurs across all iOS versions we support and is not isolated to a specific device or region.
The callback can occur in any app state (foreground, background, inactive), however it is most dominant in the background state — particularly during VoIP push notification handling.
The callback is more prevalent during long app sessions — for example, when the app has been running continuously for a day or overnight.
We do not call CXProvider.invalidate() anywhere in our codebase explicitly.
After providerDidReset fires, subsequent transactions fail with CXErrorCodeRequestTransactionErrorUnknownCallUUID (error code 4).
Re-initializing the provider via initializeProvider() resolves this error.
Our Implementation
We use a singleton proxy class (CallKitProxy) that owns the CXProvider.
Below is a simplified version — some logging and non-essential parts have been removed for brevity.
@objcMembers
public final class CallKitProxy: NSObject {
private var cxProvider: CXProvider?
private let cxCallController: CXCallController
private let cxCallObserver: CXCallObserver
private override init() {
cxCallObserver = CXCallObserver()
cxCallController = CXCallController()
super.init()
initializeProvider()
cxCallObserver.setDelegate(self, queue: nil)
}
private func initializeProvider() {
let configuration = providerConfiguration()
cxProvider = CXProvider(configuration: configuration)
cxProvider?.setDelegate(self, queue: nil)
}
private func providerConfiguration() -> CXProviderConfiguration {
let soundName = SharedUDHelper.shared.string(forKey: .pushNotificationSoundNameForCall)
let sound = CallNotificationSounds(name: soundName ?? "ringtoneDefault")
let configuration = CXProviderConfiguration()
configuration.supportsVideo = true
configuration.maximumCallsPerCallGroup = 1
configuration.maximumCallGroups = 1
configuration.supportedHandleTypes = [.phoneNumber, .generic]
configuration.iconTemplateImageData = UIImage(
named: "callkit_mask",
in: .main,
compatibleWith: nil
)?.pngData()
configuration.ringtoneSound = sound.name
return configuration
}
public func requestTransaction(
action: CXCallAction,
completion: @escaping (Error?) -> Void
) {
let transaction = CXTransaction(action: action)
cxCallController.request(transaction) { error in
completion(error)
}
}
}
extension CallKitProxy: CXProviderDelegate {
public func providerDidReset(_ provider: CXProvider) {
// End any active calls, then re-initialize the provider
initializeProvider()
}
}
Questions
1. Is re-initializing the provider inside providerDidReset the correct approach?
The documentation states that providerDidReset signals the provider has been reset and all calls should be considered terminated. Should we be calling CXProvider.invalidate() on the old instance before creating a new one? Or is assigning a new CXProvider to cxProvider (which releases the old instance) sufficient?
2. What could be causing providerDidReset to fire so frequently, and how can we reduce it?
We're particularly concerned about cases triggered during VoIP push handling in the background and inactive states. Are there known conditions — such as provider configuration changes, app lifecycle events, or system memory pressure — that commonly trigger this callback? And are there any recommended patterns to make the provider more resilient in these scenarios?
Thank you.
In the WWDC 2019 session "Extended Runtime for WatchOS apps" the video talks about an entitlement being required to use the HR sensor judiciously in the background.
It provides a link to request the entitlement which no longer works: http://developer.apple.com/contect/request/health-monitoring
The session video is also quite hard to find these days.
Does anyone know why this is the case?
Is the API and entitlement still available?
Is there a supported way to run, even periodically, in the background on the Watch app (ignoring the background observer route which is known to be unreliable) and access existing HR sensor data
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags:
WatchKit
Health and Fitness
watchOS
Apple Watch
I have this code in my Virutalization application
let process = Process()
process.executableURL = URL(fileURLWithPath: "/usr/sbin/diskutil")
process.arguments = ["image", "create", "blank",
"--fs", "none", "--format",
"ASIF", "--size", "2GiB",
url.path
]
try process.run()
process.waitUntilExit()
if process.terminationStatus == 0 {
print("✅ Disk image creation succeeded.")
} else {
print("❌ Disk image creation failed with exit code \(process.terminationStatus)")
}
} catch {
print("Process failed to launch: \(error.localizedDescription)")
return
}
this code was working fine until Tahoe 26.2. with the update of 26.3 the system freezes at process.waitUntilExit()
The code never exits and i get beech balls. This is working fine with intel macs. i am getting the problem in apple silicon m4 mac mini.
Any help would be appreciated.
Hi,
I am submitting auto-renewable subscriptions for the first time for a brand new iOS app (never approved before).
Setup:
App ID has In-App Purchase capability enabled
Subscriptions created under a subscription group
All metadata (pricing, localization, availability) completed
Subscriptions currently show In Review
Testing via TestFlight build
Bundle ID matches App Store Connect
Using react-native-iap (StoreKit under the hood)
When calling:
await getSubscriptions({ skus })
I consistently get:
products fetched: 0
ProductsUnavailableError
Also, the app version page does not show the “In-App Purchases and Subscriptions” section.
Question:
For a brand new app, will StoreKit return empty products while the first subscriptions are in review?
Do the first subscriptions need to be approved and/or attached to a new app version before they become available in TestFlight sandbox?
Thanks for any clarification.
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
In-App Purchase
TestFlight
Description: I am developing a digital well-being application using the Screen Time API (FamilyControls, ManagedSettings, and DeviceActivity). I am encountering a critical issue where the ApplicationToken provided by the system to my app extensions suddenly changes, causing a mismatch with the tokens originally stored by the main application.
The Problem: When a user selects applications via FamilyActivityPicker, we persist the FamilyActivitySelection (and the underlying ApplicationToken objects) in a shared App Group container. However, we are seeing frequent cases where the token passed into:
ShieldConfigurationDataSource.configuration(shielding:in:)
ShieldActionDelegate.handle(action:for:completionHandler:)
...does not match (using ==) any of the tokens previously selected and stored.
IOS version: 26.2.1
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
Is there an FSKit sample available? I have tried sample code from https://github.com/KhaosT/FSKitSample on macOS Tahoe 26. I am able to compile the code, with signed/unsigned code, the mount always hangs on Apple Silicon macOS Tahoe 26.
Here is the mount script:
mkfile -n 100m dummy // create a dummy file
hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount dummy // mount the newly created file as a raw block device
mkdir /tmp/TestVol
mount -F -t MyFS diskX /tmp/TestVol
Any idea why the mount hangs.
While the recent news says "Developers who are distributing apps in Brazil can use the updated Declared Age Range API to obtain a user’s age category.", the guidance in the API did not mention Brazil. Can we confirm that
Should all iOS developers follow that guidance for Brazil compliance?
Will IsEligibleForAgeFeatures return true for in scope users in Brazil? (We don't have any explicit confirmation on this, and we cannot test if this is the case today in sandbox)
Hi!
We’ve had Live Caller ID Lookup in production for a while. We’re seeing backend RPS on our /queries endpoint much higher than our expected incoming call volume.
While testing with Console.app during an incoming call, it looks like iOS may still hit our service even when the caller number is already in the user’s Contacts - but I’m not 100% sure from logs alone.
Can you confirm:
Does iOS invoke Live Caller ID Lookup (i.e. call /queries) for every incoming call, including calls from saved Contacts?
If yes, is this simply expected framework behavior?
Thanks!
From the Feb 24 news, I understand that for all Apple users in Brazil with iOS26.2 and newer, isEligibleForAgeFeatures will eventually return true. Brazil is a "nonregulated region", and developers will need to handle all three situations of ask first/always share/never share.
Please correct me if I'm wrong above. A few questions follow on the eligibility check:
What's the return value of IsEligibleForAgeFeatures for a Brazilian user who has NOT touched the age range feature at all, thus hasn't picked one of the three options?
How can we test these cases? From the updated sandbox doc, there's more information on declined/approved, will those the same behaviors as a future Brazilian user? The doc used to say Texas, now it doesn't say any region.
On which date will Apple START to return true for IsEligibleForAgeFeatures for Brazilian users? I cannot find the exact date anywhere.
Will ALL of Brazil return true overnight, or is there some ramp up that developers need to be aware of?
Thanks a lot for sharing the guidance, and thanks in advance for more guidance to come!
A macOS privileged helper tool that uses SubProcess crashes on intel Macs (running macOS 13 - 15: unable to test on macOS 26 on intel) with the error that libswiftCompatibilitySpan.dylib cannot be loaded when built with XCode 26.3. The same helper tool works as expected with XCode 26.2.
The helper is installed using SMAppService.
When I remove the dependency for SubProcess, the crash no longer occurs (but important functionality is also disabled).
Problem description
Since macOS Sequoia, our users have experienced issues with multicast traffic in our macOS app. Regularly, the app starts but cannot receive multicast, or multicast eventually stops mid-execution. The app sometimes asks again for Local Network permission, while it was already allowed so. Several versions of our app on a single machine are sometimes (but not always) shown as different instances in the System Settings > Privacy & Security > Local Network list. And when several instances are shown in that list, disabling one disables all of them, but it does not actually forbids the app from receiving multicast traffic. All of those issues are experienced by an increasing number of users after they update their system from macOS 14 to macOS 15 or 26, and many of them have reported networking issues during production-critical moments.
We haven't been able to find the root cause of those issues, so we built a simple test app, called "FM Mac App Test", that can reproduce multicast issues. This app creates a GCDAsyncUdpSocket socket to receive multicast packets from a piece of hardware we also develop, and displays a simple UI showing if such packets are received. The app is entitled with "Custom Network Protocol", is built against x86_64 and arm64, and is archived (signed and notarized). We can share the source code if requested.
Out of the many issues our main app exhibits, the test app showcases some:
The app asks several times for Local Network permission, even after being allowed so previously. After allowing the app's Local Network and rebooting the machine, the System Settings > Privacy & Security > Local Network does not show the app, and the app asks again for Local Network access.
The app shows a different Local Network Usage Description than in the project's plist.
Several versions of the app appear as different instances in the Privacy list, and behave strangely. Toggling on or off one instance toggles the others. Only one version of the app seems affected by the setting, the other versions always seem to have access to Local Network even when the toggle is set to off.
We even did see messages from different app versions in different user accounts. This seems to contradicts Apple's documentation that states user accounts have independent Privacy settings.
Can you help us understand what we are missing (in terms of build settings, entitlements, proper archiving...) so our app conforms to what macOS expects for proper Local Network behavior?
Related material
Local Network Privacy breaks Application: this issue seemed related to ours, but the fix was to ensure different versions of the app have different UUIDs. We ensured that ourselves, to no improvement.
Local Network FAQ
Technote TN3179
Steps to Reproduce
Test App is developed on Xcode 15.4 (15F31d) on macOS 14.5 (23F79), and runs on macOS 26.0.1 (25A362). We can share the source code if requested.
On a clean install of macOS Tahoe (our test setup used macOS 26.0.1 on a Mac mini M2 8GB), we upload the app (version 5.1).
We run the app, make sure the selected NIC is the proper one, and open the multicast socket. The app asks us to allow Local Network, we allow it. The alert shows a different Local Network Usage Description than the one we set in our project's plist.
The app properly shows packets are received from the console on our LAN.
We check the list in System Settings > Privacy & Security > Local Network, it includes our app properly allowed.
We then reboot the machine. After reboot, the same list does not show the app anymore.
We run the app, it asks again about Local Network access (still with incorrect Usage Description). We allow it again, but no console packet is received yet. Only after closing and reopening the socket are the console packets received.
After a 2nd reboot, the System Settings > Privacy & Security > Local Network list shows correctly the app. The app seems to now run fine.
We then upload an updated version of the same app (5.2), also built and notarized. The 2nd version is simulating when we send different versions of our main app to our users. The updated version has a different UUID than the 1st version.
The updated version also asks for Local Network access, this time with proper Usage Description.
A 3rd updated version of the app (5.3, also with unique UUID) behaves the same. The System Settings > Privacy & Security > Local Network list shows three instances of the app.
We toggle off one of the app, all of them toggle off. The 1st version of the app (5.1) does not have local network access anymore, but both 2nd and 3rd versions do, while their toggle button seems off.
We toggle on one of the app, all of them toggle on. All 3 versions have local network access.
Unexpected behavior encountered when scanning NFC tags.
Imagine a link shortener web service where users can create lots of different URLs that are hosted on the same domain eg, https://short.com/unique-path
The service has optional App Clip capability -- users can select any of their links and have the service create an App Clip for the selected link(s).
Users can encode their URLs into NFC tags and have their customers scan NFC tags.
Let's take just two URLs for example:
https://short.com/foo
https://short.com/bar
The /foo link does have an App Clip associated with it while /bar does not have it. Each link has been encoded into appropriate NFC tag.
Expected behavior when scanning from an iPhone:
/foo -- shows an App Clip popup.
/bar -- shows a "Open in Safari" default notification.
What's actually happening
/foo -- opens App Clip poput with correct metadata (title, subtitle, image) which is totally expected behavior.
/bar (the one that doesn't have app clip associated with it) -- opens an App-Clip-like popup with the following error: CPSErrorDomainError 2 (see attachment below)
So for some reason when someone scans an NFC tag with a URL that is not an App Clip and never has been -- it always shows that error regardless whether the URL exists or does not exist. I've tried few different/random URLs (which don't have an App Clip associated with it) and all of them show the same error.
Additional details:
All links use the same domain and URL format: domain.com/path where path is a short string of random a-Z characters.
All App Clips are created at the same iOS app.
AASA is good: Cache and Debug -- both green.
This issue has happened to lots of users on lots of different iPhones and iOS'.
Since the issue's been happening to lots of different users on different iPhone(s)/iOS' no sysdiagnose is attached. Actually it works the same on every device/iOS we've tried.
Before submitting the issue, I've found few other developers reporting the same issue.
What's interesting though is none of the links I've went through comes with a definite answer and it seems like this issue just randomly comes and goes without any specific changes on the server and/or iOS app.
Dropping the links of similar issues below.
https://developer.apple.com/forums/thread/671433
https://developer.apple.com/forums/thread/665969
https://developer.apple.com/forums/thread/775316
https://developer.apple.com/forums/thread/764545
Background:
My app uses a third-party SDK for payments, and it uses Original StoreKit internally for IAP payments. Now I'm getting ready to migrate to StoreKit2, and during the transition, users may use either method to initiate payments, and there's no way to avoid the coexistence of StoreKit2 and Original StoreKit.
Problem:
When a user has an unfinished transaction, if the app is restarted, both StoreKit2 and Original StoreKit will receive a notification of the transaction:
Original StoreKit's '-paymentQueue:updatedTransactions:' method
StoreKit2's 'Transaction.updated' method
resulting in duplicate calls to the shipping API.
My current treatment is to only add '-paymentQueue:updatedTransactions:' to listen for unfinished transactions. Even if the user is using StoreKit2 to initiate the payment, if the transaction is not Finished, it will be fetched via this method after restarting the app to process this transaction.
Is this approach feasible and are there any best practices for this scenario?
To summarize:
Is it feasible to fetch unfinished StoreKit2 transactions via Original StoreKit methods when StoreKit2 coexists with Original StoreKit? Is there a recommended way
I want to track down which part of an app contacts a given domain listed in its App Privacy Report.
Following the instructions given here I am able to capture a packet trace, but traffic to the domain in question is encrypted using QUIC.
Is there a way to insert e.g. mitmproxy into the capture process in order to get hold of the SSLKEYLOGFILE so that I can decrypt the traffic?
I haven’t been able to get this to work at any level! I’m running into multiple issues, any light shed on any of these would be nice:
I can’t implement a bloom filter that produces the same output as can be found in the SimpleURLFilter sample project, after following the textual description of it that’s available in the documentation. No clue what my implementation is doing wrong, and because of the nature of hashing, there is no way to know. Specifically:
The web is full of implementations of FNV-1a and MurmurHash3, and they all produce different hashes for the same input. Can we get the proper hashes for some sample strings, so we know which is the “correct” one?
Similarly, different implementations use different encodings for the strings to hash. Which should we use here?
The formulas for numberOfBits and numberOfHashes give Doubles and assign them to Ints. It seems we should do this conversing by rounding them, is this correct?
Can we get a sample correct value for the combined hash, so we can verify our implementations against it?
Or ignoring all of the above, can we have the actual code instead of a textual description of it? 😓
I managed to get Settings to register my first attempt at this extension in beta 1. Now, in beta 2, any other project (including the sample code) will redirect to Settings, show the Allow/Deny message box, I tap Allow, and then nothing happens. This must be a bug, right?
Whenever I try to enable the only extension that Settings accepted (by setting its isEnabled to true), its status goes to .stopped and the error is, of course, .unknown. How do I debug this?
While the extension is .stopped, ALL URL LOADS are blocked on the device. Is this to be expected? (shouldFailClosed is set to false)
Is there any way to manually reload the bloom filter? My app ships blocklist updates with background push, so it would be wasteful to fetch the filter at a fixed interval. If so, can we opt out of the periodic fetch altogether?
I initially believed the API to be near useless because I didn’t know of its “fuzzy matching” capabilities, which I’ve discovered by accident in a forum post. It’d be nice if those were documented somewhere!
Thanks!!
I’m encountering a persistent issue with my Network Extension (specifically NEFilterDataProvider) and would really appreciate any insights.
The extension generally works as expected, but after some time — especially after sleep/wake cycles or network changes — a global network outage occurs. During this state, no network traffic works: pings fail, browsers can’t load pages, etc. As soon as I stop the extension (by disabling it in System Preferences), the network immediately recovers. If I re-enable it, the outage returns instantly.
I’ve also noticed that once this happens, the extension stops receiving callbacks like handleNewFlow(), and reinstalling the app or restarting the extension doesn’t help. The only thing that resolves the issue is rebooting the system. After reboot, the extension works fine again — until the problem reoccurs later.
I asked AI about this behavior, and it suggested the possibility that the kernel might have marked the extension as untrusted, causing the system to intentionally block all network traffic as a safety mechanism.
Has anyone experienced similar behavior with NEFilterDataProvider? Could there be a way to detect or prevent this state without rebooting? Is there any logging or diagnostic data I should collect when it happens again?
Any guidance or pointers would be greatly appreciated. Thanks in advance!