Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

How do I finish and track Consumable IAPs with StoreKit 2?
Hi, I'm attempting to use StoreKit 2 and SwiftUI to add a tip jar to my iOS app. I've successfully added consumable IAPs for each of my tip sizes, and used ProductView to show these on my tip jar screen. However, I am at a loss on how to do the following things: How and when do I finish the consumable IAP transaction? I see the finish() function in the documentation, but I am not sure how I can call it given that ProductView is handling the purchase for me (I have no access to a Transaction object). How can I track the amount of consumable IAPs the user has purchased across all their devices? I want to show the user the amount of money they have tipped in total. I have added SKIncludeConsumableInAppPurchaseHistory to my Info.plist and set it to YES as suggested here: https://forums.developer.apple.com/forums/thread/687199 This is my first time using StoreKit 2 (until now, I was using StoreKit 1), so I would really appreciate any advice and guidance you can provide. Thanks!
0
1
264
Jan ’25
Handling Data Download Backpressure in URLSession
I am developing an application that processes a video file stored on a server. I use URLSessionDataTask with a delegate handler to download the file. It is not necessary to download the entire file at once. Instead, I can load small chunks of the file as needed. This approach helps minimize memory consumption. I am trying to design a network layer that supports this behavior. Ideally, I would like to have an interface similar to: func readMoreData(length: Int) async throws -> Data Problems I Encountered: It seems that URLSessionDataTask does not allow controlling how many bytes will be downloaded. It always downloads the entire request. If I call suspend on URLSessionDataTask, the network activity does not stop, and the file keeps downloading. If I upgrade the dataTask to a StreamTask, the file still downloads, though reading bytes can be done through the StreamTask API. I would prefer behavior similar to AsyncHTTPClient (a Swift Server library) or Network Framework. These frameworks allow controlling the number of bytes downloaded at a time. Unfortunately, they do not fit the specific requirements of my project. Am I correct in understanding that controlling the download process is not possible with URLSessionDataTask? As a possible solution, I am considering using HTTP Range Requests, though this would increase the number of additional server requests, which I would like to avoid.
0
0
212
Dec ’24
App Clip works in TestFlight but not elsewhere
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)
0
0
323
Jan ’25
Critical SKAdNetwork Attribution
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/
0
0
355
Jan ’25
Applepay merchant validation failing with error request failed with status code 417
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 });
0
0
300
Jan ’25
Apple Push Notification service server certificate update
You are probably aware of the upcoming root certificate change for any servers you might have that you use to send push notifications by connection to APNs. If you are not, here is the announcement. We have been getting some questions about this, and understand not everyone is familiar with their server setup. First, we would like to clarify that this is only a change to your server's certificate trust store. You do not need to update anything else, like your APNs push certificates, the build certificates and provisioning profiles for your team/app, and so on. All you need to do is to install the mentioned new root certificate to your push server's trust store. If you are using a 3rd party push provider, it is them who will need to handle their servers. But you may want to double check with them nevertheless. If you are managing your own push servers that connect to APNs directly, then it is your responsibility to download and install the root certificate mentioned in the above link on your server(s). Unfortunately we cannot provide specific instructions on how to install this root certificate on every kind of server out there. Each server operating system/push server software will have different ways these root certificates are installed, which is out of scope of our support abilities. If you are not sure how to do this, I would recommend you seek help for this from your server-side developers or server admins. Or, if you don't have access to such resources, you can ask the support channels for your system the question: How do I install a root certificate? We have setup a test server at 17.188.143.34:443 that you can use to try and send pushes to test whether your new root certificate is correctly installed. An alternative way to test this would be, from a terminal prompt: openssl s_client -connect 17.188.143.34:443 -servername api.sandbox.push.apple.com -verifyCAfile USERTrustRSACertificationAuthority.crt -showcerts Change the parameter to the -verifyCAfile argument to point to your trust store, and it should allow you to validate Sample return results would be: Connecting to 17.188.143.34 CONNECTED(00000003) depth=2 C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority verify return:1 depth=1 CN=Apple Public Server RSA CA 11 - G1, O=Apple Inc., ST=California, C=US verify return:1 depth=0 C=US, ST=California, O=Apple Inc., CN=api.sandbox.push.apple.com verify return:1 Argun Tekant /  DTS Engineer / Core Technologies
0
0
2.3k
Jan ’25
VNRecognizeTextRequest not able to read .mov files locally
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!
0
0
394
Dec ’24
Apple wallet pass nfc enable
on a span of 4 months we sent 2 for nfc entitlement requests and refused , no reason nothing . i mean all we want is the ability to use nfc on passes nothing else , no idea why this is so complex . with google you don’t even need a developer account and it’s for free , here we pay and we can’t even get the full functionality the passes offer , we got the hardware and the solution but we find out we need an nfc entitlement to allow passes to have nfc ? i mean our use case is very simple instead of having barcode on the passes we want them to be via nfc and we already got the nfc hardware but we find out we need nfc entitlement which we tried requesting but getting refused with no reason at all. at least tell u what is the problem what how to fix it not outright refuse without any reason at all. if anyone got any solution please provide.
0
0
146
Feb ’25
Can anyone help?
I recently used Open core legacy patcher to update my old 2012 Macbook pro to run a new pice of dj software. the update went smooth but now the Dj software wont open just gives me a crash report. Im totally stumped. the crash report. Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [3839] Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 Engine DJ 0x10c9e3d81 0x10c28f000 + 7687553 1 dyld 0x7ff807632729 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 241 2 dyld 0x7ff80766b34e invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 133 3 dyld 0x7ff80765fb73 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 543 4 dyld 0x7ff80761a07b dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 249 5 dyld 0x7ff80765ebe8 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 176 6 dyld 0x7ff807661266 dyld3::MachOFile::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, bool&) block_pointer) const + 116 7 dyld 0x7ff80766b084 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 390 8 dyld 0x7ff8076325c2 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 150 9 dyld 0x7ff807638af7 dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const + 21 10 dyld 0x7ff807632928 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 276 11 dyld 0x7ff807636141 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const + 147 12 dyld 0x7ff8076329bc dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 90 13 dyld 0x7ff80764e1f7 dyld4::APIs::runAllInitializersForMain() + 277 14 dyld 0x7ff80761f52e dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3433 15 dyld 0x7ff80761e792 dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const + 572 16 dyld 0x7ff80761e27f start + 1727 Thread 1: 0 libsystem_pthread.dylib 0x7ff8079a8bcc start_wqthread + 0 Thread 2: 0 libsystem_pthread.dylib 0x7ff8079a8bcc start_wqthread + 0 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00006000012acc80 rbx: 0x00006000032b3c90 rcx: 0x00006000012acd00 rdx: 0x000000011008e000 rdi: 0x0000000000000000 rsi: 0x00006000012ac000 rbp: 0x00007ff7b3c5a9f0 rsp: 0x00007ff7b3c5a9c0 r8: 0x0000000000000002 r9: 0x000000000000001b r10: 0x00000000001ff800 r11: 0x0000000000000080 r12: 0x000000010eeae278 r13: 0x000000010c28f6e8 r14: 0x00007ff84a461050 r15: 0x00007ff84a4614a0 rip: 0x000000010c9e3d81 rfl: 0x0000000000010207 cr2: 0x0000000000000000 Logical CPU: 2 Error Code: 0x00000000 Trap Number: 6
0
0
180
Dec ’24
error 49244 when using asr
a few times, for reasons unknown to me, asr restore processes broke with error 49244. Basically, the process get interrupted, most cases when is about to finish, with just a laconic message saying "Volume replication failed - error 49244". Where can I get information on this error, what exactly means, what causes it and more important, how to troubleshoot it. Any help will be appreciated, Thanks!!
0
0
359
Feb ’25
How can implement iOS esim in-app activation
Esim activation. Assuming I already have card data, I use the universal link https://esimsetup.apple.com/esim_qrcode_provisioning?carddata= to install it. However, it always ends up in the system Settings app. The flow: 1. Click the link -&gt; 2. Redirect to Settings -&gt; 3. Show activation dialog. Is there anyway to make the activation flow stay within the app? I couldn't find any documentation for that. This is an example from Revolut app, where the whole flow above happens without leaving the app.
0
0
393
Feb ’25
Merchant validation error on Apple Pay payment processing
Hi, I'm developer in fintech company, we have setup process for onboarding merchants for our partner and processing payments with usage of Apple Pay API. Daily system is processing ca. 10k payments but every day ca. 100 of transactions are declined because of merchant validation error: request to https://apple-pay-gateway.apple.com/paymentservices/paymentSession (with all required parameters in body) is returning response with status code 417 "statusMessage": "Payment Services Exception merchantId={root merchant id} unauthorized to process transactions on behalf of merchantId={merchant id hash} reason={merchant id hash} is not a registered merchant in WWDR and isn't properly authorized via Mass Enablement, either." Issue impacts recurring merchants, most of their transactions are processed successfully but randomly some of them are failing with such reason. All prerequisites are met: merchant have deployed 'apple-developer-merchantid-domain-association' certificate, certificates are valid and not expired. Apple Support is not able to provide any information based on provided requests timestamps. We would to know what may be the reason just part of the requests are failing and what 417 error code means.
0
0
268
Feb ’25
Issue with Missing Private Key After Adding Push Notification Certificate to Keychain
Hi All, I have created a Push Notification certificate from my Apple Developer account. After downloading the aps.cer file and adding it to my Keychain, the certificate was added successfully, but the private key is missing. Has anyone encountered a similar issue in the past? What could be causing this problem?
0
0
412
Dec ’24
App disappears after pkg installation
We're running into an issue with our pkg bundle where the main .app file disappears after installation and wanted to see if anyone has an idea about what would cause it. We have a pkg bundle with three separate apps, one primary app and two supporting apps. We distribute this pkg bundle directly to our users, who will manually install it on their devices (rather than through the app store). The installation itself will usually complete without any issues, and we aren't seeing anything in the install or system logs indicating that it was removed afterward (our postinstall script checks that all of the files exist and are in the correct locations), but after the installation the main app disappears while the rest of the files (including the supporting apps) we lay down are still present. Sometimes it will fail with an error similar to this: 2024-10-02 09:43:07-04 MBA-L-8114 installer[9894]: Error getting application status info for file:///Applications/.hiddenfolder/app1.app: Error Domain=NSCocoaErrorDomain Code=260 "The file "app1.app" couldn't be opened because there is no such file." UserInfo={NSURL=file:///Applications/.hiddenfolder/app1.app, NSFilePath=/Applications/.hiddenfolder/app1.app, NSUnderlyingError=0x6000026a0d50 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} This only happens on certain computers, but on those computers it will happen consistently. We have noticed that it seems to happen more often with computers that are MDM configured. So far we’ve investigated permissions issues with the build process, installation script issues, and signing/notarizing, but have not found anything that might cause this issue. We did verify that we’re setting BundleIsRelocatable NO in the plist file for our package, so in theory it shouldn’t be trying to move the app after installation (we don't see the main app anywhere on the device so macOS doesn't seem to be moving it). We have another post going into more technical detail here: https://developer.apple.com/forums/thread/769443
0
0
207
Jan ’25
NSPOSIXErrorDomain Code=65 iOS18 Xcode16
Hi, I have a problem about "NSPOSIXErrorDomain Code=65 & iOS18 & Xcode 16". I used 'CocoaAsyncSocket', '~> 7.6.5'. It works fine on iOS 15.2, But it's worried on iOS 18.3. Before this, broadcasts can be obtained normally。 I had get socket Multicast Networking. Please help me .
0
0
280
Dec ’24
How to deal with the following "Bad Gateway_message" prompt after purchase
Payment completed with error: Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={client-environment-type=Sandbox, storefront-country-code=USA, NSUnderlyingError=0x2828a5950 {Error Domain=AMSErrorDomain Code=305 "Purchase Failed" UserInfo={NSLocalizedDescription=Purchase Failed, AMSURL=https://sandbox.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy?guid=00008030-000164513691402E, AMSStatusCode=200, AMSServerPayload={ "cancel-purchase-batch" = 1; customerMessage = "Bad Gateway_message"; failureType = ""; "m-allowed" = 0; pings = ( ); }, NSLocalizedFailureReason=Server canceled the purchase}}}
0
0
278
Dec ’24
How do win-back offers displayed for discounted subscriptions?
In all the illustrations of win-back offers, I see an example of "Get 3 months off, then $X/month", as seen below. First, I'm not exactly clear how each configuration translates into an actual offer in practice: If I want to offer 3 months off on an annual subscription, ie. only if the user pays for the annual offer (basically a 25% discount), is that possible? If I set a "Free" type, of 3 months, I guess that would allow the user to cancel before paying for the annual, correct? If I set a "Pay up front" type, with a 25% discount, how would that show up to the user on the App Store? Secondly, is eligibility to an offer determined by the user elapsing on the same subscription or any subscription in the same subscription group? Thank you
0
0
314
Jan ’25