Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

交易无法结束 (Transactions Unable to Finish)
有一个用户反馈7月8日充值了3笔后一直无法发起新的购买,总是提示已经购买。我们查了是之前的交易无法结束,我们使用StoreKit2,已经调用await transaction.finish()成功结束交易了,但是每次发起新支付时,Transaction.unfinished还会返回之前已完成的交易信息。 是设备或AppleID的问题么?用户尝试了重启设备、重新登录AppleID都没用。有什么办法解决呢? 用户无法结束的苹果交易id为:200002703899379、200002703900716、200002703902023。 A user reported that after making 3 purchases on July 8th, they have been unable to initiate new purchases, always receiving a prompt that the item has already been purchased. Upon investigation, we found that the previous transactions couldn't be finalized. We use StoreKit2 and have successfully called await transaction.finish() to end the transactions. However, every time a new payment is initiated, Transaction.unfinished still returns information about the previously completed transactions. Could this be an issue with the device or Apple ID? The user has tried restarting the device and re-logging into their Apple ID, but these attempts were unsuccessful. Is there any way to resolve this? The Apple transaction IDs that the user is unable to finalize are: 200002703899379, 200002703900716, 200002703902023.
6
6
1.2k
22h
Message Filter Extension Not Working on iOS 26.1
Hello, We are using a Message Filter Extension (ILMessageFilterExtension) to classify SMS/iMessage content (junk vs allow) in our app. After testing on iOS 26.1, we want to confirm whether there are any behavioral, performance, or API-level changes that impact message filtering, such as: Changes in how often the filter extension is invoked Differences in classification accuracy or system overrides New privacy, entitlement, or permission-related restrictions Execution time limits or memory constraints Any changes specific to iMessage vs SMS filtering We did not find any explicit mention of Message Filter Extensions in the iOS 26.1 release notes and would like to confirm whether the existing behavior from previous iOS versions remains unchanged. Has Apple introduced any known or undocumented changes in iOS 26.1 that developers should be aware of when supporting Message Filter Extensions? Sometime I also found unpredictable behaviour on iOS version 18.5 or below, like sometime it works but sometimes starts working. Thanks in advance for any guidance.
2
0
127
23h
Message Filter Extension not working on iOS 26.0 and above
Hello, We are using a Message Filter Extension (ILMessageFilterExtension) to classify SMS/iMessage content (junk vs allow) in our app. After testing on iOS 26.1, we want to confirm whether there are any behavioral, performance, or API-level changes that impact message filtering, such as: Changes in how often the filter extension is invoked Differences in classification accuracy or system overrides New privacy, entitlement, or permission-related restrictions Execution time limits or memory constraints Any changes specific to iMessage vs SMS filtering We did not find any explicit mention of Message Filter Extensions in the iOS 26.1 release notes and would like to confirm whether the existing behavior from previous iOS versions remains unchanged. Has Apple introduced any known or undocumented changes in iOS 26.1 that developers should be aware of when supporting Message Filter Extensions? Sometime I also found unpredictable behaviour on iOS version 18.5 or below, like sometime it works but sometimes starts working. Thanks in advance for any guidance.
1
0
99
1d
Files and Storage Resources
General: Forums subtopic: App & System Services > Core OS Forums tags: Files and Storage, Foundation, FSKit, File Provider, Finder Sync, Disk Arbitration, APFS Foundation > Files and Data Persistence documentation Low-level file system APIs are documented in UNIX manual pages File System Programming Guide archived documentation About Apple File System documentation Apple File System Guide archived documentation File system changes introduced in iOS 17 forums post On File System Permissions forums post Extended Attributes and Zip Archives forums post Unpacking Apple Archives forums post Creating new file systems: FSKit framework documentation Building a passthrough file system sample code File Provider framework documentation Finder Sync framework documentation App Extension Programming Guide > App Extension Types > Finder Sync archived documentation Managing storage: Disk Arbitration framework documentation Disk Arbitration Programming Guide archived documentation Mass Storage Device Driver Programming Guide archived documentation Device File Access Guide for Storage Devices archived documentation BlockStorageDeviceDriverKit framework documentation Volume format references: Apple File System Reference TN1150 HFS Plus Volume Format Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
2.4k
1d
Getting a basic URL Filter to work
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!!
32
1
2.5k
1d
UNLocationNotificationTrigger not firing reliably in China – possible coordinate system mismatch
Problem Description Location-based notifications added with UNLocationNotificationTrigger and CLCircularRegion do not fire consistently when the user enters the monitored region. Sometimes they work, sometimes they do not. In tests where the user physically enters the region and waits several days, the notification often never triggers. What we’ve confirmed Notification permission is granted Location permission is set to “Always” The notification request is successfully added (no error from UNUserNotificationCenter.add) Pending notification requests are present when checked with getPendingNotificationRequests CLLocationManager didEnterRegion / didExitRegion work when we monitor the same region via startMonitoring(for:) UNLocationNotificationTrigger behavior is inconsistent and unreliable in our tests Reproduction Steps Launch the app and grant notification permission and “Always” location permission Add a region notification (either by current GPS location or by selecting a point from MKLocalSearch) Leave the monitored region Later, physically return into the region Expected: a notification is delivered when entering the region Actual: the notification often does not appear, even after waiting days Our Hypothesis: Coordinate System Mismatch in China We suspect the issue may be related to coordinate systems in mainland China. In China, Apple MapKit and MKLocalSearch use GCJ-02 (the “Mars” coordinate system required by local regulations). Device GPS and CLCircularRegion / Core Location use WGS-84. If an app supplies GCJ-02 coordinates to CLCircularRegion (e.g. from MapKit or search), the region center may be offset by hundreds of meters from the actual WGS-84 position. That could make the system’s “inside region” check fail, even when the user is physically inside the intended area. Questions for Apple Does CLCircularRegion (and therefore UNLocationNotificationTrigger) expect coordinates in WGS-84? If so, should apps in China convert GCJ-02 to WGS-84 before passing coordinates to CLCircularRegion? Is there any official guidance or documentation for handling coordinate systems when using location-based notifications in mainland China? Are there known limitations or special requirements for UNLocationNotificationTrigger in China (e.g. coordinate system, accuracy, or system behavior) that could explain intermittent or missing triggers?
0
1
50
1d
Issue Retrieving Bound Cards in Wallet Extension Non-UI Extension
Hi, I’m encountering an issue in my app’s Wallet Extension, specifically within the Non-UI Extension, where we are unable to retrieve payment passes bound to a user’s account. The same code that successfully retrieves these bound cards in the main app does not work when used in the Non-UI Extension. Case-ID: 8932090 Steps to Reproduce: Set up In-App Provisioning: Ensure that the app has the necessary In-App Provisioning permissions. This functionality works correctly in the main app, confirming that the permissions are properly configured. Configure Wallet Extensions: Follow the Wallet Extensions documentation to configure the app, including all required settings for the Non-UI Extension. Add Code to Retrieve Payment Passes: In the main app’s LoginView, implement the following code in the handleLogin() method to retrieve payment passes: // Get the identifiers of payment passes that already exist in Apple Pay. paymentPassLibrary = self.passLibrary.passes(of: .secureElement) for pass in paymentPassLibrary { if let identifier = pass.secureElementPass?.primaryAccountIdentifier { if pass.isRemotePass && pass.deviceName.localizedCaseInsensitiveContains("Apple Watch") { remotePassIdentifiers.insert(identifier) } else if !pass.isRemotePass { passIdentifiers.insert(identifier) } } } Verify Functionality in Main App: Run the app and verify that the code successfully retrieves the payment passes bound to the user’s account. Implement Code in Non-UI Extension: Add the same code to the Non-UI Extension, specifically in the WNonUIExtHandler class within the override func status(completion: @escaping (PKIssuerProvisioningExtensionStatus) -> Void) method. Test in Wallet Extension: Run the Wallet Extension and observe that the payment passes are not retrieved when the code is executed in the Non-UI Extension. Has anyone encountered a similar issue or can provide insight into why the code might not work in the Non-UI Extension compared to the main app? Support Information: iOS Version: 17.5.1 Development environment: Xcode 15.4 (15F31d), macOS 14.3 (23D56) Any help or suggestions would be greatly appreciated. Thank you!
6
0
1.3k
1d
Apple Wallet Extension Implementation
Hello Dear Network, We are developing a banking application and are implementing Apple Wallet In-App Provisioning with Wallet UI and Non-UI extensions. Our App Store submission fails with the error: "Missing entitlement com.apple.developer.payment-pass-provisioning" for both Wallet UI and Non-UI extensions. In the Apple Developer portal, we do not see the "Apple Pay" or "In-App Provisioning" capabilities available for our App ID or extension App IDs. We would like to request enablement of: Apple Pay Payment Pass Provisioning In-App Provisioning for our Apple Developer Team and related App IDs. Please let us know what we need to do for can upload build with that Entitlements, what can be problem? Thank you.
1
0
162
1d
Apple Pay v2 (signedTransactionInfo) : how to verify new token format and migrate from legacy EC_v1?
I’m updating a legacy application that used Apple Pay v1 token format, and in my new revamped version I’m now receiving the newer Apple Pay v2 format. The old (v1) payload looked like this: php { "version": "EC_v1", "data": "...", "signature": "...", "header": { "ephemeralPublicKey": "...", "publicKeyHash": "...", "transactionId": "..." } } In the new revamp (v2), Apple Pay returns this instead: php { "signedTransactionInfo": "eyJhbGciOiJFUzI1NiIsIng1YyI6WyJNSUlF..." } From what I understand: v1 tokens were elliptic-curve encrypted JSON objects containing a header and signature. v2 tokens seem to be JWS (JSON Web Signature) strings using the ES256 algorithm, possibly containing transaction and subscription details inside. Questions Is there any official Apple documentation or migration note explaining the move from EC_v1 → signedTransactionInfo? How should I verify or decode the new signedTransactionInfo payload? Should the verification now use Apple’s public keys instead of the legacy Merchant ID certificate? Are there any example implementations or SDKs that can handle both v1 and v2 formats during migration? Is there a recommended way to maintain backward compatibility while transitioning existing users? Goal Ensure that my revamped app can handle Apple Pay v2 tokens securely while keeping the legacy v1 integration functional until all users are migrated.
1
0
448
1d
Apple Pay - Missing ECIIndicator in PassKit Payment token
Hello, I'm using PassKit with to perform Apple Pay payment in a financial application. Our approach are: On iOS application, define PKMerchantCapability threeDSecure and credit, perform apple pay experience and get the encrypted response. On PCI service, receive the encrypted data Payment token, decrypt this data, and use to perform the payment. The problem is, in MasterCard transaction the eciIndicator is missing. I want to know if has some rule or problem about it.
1
0
245
1d
In App Provisioning PKErrorHTTPResponseStatusCodeKey=500
Hello, we are developing in app provisioning of our American Express network cards. After clicking add to apple wallet in our app, I launch the PKAddPaymentPassViewController and click next. It loads for a few seconds and then I get: [<private>] ProvisioningOperationComposer: Step '<private>' failed with error Error Domain=PKProvisioningErrorDomain Code=5 UserInfo={PKErrorHTTPResponseStatusCodeKey=500} Does anyone have any insight on what this error means?
3
1
879
1d
readValueWithCompletionHandler: limitations?
Are there some undocumented (or, well, documented, but overlooked by me) prerequisites to the readValueWithCompletionHandler: method? The reason I ask is that occasionally I am getting the Read/Write operation failed error in the callback, even in cases where direct, non-deferred reading of the value worked properly. It seems to happen very consistently with some accessories and characteristics, not randomly; thus, it is not likely a temporary quirk in the communication with the device. Probably I am overlooking something of importance, but it does not make a good sense to me. My code (is it right, or can you see anything wrong in there?) // in an HMCharacteristic category if ([self.properties containsObject:HMCharacteristicPropertyReadable]) { id val=self.value, ident=[NSString stringWithFormat:@" [%@] %@ (%@)", self.uniqueIdentifier, self.localizedDescription, self.service.accessory.name]; NSLog(@"nondeferred '%@'%@", val, ident); if (self.service.accessory.reachable) { [self readValueWithCompletionHandler:^(NSError * _Nullable error) { if (error) NSLog(@"deferred ERROR %@ -> %@", ident, error); else NSLog(@"deferred '%@'%@", self.value, ident); }]; } } for most accessories/characteristics works properly, but for some of them I am consistently getting results like nondeferred '70.5' [64998F70-9C11-502F-B8B4-E99DC5C3171B] Current Relative Humidity (Vlhkoměr TH) deferred '70.5' ERROR [64998F70-9C11-502F-B8B4-E99DC5C3171B] Current Relative Humidity (Vlhkoměr TH) -> Error Domain=HMErrorDomain Code=74 "Read/Write operation failed." UserInfo={NSLocalizedDescription=Read/Write operation failed.} Do I do something wrong in my code, or is that normal with some devices? If the latter, is there perhaps a way to know beforehand that I should not use readValueWithCompletionHandler: (for it is bound to fail anyway), and instead I should simply use self.value non-deferred? For some time it seemed to me it happens with bridged accessories, but not really, this hypothesis proved wrong by further testing. Thanks!
3
0
121
1d
Getting a list of deleted CloudKit records with an expired change token
Usually, when you call fetchRecordZoneChanges with the previous change token, you get a list of the record ID’s that have been deleted since your last fetch. But if you get a changeTokenExpired error because it‘s been too long since you last fetched, you have to call fetch again without a token. For my specific application, I still need to know, though, if any records have been deleted since my last sync. How can I get that information if I no longer have a valid change token?
5
0
255
1d
CKSyncEngine initial sync on a new device
I have implemented CKSyncEngine synchronization, and it works well. I can update data on one device and see the changes propagate to another device quickly. However, the initial sync when a user downloads the app on a new device is a significant issue for both me and my users. One problem is that the sync engine fetches deletion events from the server. On a new device, the local database is empty, so these deletions are essentially no-ops. This would not be a big problem if there were only a few records or if it was fast. I measured the initial sync and found that there are 150 modified records and 62,168 deletions. Counting these alone takes over five minutes, even without processing them. The deletions do nothing because the local database has nothing to delete, yet they still add a significant delay. I understand that the sync engine ensures consistency across all devices, but five minutes of waiting with the app open just to insert a small number of records is excessive. The problem would be worse if there were tens of thousands of new records to insert, since downloading and saving the data would take even longer. This leads to a poor user experience. Users open the app and see data being populated for several minutes, or they are stuck on a screen that says the data is being synchronized with iCloud. I am wondering if there is a way to make the sync engine ignore deletion events when the state serialization is nil. Alternatively, is there a recommended method for handling initial synchronization more efficiently? One idea I considered is storing all the data as a backup in iCloud Documents, along with the state serialization at that point in time. When a user opens the app for the first time, I could download the file, extract the data, and set the state serialization to the saved value. I am not sure if this would work. I do not know if state serialization is tied to the device or if it only represents the point where the sync engine left off. My guess is that it might reference some local device storage. I am not sure what else to try. I could fetch all data using CloudKit, create the sync engine with an empty state serialization, and let it fetch everything again, but that would still take a long time. My records are very small, mostly a date when something happened and an ID referencing the parent. Since the app tracks watched episodes, I only store the date the user watched the episode and the ID of that episode.
4
0
185
1d
Shortcuts Automation Trigger Transaction Timeouts
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
15
24
2.7k
1d
preorderDate no longer being returned
My app is in the final stages of testing for release in two days. We did a preorder campaign, and implemented a preorder bonus by checking the preorderDate field returned from the verification result returned by the AppTransaction.shared. This worked well at the time of implementation and initial testing. Now, our QA team is reporting that the preorder bonus is not popping up for them, and we have confirmed it on the developer side that the StoreKit back end is no longer returning a valid preorderDate even though the app is clearly preordered when you check it on the app store. The developer accounts are in the US and App Store Connect clearly shows the US status as preorder. Are there any circumstances where preorderDate might be nil even if the user's app store shows preorder? Any other way we can proceed here? We can message our users that we are going to have to delay a preorder bonus on iOS, but eventually we need to get to a solution that doesn't involve us entering in all our iOS preorders by hand to give them a bonus item.
1
0
58
1d
Local Updates to Live Activities ignored after push update
I'm building out a live activity that has a button which is meant to update the content state of the Live Activity. It calls a LiveActivityIntent that runs in the app process. The push server starts my live activity and the buttons work just fine. I pass the push token back to the server for further updates and when the next update is pushed by the server the buttons no longer work. With the debugger I'm able to verify the app intent code runs and passes the updated state to the activity. However the activity never updates or re-renders. There are no logs in Xcode or Console.app that indicates what the issue could be or that the update is ignored. I have also tried adding the frequent updates key to my plist with no change. I'm updating the live activity in the LiveActivityIntent like this: public func perform() async throws -> some IntentResult { let activities = Activity<WidgetExtensionAttributes>.activities for activity in activities { let currentState = activity.content.state let currentIndex = currentState.pageIndex ?? 0 let maxIndex = max(0, currentState.items.count - 1) let newIndex: Int if forward { newIndex = min(currentIndex + 1, maxIndex) } else { newIndex = max(currentIndex - 1, 0) } var newState = currentState newState.pageIndex = newIndex await activity.update( ActivityContent( state: newState, staleDate: nil ), alertConfiguration: nil, timestamp: Date() ) } return .result() } To sum up: Push to start -> tap button on activity -> All good! Push to start -> push update -> tap button -> No good...
2
0
69
1d