I'm considering developing an app where users can create their own subscription plans by freely setting their prices, similar to YouTube's membership feature.
I understand that in-app purchases must be used to unlock features within the app. With that in mind, I searched for APIs to enable this functionality but couldn't find relevant information.
When I contacted Apple directly, they mentioned that they couldn't provide specific answers unless the app is under review.
If anyone has knowledge about the following points, I would greatly appreciate your response:
Is it possible to implement a feature similar to YouTube's membership using in-app purchase APIs?
If it's not feasible with in-app purchases, is it allowed to use external payment services like Stripe?
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 am trying to use the NFCTagReaderSession to SELECT the master file of a ISO 7816 smartcard by sending a corresponding NFCISO7816APDU after connecting to the card, but I am running into errors:
Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}
Error Domain=NFCError Code=103 "Session invalidated" UserInfo={NSLocalizedDescription=Session invalidated}
I know that in order to communicate with a NFCISO7816Tag I need to declare the supported AIDs in the Info.plist, but what am I supposed to declare here?
I created an app and submitted to app store for review and got a rejection with "4.3(a) - Design - Spam".
This one was created for brand new, and I didn't find any similar apps in App store. I searched in this forum but am not sure if it is because I used flutter to build my app?
How could I get a bit more specific detail why it got rejected?
Guideline 4.3(a) - Design - Spam
We noticed your app shares a similar binary, metadata, and/or concept as apps submitted to the App Store by other developers, with only minor differences.
Submitting similar or repackaged apps is a form of spam that creates clutter and makes it difficult for users to discover new apps.
Next Steps
Since we do not accept spam apps on the App Store, we encourage you to review your app concept and submit a unique app with distinct content and functionality.
I have several ObjC based apps in the App Store and used to validate the receipt file inside the app in my code, and then reject it with exit(173) if it's invalid, which did trigger macOS to update the receipt if possible.
This isn't working any more in recent macOS versions, where the user is instead just told that the app is damaged, and they need to re-install it manually. Which sucks.
So I wanted to update my code. I read about SKReceiptRefreshRequest, which is supposed to re-download and install the receipt file, if I understand it correctly.
I implemented the code but now have trouble verifying that it works as intended, and does this in a user friendly way.
I found in my tests that macOS now caches the receipt in ~/Library/Caches/com.apple.appstoreagent/fsCachedData and then hardlinks the file into the app.
BTW: Sadly, this also requires that the app is located on the startup volume or the system will refuse to install the receipt, which wasn't a requirement in past times.
Now, if the receipt is already present in the cache folder, then my code works - the receipt gets re-linked.
But what if the cached receipt isn't there, yet? Such as that the user had copied the app from another Mac over to a freshly installed Mac? In the past, when the user then launched the app on the new Mac, he'd be prompted to login to the MAS and if that worked, the receipt would get installed and the app launched.
Basically, the question is: What if the receipt validation fails in my app and I request a new receipt, but the user has not yet logged into MAS (e.g. new computer)?
To simulate this, I logging out of the MAS and TestFlight, deleting all copies of the app and then run the app that I had copied from another Mac where it was authorized with a valid receipt for that device.
If I do this with the old version that uses exit(173), I get these two messages in macOS 15.2:
The second one is especially terrible because it shows the translocated path, which the average user surely get quite confused, and then maybe even search in vain for the app in there and get frustrated. But that's out of my hands. Sigh.
Now, that was proving that the old method with exit(173) isn't working any more and needs to be changed in my apps.
Since I'm still developing (testing) this new behavior, the app is therefore not in the MAS yet - the only way for me to test this is to use TestFlight. However, running a Testflight app copied from another Mac leads to this error:
That is not helpful in simulating what would happen if this app was released in the MAS. This won't let me find out what happens if my app is run on a Mac where the receipt fails and I ask it to load it via SKReceiptRefreshRequest and if the user is NOT yet logged into the MAS account for this purchased app of his/hers.
That leaves only one option: Release the app with untested code and hope for the best.
Contrary to this new behavior, the old method did let me test this easily because I would just use the special App Store tester account with the MAS app, i.e. the built MAS app would, when I launched it locally, request for a login and I'd provide my tester's account. But this isn't available any more, apparently.
What a mess.
Currently, we use UIDocumentPickerViewController to read the user's connected sdcard. However, this requires the user to select manually, and the event cannot be monitored.
But recently I found that ImageCaptureCore's ICDeviceBrowserDelegate can monitor the plug-in and unplug events in the didAddDevice callback, but cannot obtain the path of the storage card.
I wonder if there is a way to combine the advantages of both, so that with the user's consent, the card reader events can be monitored and the content can be read directly without the user manually selecting the folder
For important background information, read Extra-ordinary Networking before reading this.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Don’t Try to Get the Device’s IP Address
I regularly see questions like:
How do I find the IP address of the device?
How do I find the IP address of the Wi-Fi interface?
How do I identify the Wi-Fi interface?
I also see a lot of really bad answers to these questions. That’s understandable, because the questions themselves don’t make sense. Networking on Apple platforms is complicated and many of the things that are ‘obviously’ true are, in fact, not true at all. For example:
There’s no single IP address that represents the device, or an interface. A device can have 0 or more interfaces, each of which can have 0 or more IP addresses, each of which can be IPv4 and IPv6.
A device can have multiple interfaces of a given type. It’s common for iPhones to have multiple WWAN interfaces, for example.
It’s not possible to give a simple answer to any of these questions, because the correct answer depends on the context. Why do you need this particular information? What are you planning to do with it?
This post describes the scenarios I most commonly encounter, with my advice on how to handle each scenario.
IMPORTANT BSD interface names, like en0, are not considered API. There’s no guarantee, for example, that an iPhone’s Wi-Fi interface is en0. If you write code that relies on a hard-coded interface name, it will fail in some situations.
Service Discovery
Some folks want to identify the Wi-Fi interface so that they can run a custom service discovery protocol over it. Before you do that, I strongly recommend that you look at Bonjour. This has a bunch of advantages:
It’s an industry standard [1].
It’s going to be more efficient on the ‘wire’.
You don’t have to implement it yourself, you can just call an API [2].
For information about the APIs available, see TN3151 Choosing the right networking API.
If you must implement your own service discovery protocol, don’t think in terms of finding the Wi-Fi interface. Rather, write your code to work with all Wi-Fi interfaces, or perhaps even all Ethernet-like interfaces. That’s what Apple’s Bonjour implementation does, and it means that things will work in odd situations [3].
To find all Wi-Fi interfaces, get the interface list and filter it for ones with the Wi-Fi functional type. To find all broadcast-capable interfaces, get the interface list and filter it for interfaces with the IFF_BROADCAST flag set. If the service you’re trying to discover only supports IPv4, filter out any IPv6-only interfaces.
For advice on how to do this, see Interface List and Network Interface Type in Network Interface APIs.
When working with multiple interfaces, it’s generally a good idea to create a socket per interface and then bind that socket to the interface. That ensures that, when you send a packet, it’ll definitely go out the interface you expect.
For more information on how to implement broadcasts correctly, see Broadcasts and Multicasts, Hints and Tips.
[1] Bonjour is an Apple term for:
RFC 3927 Dynamic Configuration of IPv4 Link-Local Addresses
RFC 6762 Multicast DNS
RFC 6763 DNS-Based Service Discovery
[2] That’s true even on non-Apple platforms. It’s even true on most embedded platforms. If you’re talking to a Wi-Fi accessory, see Working with a Wi-Fi Accessory.
[3] Even if the service you’re trying to discover can only be found on Wi-Fi, it’s possible for a user to have their iPhone on an Ethernet that’s bridged to a Wi-Fi. Why on earth would they do that? Well, security, of course. Some organisations forbid their staff from using Wi-Fi.
Logging and Diagnostics
Some folks want to log the IP address of the Wi-Fi interface, or the WWAN, or both for diagnostic purposes. This is quite feasible, with the only caveat being there may be multiple interfaces of each type.
To find all interfaces of a particular type, get the interface list and filter it for interfaces with that functional type. See Interface List and Network Interface Type in Network Interface APIs.
Interface for an Outgoing Connection
There are situations where you need to get the interface used by a particular connection. A classic example of that is FTP. When you set up a transfer in FTP, you start with a control connection to the FTP server. You then open a listener and send its IP address and port to the FTP server over your control connection. What IP address should you use?
There’s an easy answer here: Use the local IP address for the control connection. That’s the one that the server is most likely to be able to connect to.
To get the local address of a connection:
In Network framework, first get the currentPath property and then get its localEndpoint property.
In BSD Sockets, use getsockname. See its man page for details.
Now, this isn’t a particularly realistic example. Most folks don’t use FTP these days [1] but, even if they do, they use FTP passive mode, which avoids the need for this technique. However, this sort of thing still does come up in practice. I recently encountered two different variants of the same problem:
One developer was implementing VoIP software and needed to pass the devices IP address to their VoIP stack. The best IP address to use was the local IP address of their control connection to the VoIP server.
A different developer was upgrading the firmware of an accessory. They do this by starting a server within their app and sending a command to the accessory to download the firmware from that server. Again, the best IP address to use is the local address of the control connection.
[1] See the discussion in TN3151 Choosing the right networking API.
Listening for Connections
If you’re listening for incoming network connections, you don’t need to bind to a specific address. Rather, listen on all local addresses. In Network framework, this is the default for NWListener. In BSD Sockets, set the address to INADDR_ANY (IPv4) or in6addr_any (IPv6).
If you only want to listen on a specific interface, don’t try to bind to that interface’s IP address. If you do that, things will go wrong if the interface’s IP address changes. Rather, bind to the interface itself:
In Network framework, set either the requiredInterfaceType property or the requiredInterface property on the NWParameters you use to create your NWListener.
In BSD Sockets, set the IP_BOUND_IF (IPv4) or IPV6_BOUND_IF (IPv6) socket option.
How do you work out what interface to use? The standard technique is to get the interface list and filter it for interfaces with the desired functional type. See Interface List and Network Interface Type in Network Interface APIs. Remember that their may be multiple interfaces of a given type. If you’re using BSD Sockets, where you can only bind to a single interface, you’ll need to create multiple listeners, one for each interface.
Listener UI
Some apps have an embedded network server and they want to populate a UI with information on how to connect to that server. This is a surprisingly tricky task to do correctly. For the details, see Showing Connection Information for a Local Server.
Outgoing Connections
In some situations you might want to force an outgoing connection to run over a specific interface. There are four common cases here:
Set the local address of a connection [1].
Force a connection to run over a specific interface.
Force a connection to run over a type of interface.
Force a connection to run over an interface with specific characteristics. For example, you want to download some large resource without exhausting the user’s cellular data allowance.
The last case should be the most common — see the Constraints section of Network Interface Techniques — but all four are useful in specific circumstances.
The following sections explain how to tackle these tasks in the most common networking APIs.
[1] This implicitly forces the connection to use the interface with that address. For an explanation as to why, see the discussion of scoped routing in Network Interface Techniques.
Network Framework
Network framework has good support for all of these cases. Set one or more of the following properties on the NWParameters object you use to create your NWConnection:
requiredLocalEndpoint property
requiredInterface property
prohibitedInterfaces property
requiredInterfaceType property
prohibitedInterfaceTypes property
prohibitConstrainedPaths property
prohibitExpensivePaths property
Foundation URL Loading System
URLSession has fewer options than Network framework but they work in a similar way: Set one or more of the following properties on the URLSessionConfiguration object you use to create your session:
allowsCellularAccess property
allowsConstrainedNetworkAccess property
allowsExpensiveNetworkAccess property
Note While these session configuration properties are also available on URLRequest, it’s better to configure this on the session.
There’s no option that forces a connection to run over a specific interface. In most cases you don’t need this — it’s better to use the allowsConstrainedNetworkAccess and allowsExpensiveNetworkAccess properties — but there are some situations where that’s necessary. For advice on this front, see Running an HTTP Request over WWAN.
BSD Sockets
BSD Sockets has very few options in this space. One thing that’s easy and obvious is setting the local address of a connection: Do that by passing the address to bind.
Alternatively, to force a connection to run over a specific interface, set the IP_BOUND_IF (IPv4) or IPV6_BOUND_IF (IPv6) socket options.
Revision History
2025-01-21 Added a link to Broadcasts and Multicasts, Hints and Tips. Made other minor editorial changes.
2023-07-18 First posted.
I've been exploring the Trails Sample App from this session at WWDC24.
The app has a TrailEntity of type AppEntity which is leveraged in multiple places throughout the app, including:
The GetTrailInfo App Intent with a trail parameter of type TrailEntity.
A parameterized App Shortcut which calls the GetTrailInfo intent.
The TrailDataManager's init calls updateSpotlightIndex(), which creates a CSSearchableItem for each Trail in the app, along with an associateAppEntity call linking the corresponding TrailEntity to each item that gets added to the CSSearchableIndex.
If you build the app and search "trails" in Spotlight, the Trails Sample App section includes instances of TrailEntity as search results. But if you comment out the App Shortcut that takes a TrailEntity as a parameter and rebuild, there are no instances of TrailEntity in the search results. In both cases, the console prints [Spotlight] Trails indexed by Spotlight.
Is this expected behavior? Why are the TrailEntity instances only appearing in Spotlight via the App Shortcut? Shouldn't the CSSearchableItem instances show up in Spotlight on their own regardless? If not, then what is the purpose of adopting Core Spotlight with App Entities? Does this add the app entities to the semantic index for "new Siri", even though they're not user facing in the Spotlight UI?
Topic:
App & System Services
SubTopic:
General
Tags:
Shortcuts
Core Spotlight
App Intents
Apple Intelligence
My app is available in TestFlight but has been rejected in App Review with the review feedback that the app clip "just shows a blank screen".
However, in the TestFlight app, the App Clip works as expected and brings up the clip. It also works correctly from Xcode testing.
Any ideas on what the problem could be? It is using the default App Clip link (appclip.apple.com)
Hello the documentation for message filtering has been offline for a few days now, is it possible to get it back, or is there somewhere else it can be viewed in the meanwhile?
https://developer.apple.com/documentation/sms_and_call_reporting/sms_and_mms_message_filtering
(I just chose topic/tags at random, there aren't any relevant for this)
We previously had a non-renewing subscription. I think we remove it. However, the subscription is still listed on the app's page in the App Store. How can I remove this mention?
The availability is still checked for all countries.
Thanks,
Cody.
Subject/Title:
Critical SKAdNetwork Attribution Failures (Bug Type: 237, Failure Type: 1201 in ASDErrorDomain)
Issue Summary
We are encountering repeated SKAdNetwork attribution failures (failureType: 1201 in ASDErrorDomain) for ad impression events processed through the ad network mj797d8u6f.skadnetwork. These failures are causing significant revenue losses, as ad impressions are not being properly attributed to installs.
The issue occurs across multiple campaigns and involves both SKAdNetwork API 3.0 and 4.0, suggesting a systemic problem with attribution validation or network communication.
This problem is critical as it disrupts advertisers’ ability to track conversions, optimize campaigns, and allocate budgets effectively.
Technical Details
Key Logs:
Below are anonymized samples of the failed SKAdNetwork events:
Log Sample 1 (Failure):
{
"bug_type": "237",
"timestamp": "2025-01-07 22:49:15.00 -0500",
"os_version": "iPhone OS 18.2.1 (22C161)",
"roots_installed": 0,
"incident_id": "78523BD9-1F58-4738-B526-8A8A63203214"
}
{
"advertisementStoryId": "3D2E7EBB-1A57-4DF8-9375-2C465F423038",
"apiVersion": "3.0",
"eventType": "adImpression",
"resultType": "finalized",
"anonymous": true,
"failureType": 1201,
"failureDomain": "ASDErrorDomain",
"clientEventId": "0F456623-584F-4913-BBD3-C3FD1219D104",
"os": "iOS",
"topic": "xp_amp_skad_perf",
"adType": "app",
"adNetworkId": "mj797d8u6f.skadnetwork",
"eventTime": 1736305200000,
"osBuildNumber": "22C161",
"hardwareFamily": "iPhone",
"api": "SKAdNetwork"
}
Log Sample 2 (Failure):
{
"bug_type": "237",
"timestamp": "2025-01-07 22:49:15.00 -0500",
"os_version": "iPhone OS 18.2.1 (22C161)",
"roots_installed": 0,
"incident_id": "0CBF612D-F0D9-449E-A34E-DE2DB92BEC0D"
}
{
"advertisementStoryId": "946E568C-D2C1-478F-BFF3-4996C48F9B39",
"apiVersion": "3.0",
"eventType": "adImpression",
"resultType": "finalized",
"anonymous": true,
"failureType": 1201,
"failureDomain": "ASDErrorDomain",
"clientEventId": "1A3D48FB-4452-4FD8-BB25-1195470A53DC",
"os": "iOS",
"topic": "xp_amp_skad_perf",
"adType": "app",
"adNetworkId": "mj797d8u6f.skadnetwork",
"eventTime": 1736298000000,
"osBuildNumber": "22C161",
"hardwareFamily": "iPhone",
"api": "SKAdNetwork"
}
Log Sample 3 (Success Example for Comparison):
{
"bug_type": "237",
"timestamp": "2025-01-07 22:49:15.00 -0500",
"os_version": "iPhone OS 18.2.1 (22C161)",
"roots_installed": 0,
"incident_id": "BFEAC86B-8195-4DB0-96FF-2028107256AD"
}
{
"advertisementStoryId": "946E568C-D2C1-478F-BFF3-4996C48F9B39",
"apiVersion": "3.0",
"eventType": "adImpression",
"resultType": "finalized",
"anonymous": true,
"clientEventId": "F6265488-E0FB-448A-A406-3F7254BCA9D7",
"os": "iOS",
"topic": "xp_amp_skad_perf",
"adType": "app",
"adNetworkId": "mj797d8u6f.skadnetwork",
"eventTime": 1736294400000,
"osBuildNumber": "22C161",
"hardwareFamily": "iPhone",
"api": "SKAdNetwork"
}
Failure Details:
Failure Type: 1201
Failure Domain: ASDErrorDomain
Ad Network ID: mj797d8u6f.skadnetwork
API Versions Affected: 3.0, 4.0
Timeframe of Failures: All logs occur within 2025-01-07 22:00:00 UTC to 23:00:00 UTC.
Environment:
OS Version: iOS 18.2.1 (Build 22C161).
Device Type: iPhone (hardwareFamily: iPhone).
App Configuration: Includes the ad network ID in the Info.plist under SKAdNetworkItems.
Impact Details
Financial Loss:
Based on failure rates, we estimate $20–$65/day per advertiser for small campaigns and $75–$375/day per advertiser for larger campaigns.
If 100 advertisers are affected, daily losses range from $2,000–$37,500.
Over a week, losses could exceed $70,000 to $262,500 or more.
Operational Impact:
Advertisers cannot track installs or optimize campaigns, leading to inefficient ad spending and potential budget reallocation to other networks.
Damaged trust between advertisers and the ad network.
Reputation Risk:
Continued failures harm the credibility of the SKAdNetwork framework, critical in a post-ATT (App Tracking Transparency) ecosystem.
Steps to Reproduce
Serve an ad impression through the ad network mj797d8u6f.skadnetwork.
Monitor SKAdNetwork attribution for that impression.
Observe repeated failures (failureType: 1201) despite the resultType: finalized status.
Recommendations for Investigation
Attribution Timeout:
Verify if these failures stem from delayed responses or missed attribution windows.
Ad Network Configuration:
Confirm the ad network’s integration complies with SKAdNetwork API 3.0 and 4.0 requirements.
Infrastructure Review:
Investigate potential bottlenecks or failures in Apple’s attribution servers (ASDErrorDomain) or communication delays.
Contact Details
Name: [Your Full Name]
Role: [Your Role] (e.g., Ad Network Analyst/Developer)
Organization: [Your Company Name]
Email: [Your Email Address]
Phone: [Your Phone Number]
Submission Instructions
You can submit this report via the following channels:
Apple Feedback Assistant: https://feedbackassistant.apple.com/
Bug Reporting Tool: https://developer.apple.com/bug-reporting/
Apple DTS: https://developer.apple.com/support/technical/
Topic:
App & System Services
SubTopic:
General
Does anyone know why I set the offer code in Apple Store Connect, but when I call SKPaymentQueue.default().presentCodeRedemptionSheet() in the app, the app icon does not appear and I cannot find the offer code?
THX
All the cards seem to have expired in Dec 2024:
https://developer.apple.com/apple-pay/sandbox-testing/
Are there updated cards? Some gateways only support Mastercard and Discover which all appear expired.
Topic:
App & System Services
SubTopic:
Apple Pay
I am implementing apple pay and the merchant validation is failing with error (error request failed with status code 417). I am using react js in the frontend and node js in backend, this is my code
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
cert: fs.readFileSync(
path.join(__dirname, "../../../certificates/merchant_id_prod.pem")
),
key: fs.readFileSync(
path.join(__dirname, "../../../certificates/merchant_id_prod.key")
),
});
const data = {
merchantIdentifier: "merchantId",
displayName: "Check",
initiative: "web",
initiativeContext: "domain.com",
};
const response = await axios.post(validationURL, data, { httpsAgent });
Hi, I am trying to build a command line app that read local mov files and print the text to the terminal. When I open the file with VNImageRequestHandler(url: url), where the url is a hardcode path to my desktop file, the terminal reports CRImage Reader Detector was given zero-dimensioned image (0 x 0). Anyone can help? Thanks!
Topic:
App & System Services
SubTopic:
General
Tags:
Files and Storage
App Sandbox
Command Line Tools
I am trying to add voip call functionality to my app.
It works as expected while the app is in the foreground. But in the background it does not.
I have registered the app as requiring background voip permissions.
My implementation doesn't fit into one of these posts, so here is a gist:
https://gist.github.com/BrentMifsud/4be43c022c1279f04ecb56250a86b3f1
Hi everyone,
i'm trying to request in a AppIntent an array of strings. But I want to give the user the chance to add more than one String.
Yet, I do it so:
import AppIntent
struct AddHomework: AppIntent {
// some Parameters
@Parameter(title: "Tasks")
var tasks: [String]?
@Parameter(title: "New Task") //Only for the special request
var input: String?
private func collectTasks() async throws -> [String] {
var collectedTasks: [String] = tasks ?? []
while true {
if !collectedTasks.isEmpty {
let addMore = try await $input.requestConfirmation(for: "Möchtest du noch eine Aufgabe hinzufügen?")
if !addMore {
break
}
}
let newTask = try await $input.requestValue("Please enter your task:")
collectedTasks.append(newTask)
}
return collectedTasks
}
@MainActor
func perform() async throws -> some IntentResult {
let finalTasks = try await collectTasks()
// some more code
return .result()
}
}
But this is not working. The Shortcut is ending without requesting anything. But it is not crashing.
I would thankfully for some help.
I want to use the Apple Healthkit data to recommend personalised insurance. Is this allowed? As I have read in the documentation that the Apple Healthkit data can only be used for fitness and health purposes. Anyone knows what is meant / scope of "fitness and health purposes"? Will personalised insurance as per health data be allowed under this category?
Document based SwiftData apps do not autosave changes to the ModelContext at all. This issue has been around since the first release of this SwiftData feature.
In fact, the Apple WWDC sample project (https://developer.apple.com/documentation/swiftui/building-a-document-based-app-using-swiftdata) does not persist any data in its current state, unless one inserts modelContext.save() calls after every data change.
I have reported this under the feedback ID FB16503154, as it seemed to me that there is no feedback report about the fundamental issue yet.
Other posts related to this problem:
https://forums.developer.apple.com/forums/thread/757172
https://forums.developer.apple.com/forums/thread/768906
https://developer.apple.com/forums/thread/764189
Good day. Installed Sequoia Developer Beta.
After that, the laptop started to behave incorrectly, programs over 1 GB stopped installing, updates were not installed, sometimes it rebooted spontaneously. Decided to roll back. With the help of another Macbook, I managed to install 14.6.1. Errors remained. Updates are not installed. Tried to restore through the recovery menu, error at 52 minutes, using a boot disk, the same error. What else can I do?
Mac Book Pro M1 16gb/2tb
Topic:
App & System Services
SubTopic:
General