Please help! I have a subscription IAP failing on tvOS 18.2 at:
func makePurchase(_ product: Product) async throws
{
let result = try await product.purchase() //ERROR OCCURS HERE (See error message below)
...
Xcode Console message: "Could not get confirmation scene ID for [insert my IAP id here]"
The IAP subscription was working fine on 18.1 and earlier, and the same IAP and code is also running fine on iOS 18.2. The tvOS error on 18.2 happens both in production and sandbox.
Are there any changes to StoreKit 2 which might cause this error?
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
I’m developing a self-management app using Family Controls, but I’ve encountered a FamilyActivityPciker's crash due to an XPC(or UIRemoteView) issue when there are too many tokens(maybe 200+ items) in a category. This makes bad UX, so I’m looking for a workaround.
(I guess that the crash reason is cross process memory limitations, such as App Extension 50MB memory limitation.)
A lot of web domains contribute to increase the number of tokens, However, even after clearing Safari’s browsing history, the tokens displayed in the FamilyActivityPicker remains unchanged.
Is there any workaround that a 3rd party developer can implement to address this issue? prevent FamilyActivityPicker crashes or reduce the number of web domain tokens?
For example, if there’s a way to reset the web domain tokens shown in FamilyActivityPicker from the Settings app, I could offer a help to users.
Does anybody have ideas?
Expanding SNS Category (29 items)
It succeeded.
Expanding Productivity & Finance (214 items)
It failed. The screen froze, then appears blank. When the number of items is around 100, the crash rate is 50%, but when the items are over 200, the crash rate is 100%.
Search Bar Problem
The search bar also has same problem. If the number of search results are small, it works good without any blank, but if there are a lot of search results (200+), the XCP crashes and the screen appears blank.
Code to Reproduce
import SwiftUI
import FamilyControls
struct ContentView: View {
@State private var selection = FamilyActivitySelection()
@State private var isPickerPresented: Bool = false
var body: some View {
VStack {
Button("Open Picker") {
isPickerPresented = true
}
}
.familyActivityPicker(isPresented: $isPickerPresented, selection: $selection)
}
}
Steps to Reproduce
Prepare a category that has 200+ items
Try to open the category in the picker
The screen will freeze, then appears blank.
Errors in Console
[u EDD60B83-5D2A-5446-B2C7-57D47C937916:m (null)] [com.apple.FamilyControls.ActivityPickerExtension(1204)] Connection to plugin interrupted while in use.
AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:2164 (
0 AXRuntime 0x00000001d46c5f08 _AXGetPortFromCache + 796
1 AXRuntime 0x00000001d46ca23c AXUIElementPerformFencedActionWithValue + 700
2 UIKit 0x0000000256b75cec C01ACC79-A5BA-3017-91BD-A03759576BBF + 1527020
3 libdispatch.dylib 0x000000010546ca30 _dispatch_call_block_and_release + 32
4 libdispatch.dylib 0x000000010546e71c _dispatch_client_callout + 20
5 libdispatch.dylib 0x00000001054765e8 _dispatch_lane_serial_drain + 828
6 libdispatch.dylib 0x0000000105477360 _dispatch_lane_invoke + 408
7 libdispatch.dylib 0x00000001054845f0 _dispatch_root_queue_drain_deferred_wlh + 328
8 libdispatch.dylib 0x0000000105483c00 _dispatch_workloop_worker_thread + 580
9 libsystem_pthread.dylib 0x0000000224f77c7c _pthread_wqthread + 288
10 libsystem_pthread.dylib 0x0000000224f74488 start_wqthread + 8
)
Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
When a VPN is active, RCS messaging does not work on iOS 18.
I work on an iOS VPN app, and we were very appreciative of the excludeCellularServices network flag that was released during the iOS 16 cycle. It's a great solution to ensure the VPN doesn't interfere with cellular network features from the cellular provider.
Separately - As a user, I'm excited that iOS 18 includes RCS messaging.
Unfortunately, RCS messaging is not working when our VPN is active (when checking on the iOS 18 release candidate). My guess is that RCS is not excluded from the VPN tunnel, even when excludeCellularServices is true. It seems like RCS should be added in this situation, as it is a cell provider service.
Can RCS be added as a service that is excluded from the VPN tunnel when excludeCellularServices is true? (I've also sent this via feedback assistant, as 15094270.)
PLATFORM AND VERSION
iOS
Development environment: Xcode 16.0, macOS 15.0.1
Run-time configuration: iOS 17.5.1
DESCRIPTION OF PROBLEM
We are working on an iOS application that utilizes the NEFilterDataProvider class from the Network Extension framework to control network flows. However, we are encountering an issue where network flows are not being detected as expected.
Here are the details of our setup:
We are using the NEFilterDataProvider class to filter network traffic in our app.
The filtering setup works well for certain flows/apps, but we cannot detect Facebook network flows as intended.
The app is correctly configured with the necessary entitlements, and we have set up the required App Groups and Network Extension capabilities.
We would like to request guidance on how to troubleshoot or resolve this issue. Could you provide insights on:
Whether there are any known limitations or conditions under which network flows may not be detected by NEFilterDataProvider.
Recommendations for additional debugging techniques to better understand why some flows might not be captured.
Recommendations for additional code to be added to detect some flows that might not be captured.
Any specific scenarios or configurations that might be causing this issue in iOS.
STEPS TO CHECK
Replace below code in FilterDataProvider.
Try running the app and set debugger in FilterDataProvider.
Launch Facebook app.
You will observe that no NEFilterFlow is detected in handleNewFlow for actions such as posts, reels, etc.
import NetworkExtension
class FilterDataProvider: NEFilterDataProvider {
let blockedDomains = [
"facebook.com"
]
override func startFilter(completionHandler: @escaping (Error?) -> Void) {
// Perform any necessary setup here.
DNSLogger.shared.log(message: "Filter started")
completionHandler(nil)
}
override func stopFilter(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) {
// Perform any necessary cleanup here.
DNSLogger.shared.log(message: "Filter stopped with reason: \(reason)")
completionHandler()
}
override func handleNewFlow(_ flow: NEFilterFlow) -> NEFilterNewFlowVerdict {
var url: URL?
if let urlFlow = flow as? NEFilterBrowserFlow {
url = urlFlow.url
}
else {
let urlFlow = flow as? NEFilterSocketFlow
url = urlFlow?.url
}
guard let hostName = url?.host else { return .allow() }
DNSLogger.shared.log(message: "Domain reveived: \(hostName)")
return .allow()
}
// Handle inbound data (data received from the network)
override func handleInboundData(from flow: NEFilterFlow, readBytesStartOffset offset: Int, readBytes: Data) -> NEFilterDataVerdict {
DNSLogger.shared.log(message: "Inbound data: \(readBytes)")
return .needRules()
}
// Handle outbound data (data sent to the network)
override func handleOutboundData(from flow: NEFilterFlow, readBytesStartOffset offset: Int, readBytes: Data) -> NEFilterDataVerdict {
// Inspect or modify outbound data if needed
// For example, you could log the data or modify it before sending
DNSLogger.shared.log(message: "Outbound data: \(readBytes)")
return .needRules()
}
override func handleRemediation(for flow: NEFilterFlow) -> NEFilterRemediationVerdict {
return .needRules()
}
override func handleRulesChanged() {
// Handle any changes to the rules
}
}
We persist ApplicationTokens in a storage container that ShieldConfigurationExtension has access to. In rare, cases all the ApplicationTokens for a user seem to change.
We know this because the Application parameter passed into configuration(shielding application: Application) -> ShieldConfiguration function has a Token that does not match (using == ) any of the ones we are persisting in storage.
Interestingly, the persisted ones still work, so I don't believe storage has gotten corrupted or anything. We can use them to add or remove shields, we can use them to display labels of the apps they represent, etc. But they don’t match what’s passed into the ShieldConfiguration extension. If the user goes into the FamilyPicker at this point and selects an app of a token that we are already persisting, the FamilyPickerSelection will have a token matching the new one that is passed into ShieldConfigurationExtension, not the one we persisted when they last selected that app.
This leads me to believe the tokens are updated/rotated in some cases. When and why does this happen, and how can we handle it gracefully?
On iOS 26 beta 3, after a user purchases an item, initiating a second order for the same product fails to process payment. The system returns the same transaction ID and displays an interface message stating: "You've already purchased this In-App Purchase. It will be restored for free."
I’ve tested this – not only did the legacy StoreKit finishTransaction method fail to work, but StoreKit2 finish method also malfunctioned.
When will Apple fix this issue? If unresolved, it will prevent a large number of users from making purchases normally, leading to disastrous consequences.
With the introduction of the Tides app in watchOS 11, users can now view information about tides and swells along the coast. Is this data accessible to developers via WeatherKit?
In the Tides app, the data source for tides and weather is shown as WeatherKit.
The functionality of authorizationStatus and requestAuthorization is completely broken. I'm using Xcode 15.3 and iOS 17.4.
Does anyone have a solution?
authorizationStatus doesn't behave as promised
Revoking authorization in the system-wide settings does not change the authorizationStatus while the app is not closed. Calls to center.authorizationStatus will still return .approved instead of .denied.
Even closing and relaunching the app after revoking authorization does not work: authorizationStatus is then .notDetermined when it should be .denied.
Tapping "Don't Allow" in the alert shown after an initial call to requestAuthorization leaves the authorizationStatus unchanged, i.e. at .notDetermined. This is contrary to the promised outcome .denied (defined as: "The user, parent, or guardian denied the request for authorization") and contrary to the definition of .notDetermined (defined as: "The app hasn’t requested authorization", when it just did).
Same issue when first tapping "Continue" followed by "Don't Allow" on the next screen.
As a consequence of authorizationStatus being broken, its publisher $authorizationStatus is worthless too.
requestAuthorization doesn't behave as promised
This is most likely a consequence of the corrupted authorizationStatus: when revoking authorization in the system-wide settings, a call to requestAuthorization opens the authorization dialogue instead of doing nothing. It is thus possible to repeatedly ask a user to authorize Family Controls.
Code sample
To reproduce, create a new SwiftUI app, add the "Family Controls" capability and a button executing the following task when tapped:
let center = AuthorizationCenter.shared
var status = center.authorizationStatus
print(status)
do {
try await center.requestAuthorization(for: .individual)
print("approved")
} catch {
print("denied")
}
status = center.authorizationStatus
print(status)
The error below started today 10/17/2024 (on iOS 18.1 beta 5/6/7 at least) in StoreKit sandbox testing. Outside code/app, I can't even login to the test account in settings->AppStore->Sandbox Account (goes through email/phone confirmation and then silently fails).
Tried a different password for a new sandbox test account with no success...Anyone experiencing this?
P.S. Status page (https://developer.apple.com/system-status/) shows some related outage from two days ago, but no current problem.
Error: Purchase did not return a transaction: Error Domain=ASDErrorDomain Code=530 "(null)" UserInfo={NSUnderlyingError=0x3009ca040 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed The authentication failed." UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=AMSErrorDomain Code=2 "Password reuse not available for account The account state does not support password reuse." UserInfo={NSDebugDescription=Password reuse not available for account The account state does not support password reuse., AMSDescription=Password reuse not available for account, AMSFailureReason=The account state does not support password reuse.}", "Error Domain=AMSErrorDomain Code=306 "Reached max retry count Task reached max retry count (3 / 3);" UserInfo={AMSDescription=Reached max retry count, AMSURL=..., NSDebugDescription=Reached max retry count Task reached max retry count (3 / 3);, AMSFailureReason=Task reached max retry count (3 / 3);, AMSStatusCode=200}" ), AMSDescription=Authentication Failed, NSDebugDescription=Authentication Failed The authentication failed., AMSFailureReason=The authentication failed.}}, storefront-country-code=USA, client-environment-type=Sandbox}
Our app includes showing external web service with WebView or Safari and returning to the app with custom URL scheme or universal link.
When we set "Hide and Require Face ID" feature which was available on iOS 18, neither custom URL scheme nor universal link activated the app.
If we only set "Require Face ID", the deep link worked properly.
Here is what we've tried:
Define custom URL scheme or universal link in the app
https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app
https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app
Implement external web service with one of the following frameworks
ASWebAuthenticationSession
https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/
SFSafariViewController
https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller
Safari
WKWebView
https://developer.apple.com/documentation/webkit/wkwebview
On iOS 18 device, install the app and set "Hide and Require Face ID"
Access external web page and tap the link which activates custom URL scheme or universal link
We expected the deep link to work, but the results were:
Custom URL scheme &amp; ASWebAuthenticationSession/SFSafariViewController/Safari
The system shows "Cannot open the page because the address is invalid"
Custom URL scheme &amp; WKWebView
Nothing happens when tapping the link
Universal link
Directed to the server with associated domain file, but the system doesn't call the app which is defined in the associated domain file
We tested the feature with the app built with Xcode16 beta 6, and the device with iOS 18 Seed 8(22A5350a).
Does hide app feature support custom URL scheme and universal link?
We have an application, which activates two network extensions (Content Filter, Transparent Proxy) during app launch which is written in Swift.
When we are activating multiple network extensions under the same app bundle, in Ventura and Sonoma, under Privacy and Security it shows "Details" button. On click of it we see below issues:
- It shows the app bundle name instead of respective network extension bundle name.
- On click of OK button, it adds only one extension under "Network -> Filters -> Filters & VPN" and only after machine restart, we can see both the extensions under this screen.
These issues are not seen in Sequoia. In Sequoia, it shows the extension names under the app name. There are separate controls to enable/add each of the extension.
Attached the screenshots of Sonoma and Sequoia for reference
Already submitted the feedback ticket. (FB16331169)
Hello!
In our App we found out the сrash at QuickLook after users updated their iPhones up to iOS 18.
Crash report:
SIGABRT 0x0000000000000000
Crashed: Thread
0 libsystem_kernel.dylib __abort_with_payload + 8
1 libsystem_kernel.dylib abort_with_payload_wrapper_internal + 104
2 libsystem_kernel.dylib abort_with_payload_wrapper_internal + 0
3 libobjc.A.dylib _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4 libobjc.A.dylib _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 0
5 libobjc.A.dylib weak_register_no_lock + 396
6 libobjc.A.dylib objc_initWeak + 440
7 UIKitCore -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1412
8 UIKitCore -[_UIRemoteViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 396
9 UIKitCore -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1180
10 UIKitCore -[_UISizeTrackingView _didMoveFromWindow:toWindow:] + 112
11 UIKitCore -[UIView(Internal) _didMoveFromWindow:toWindow:] + 712
12 UIKitCore __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 128
13 CoreAutoLayout -[NSISEngine withBehaviors:performModifications:] + 84
14 UIKitCore -[UIView _postMovedFromSuperview:] + 512
15 UIKitCore __UIViewWasRemovedFromSuperview + 136
16 UIKitCore -[UIView(Hierarchy) removeFromSuperview] + 248
17 QuickLook -[QLToolbarController setAccessoryView:animated:] + 576
18 QuickLook __55-[QLPreviewController _presentLoadedPreviewCollection:]_block_invoke + 120
19 QuickLookUICore QLRunInMainThread + 60
20 QuickLook -[QLPreviewController _presentLoadedPreviewCollection:] + 116
21 QuickLook __48-[QLPreviewController _presentPreviewCollection]_block_invoke_2 + 68
22 QuickLook (Missing)
23 libswift_Concurrency.dylib swift::runJobInEstablishedExecutorContext(swift::Job*) + 252
After research, we found out that a crash occurs in QuickLook when a user tries to open a file with unknown mimeType - application/octet-stream.
QuickLook convert that files to known type (for an example - application/pdf), but crashes for the first opening the file.
Any help would be greatly appreciated!
Hello,
I hope to find out more about how AppTransaction works on macOS, specifically about its internet connection requirements: if I use this to validate that the app is a legit purchase from the Mac App Store, I would not want it to have an always-on requirement just to validate.
Does AppTransaction require the user to always be online for AppTransaction.shared ?
When an app is downloaded from the Mac App Store, is the data needed for AppTransaction automatically embedded during that download, or is that data downloaded upon first launch of the app, therefore requiring an internet connection at launch time?
Once the data/receipt has been downloaded by AppTransaction, is it cached until the app's next update, or is it cleared at some time during the version's life and needs to be re-downloaded, therefore requiring an internet connection at launch?
Where is that receipt/data stored?
Also, if you don't mind me sneaking in this non-related but sort of related question, in terms of receipt validation:
Does macOS Sequoia's MAC address rotation feature affect receipt validation in any way when using IOKit?
Thank you kindly,
– Matthias
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
macOS
StoreKit
App Store Receipts
Mac App Store
Hello,
The purpose of "Screen Time Passcode" under Settings/Screen Time is to protect Screen Time preferences and it is asked every time the user updates Downtime, App Limits, Content & Privacy Restrictions and so on.
But the private passcode is not requested if the user disables Screen Time for a particular app (only Face ID or phone passcode is requested, but not the private Screen Time passcode).
I think this is a mistake, I think the purpose of a private Screen Time passcode is to protect all settings, including apps that use this API, right?
Is there any solution to this?
Thank you.
In our setup, our Transparent Proxy (call it TP1) funnels traffic to a helper process running on the same machine (call it Helper), which then actually sends out the traffic to the wider Internet. Now say there's another Transparent Proxy, TP2, on the same machine.
Assuming TP1 gets hold of the traffic first, the sequence would look like so:
Safari --> TP1 --> Helper --> TP2
We want to make it appear to TP2 that the incoming traffic is from Safari, rather than from the Helper process.
We are aware of the Network framework's setMetadata API, but this does not look appropriate for us to use here. The Helper process is pre-existing Golang code, which at best can interface with "pure" (ie BSD) sockets-based C code. In order to use the setMetadata API, looks like we will need to rewrite the entire networking logic to use nw_connection_t (or similar) API, which is too much work, so is infeasible for us to use.
Is there a way to make the setMetadata API work at a socket level? e.g., associate the metadata with a socket so that whatever data is sent out on the socket by the Helper will seem to TP2 to be coming from the desired source process.
Assuming there isn't such a way, please consider this an Enhancement Request to make it so!
Also, this reveals another complication: If and when this Enhancement is implemented, our own TP1 (which interepted the traffic in the first place) would end up thinking that the traffic is from Safari, so ends up re-intercepting it, causing a loop.
Safari --> TP1 --> Helper (invokes setMetadata) --> TP1 --> Helper ...
Which leads to the next Enhancement Request: Please extend the API to allow setting of the "last-hop" source process in addition to the original source application. If the last-hop source process info is set, our TP1 can query this property, see that it's coming from our own Helper process, and skip interception.
In summary, here are the Enhancement Requests:
Allow setMetadata API to work at a socket level
Allow setting of "last-hop" source process in the metadata, in addition to the original source application
More succinctly, please allow setting of metadata to cater to cases where the actual egress happens via a (different) helper process that uses pure C sockets based API.
I have also filed this as a Feedback with Apple, at FB16048393.
I'm unable to use third party Finder Sync Extensions on macOS 15, first beta. They do not appear in the Extensions section, that is now in System Settings - General - Login Items & Extensions.
I've just tried to update a project that uses SwiftData to Swift 6 using Xcode 16 beta 1, and it's not working due to missing Sendable conformance on a couple of types (MigrationStage and Schema.Version):
struct LocationsMigrationPlan: SchemaMigrationPlan {
static let schemas: [VersionedSchema.Type] = [LocationsVersionedSchema.self]
static let stages: [MigrationStage] = []
}
struct LocationsVersionedSchema: VersionedSchema {
static let models: [any PersistentModel.Type] = [
Location.self
]
static let versionIdentifier = Schema.Version(1, 0, 0)
}
This code results in the following errors:
error: static property 'stages' is not concurrency-safe because non-'Sendable' type '[MigrationStage]' may have shared mutable state
static let stages: [MigrationStage] = []
^
error: static property 'versionIdentifier' is not concurrency-safe because non-'Sendable' type 'Schema.Version' may have shared mutable state
static let versionIdentifier = Schema.Version(1, 0, 0)
^
Am I missing something, or is this a bug in the current seed? I've filed this as FB13862584.
Imagine we have an Xcode workspace containing two projects:
MyLibrary.xcodeproj holding a framework target
MyShortcutsApp.xcodeproj holding an app target which consumes MyLibrary framework
Both targets define App Intents and the ones from MyLibrary are exposed via AppIntentsPackage accordingly.
When trying to wrap the App Intent from framework as App Shortcut and passing localized AppShortcutPhrases I do see the following compile error:
".../Resources/de.lproj/AppShortcuts.strings:11:1: error: This AppShortcut does not map to a known action (MyLibraryIntent specified). (in target 'MyShortcutsApp' from project 'MyShortcutsApp')"
If I use the same localized App Shortcut phrases for an App Intent which is locally defined in the app target, everything works fine and also if I use the framework-provided App Intent in and App Shortcut without passing any localized phrases.
This is happening with Xcode 16.0 (16A242d), with 16.1 (16B40) and with 16.2 beta 2 (16C5013f).
I already raised this issue via FB15701779 which contains a sample project to reproduce and to further analyze the issue.
Thanks for any hint on how to solve that.
Frank
I have a document app built using SwiftData because frankly I'm too lazy to learn how to use FileDocument. The app's title is "Artsheets," and I'm using a document type that my app owns: com.wannafedor4.ArtsheetsDoc. The exported type identifier has these values:
Description: Artsheets Document
Identifier: com.wannafedor4.ArtsheetsDoc
Conforms to: com.apple.package
Reference URL: (none)
Extensions: artsheets
MIME Types: (none)
And the code:
ArtsheetsApp.swift
import SwiftUI
import SwiftData
@main
struct ArtsheetsApp: App {
var body: some Scene {
DocumentGroup(editing: Sheet.self, contentType: .package) {
EditorView()
}
}
}
Document.swift
import SwiftUI
import SwiftData
import UniformTypeIdentifiers
@Model
final class Sheet {
var titleKey: String
@Relationship(deleteRule: .cascade) var columns: [Column]
init(titleKey: String, columns: [Column]) {
self.titleKey = titleKey
self.columns = columns
}
}
@Model
final class Column: Identifiable {
var titlekey: String
var text: [String]
init(titlekey: String, text: [String]) {
self.titlekey = titlekey
self.text = text
}
}
extension UTType {
static var artsheetsDoc = UTType(exportedAs: "com.wannafedor4.artsheetsDoc")
}
I compiling for my iPhone 13 works, but then when creating a document I get this error:
Failed to create document. Error: Error Domain=com.apple.DocumentManager Code=2 "No location available to save “Untitled”." UserInfo={NSLocalizedDescription=No location available to save “Untitled”., NSLocalizedRecoverySuggestion=Enable at least one location to be able to save documents.}
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
Swift Packages
Uniform Type Identifiers
SwiftData
Hi,
please see detailed findings on:
https://github.com/utmapp/UTM/discussions/6799
basically apps that runned via Rosetta Linux now fail in kernels>=6.11 like the included in Ubuntu 24.10 with:
/media/rosetta/rosetta hello
assertion failed [hash_table != nullptr]: Failed to find vdso DT_HASH
(Vdso.cpp:78 get_vdso_dynamic_data)
Trace/breakpoint trap
the issue seems to be due to this commit.
https://github.com/torvalds/linux/commit/48f6430505c0b0498ee9020ce3cf9558b1caaaeb