Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

In App Purchase cross platforms
Hello Apple Dev Team, I’m seeking guidance on how to ensure full compliance with the App Store Review Guidelines, specifically section 3.1.1 (In-App Purchase). In-App Purchase Mechanisms: I want to verify that my app is correctly using in-app purchases to unlock premium content, rather than alternative mechanisms. The guidelines outline various restrictions on unlocking content (e.g., license keys, QR codes, cryptocurrency). If I follow all of these restrictions, would Apple require anything else specific to prove compliance? Subscription Handling Across Platforms: Our app plans to offer a subscription service where users could subscribe on Android and then access the content on iOS with the same credentials (similar to Netflix). Users should also have the option to manage (including canceling) their subscription directly from their iOS device. Are there any specific requirements or precautions I should take to facilitate this cross-platform subscription access while remaining compliant? Restoring Purchases: I see that in-app purchases must have a restore mechanism. Could you confirm if Apple expects any specific UX or technical standards here, particularly if there are multiple types of IAPs? I’d appreciate any insights or examples from other apps that meet these requirements successfully. Thanks in advance! This should help clarify your approach, ensuring alignment with Apple’s guidelines.
0
0
401
Oct ’24
Interpreting kernel/iOSAppProxyProvider logs
Hi, I'm troubleshooting an iOS network connectivity issue when my app is running 'in' a per-app VPN and would like some clarification about the ordering of some of the logging generated after installing various debugging profiles on the device (VPN (Network Extension), Network Diagnostics, mDNSResponder). Context The connectivity issue is between two vendors my app is involved with. One supplies an app proxy provider extension to provide per-app VPN capability for my app. The other vendor provides an SDK framework that's attempting to make network connections which normally work when the VPN is not involved. We have confirmed with the VPN vendor that it is not a configuration (whitelisting, etc) type issue. I am trying to understand from the logs what component caused/initiated the network connection termination. Was it the kernel, was it the App Proxy Provider Network Extension code or was it the app (SDK framework) code ? Log entries I've attached a short log file and number the lines for reference, and have redacted a few commercially sensitive parts. NetworkLogExcerpt.txt Questions Can this log help determine who caused the network connection failure, and if not, is there any more instrumentation I could enable that might help? Do the log entries (and their timestamps) reflect the actual order/timing of events reported on, or is there some jumbling occurring due to my app, the kernel and iOSAppProxyProvider running in different processes/threads? After the app initiates the network connection (line 1), it appears that the kernel flow diversion code in netinet/flow_divert.c establishes the flow and closes it (lines 2 - 6) before iOSAppProxyProvider even starts to establish the flow (lines 7 - 10). Then the app somehow seems to detects a network error (line 8), before the iOSAppProxyProvider has even matched the VPN extension (line 12) to it and then finally the iOSAppProxyProvider closes the flow (lines 13-17). I'd have expected an interleaving of kernel and iOSAppProxyProvider log entries, with the app's own logging just occurring at the start and end, bracketing the whole interaction... I am new to this area of iOS, so apologies if I am missing some important foundational concepts about how these components all work together. Thanks in advance, Rob
0
1
348
Oct ’24
App Intents: requestConfirmation method not working with Siri invocation
Hello, I am implementing an App Intent which shows a confirmation dialog before proceeding with the operation execution. It works fine when the intent is started from a shortcut, but it always fails when started from Siri: I obtain the error message depicted in the attached screenshot ("An error occurred, try again"). That message appears as soon as the requestConfirmation method is called in the perform method of my App Intent: try await requestConfirmation(actionName: .do, dialog: "app_intent_sim_confirmation_message") { SIMRechargeIntentSummaryView(...) } ... How can I solve the problem? Thanks
0
0
356
Oct ’24
testflight's app receive transactions
In this case, I used my project project to export the ipa to testflght. The tester installed the app on the test device, started the app, and received the payment voucher information pushed by storekit. At this time, the test device did not log in to the sandbox account. Of course, The test device has previously logged into the sandbox account and successfully paid for the subscription. When I used the same test device, connected to Xcode, clicked run, and ran the app, I did not receive the payment voucher information pushed by storekit. I am very confused, why does testflight receive the certificate information pushed by storekit?
0
0
278
Oct ’24
error sharing url on cloudkit share
I'm studying sharing through this link. I followed the first steps by changing the bundle identifier of the project, the tests and placing my own container in the config and in the info.plist. https://github.com/apple/sample-cloudkit-zonesharing The app appears and in the log it appears that it has managed to access my iCloud, but when I click on share and share something, the following message appears in the console, on the simulator and on the iPhone: "No options were found, providing default value for access type" "No options were found, providing default values ​​for permissions" "connection invalidated" And finally, when I click on the shared link, the following message appears: "Item unavailable The owner stopped sharing, or you don't have permission to open it."
0
0
565
Sep ’24
Multi Apple Pay MID // CyberSource
Hello everyone, Please need your advise if i can use a single Apple Pay MID for multiple CyberSource merchant IDs while creating the SCR or each merchant ID at CyberSource need a separate apple pay MID? or if i can create more than single apple pay MID on the same apple account?
0
0
165
Nov ’24
ValueTransformer: Unable to determine the primitive for Attribute Error
I've been struggling to get a ValueTransformer to work while developing in Xcode 16 for iOS 18. Despite thinking I had everything set up correctly, I keep encountering the following error whenever I create a tag: let tag = Tag(name: name, color: color.toPlatformColor()) // Converts it to NSColor or UIColor modelContext.insert(tag) SwiftData/DataUtilities.swift:184: Fatal error: Unable to determine the primitive for Attribute - name: color, options: [transformable with Optional("ColorTransformer")], valueType: UIColor, defaultValue: UIExtendedSRGBColorSpace 0 0 1 1, hashModifier: nil Here’s what I’m dealing with: Tag Model: @Model public final class Tag: Identifiable { var name: String = "" @Attribute(.transformable(by: ColorTransformer.self)) var color: PlatformColor = PlatformColor.blue init(name: String, color: PlatformColor) { self.name = name self.color = color } } ColorTransformer: final class ColorTransformer: ValueTransformer { override func transformedValue(_ value: Any?) -> Any? { guard let color = value as? PlatformColor else { return nil } do { let data = try NSKeyedArchiver.archivedData( withRootObject: color, requiringSecureCoding: true) return data } catch { assertionFailure("Failed to transform `PlatformColor` to `Data`") return nil } } override func reverseTransformedValue(_ value: Any?) -> Any? { guard let data = value as? NSData else { return PlatformColor.black } do { let color = try NSKeyedUnarchiver.unarchivedObject( ofClass: PlatformColor.self, from: data as Data) return color } catch { assertionFailure("Failed to transform `Data` to `PlatformColor`") return nil } } override class func transformedValueClass() -> AnyClass { return PlatformColor.self } override class func allowsReverseTransformation() -> Bool { return true } public static func register() { ValueTransformer.setValueTransformer(ColorTransformer(), forName: .colorTransformer) } } extension NSValueTransformerName { static let colorTransformer = NSValueTransformerName(rawValue: "ColorTransformer") } Platform Alias: #if os(macOS) typealias PlatformColor = NSColor #else typealias PlatformColor = UIColor #endif The ValueTransformer is registered when the ModelContainer is created at app startup: var sharedModelContainer: ModelContainer = { ColorTransformer.register() // Other configurations... }() I've also tried not aliasing the colors to see if that changes anything, but I still encounter the same issue. Any guidance or suggestions would be greatly appreciated!
0
1
307
Oct ’24
ApplePay Integration Error
Hello ApplePay Support, I am integrating apple pay support on the following page but getting error. I have attached code files and video also about debug that code with different response print. Please check it and let me know where is issue. ApplePay Page: https://payment.bestgoodstudio.com/uk/pay/ JS Code: $(document).ready(function() { function setupApplePayButton() { var applePayButton = $('#apple-pay-button'); if (applePayButton.length) { applePayButton.on('click', function() { initiateApplePayPayment(); }); } } async function initiateApplePayPayment() { if (!window.ApplePaySession) { alert('Apple Pay is not supported in this browser/environment.'); console.error('Apple Pay is not supported in this browser/environment.'); return; } var request = { countryCode: 'GB', currencyCode: 'EUR', supportedNetworks: ['visa', 'masterCard', 'amex'], merchantCapabilities: ['supports3DS', 'supportsEMV', 'supportsCredit', 'supportsDebit'], total: { label: 'Elitelab Pte Ltd', amount: '2.50' } }; var session = new ApplePaySession(3, request); session.onvalidatemerchant = async function(event) { const validationURL = event.validationURL; alert("Validation URL received: " + validationURL); try { const response = await fetch('https://payment.bestgoodstudio.com/uk/pay/apple_pay_validation.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ validationURL: validationURL }) }); const responseBody = await response.text(); // Get raw text to print whole response alert("Validation Response (raw): " + responseBody); // Print raw response in alert if (response.ok) { const responseData = JSON.parse(responseBody); // Parse it if valid JSON alert('Validation Response (parsed): ' + JSON.stringify(responseData)); console.log('Merchant Validation Data:', responseData); if (session) { session.completeMerchantValidation(responseData); alert('Merchant validation completed.'); } } else { alert("Merchant Validation failed. HTTP Status: " + response.status); session.abort(); // Abort session if validation fails } } catch (e) { alert('Error during Merchant Validation: ' + e.message); console.error('Merchant validation error:', e); session.abort(); // Abort session on error } }; session.onpaymentauthorized = function(event) { var payment = event.payment; var paymentToken = payment.token.paymentData; alert("Payment authorized. Payment Data: " + JSON.stringify(payment)); console.log('Payment Authorized:', payment); processApplePayPayment(payment, function(success) { if (success) { session.completePayment(ApplePaySession.STATUS_SUCCESS); alert('Payment completed successfully.'); } else { session.completePayment(ApplePaySession.STATUS_FAILURE); alert('Payment failed.'); } }); }; session.oncancel = function(event) { alert("Session canceled: " + JSON.stringify(event)); console.log("Session canceled:", event); }; session.oncomplete = function(event) { alert("Session complete: " + JSON.stringify(event)); console.log("Session complete:", event); }; session.begin(); } function processApplePayPayment(payment, callback) { var postData = { paymentData: payment.token.paymentData, billingContact: payment.billingContact, shippingContact: payment.shippingContact }; $.ajax({ url: 'process_apple_pay.php', method: 'POST', data: JSON.stringify(postData), contentType: 'application/json', success: function(response) { alert("Payment Processing Response: " + JSON.stringify(response)); console.log("Payment Processing Response:", response); callback(response.success); }, error: function(error) { alert('Error processing payment: ' + JSON.stringify(error)); console.error('Error processing payment:', error); callback(false); } }); } setupApplePayButton(); }); PHP Code:
0
0
473
Oct ’24
In-App Purchases
The in-app payment system is confusing. In-app payment is initially reviewed without being attached (however, in-app purchase is applied) Once the review is complete (up to in-app payment), the in-app payment module is attached for testing It is reviewed with the attached module Isn't this the logic? If there is another logic, please let me know. Thank you.
0
0
259
Oct ’24
Apple Push Notification service server certificate update
The Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs will update the server certificates in sandbox on January 20, 2025, and in production on February 24, 2025. All developers using APNs will need to update their application’s Trust Store to include the new server certificate: SHA-2 Root : USERTrust RSA Certification Authority certificate. To ensure a smooth transition and avoid push notification delivery failures, please make sure that both old and new server certificates are included in the Trust Store before the cut-off date for each of your application servers that connect to sandbox and production. At this time, you don’t need to update the APNs SSL provider certificates issued to you by Apple.
0
0
2k
Oct ’24
transportType .transit does not work
hi, does someone encounter this problem, this is sample code : let request = MKDirections.Request() request.source = MKMapItem(placemark: startPlacemark) request.destination = MKMapItem(placemark: endPlacemark) request.transportType = .transit // .transit does not work I want to make a route with two point(startPlacemark and endPlacemark ), when I give request.transportType the value of **.transit ** ,I found it not work, ps: .automobile .walking works well , my Xcode version is 16 .
0
0
258
Oct ’24
question about App Store Server Notifications
I have 2 subscriptions, monthly and year first:DID_CHANGE_RENEWAL_PREF + DOWNGRADE: Customer downgrades a subscription within the same subscription group; The current subscribe is year;if i change to month;when the subscribe year was expire,Automatic renewal will change to month second:DID_CHANGE_RENEWAL_PREF+UPGRADE: Customer upgrades a subscription within the same subscription group. The current subscribe is month;if i change to year;I need to pay for the annual subscription immediately;and The subscription immediately switches to the annual third:DID_CHANGE_RENEWAL_PREF subtype is None Customer reverts to the previous subscription, effectively canceling their downgrade. what this mean? This is Test Env,month is five minutes;year is one hour ①My current subscription is an annual, startTime:2024-10-02 15:04:58 ,expireTime:2024-10-02 16:04:58 ②first DOWNGRADE to month,at 2024-10-02 15:14:16 ②after 38 minutes,I change to the annual subscribe;at 2024-10-02 15:52:00 in the end,the Notification purchaseDate 2024-10-02 15:52:00;expiresDate 2024-10-02 16:52:00; So When I get NotificationType=DID_CHANGE_RENEWAL_PREF,NotificationSubType=None,Do I need to create a new subscription for the users? Is it the latest notice of purchaseDate and expiresDate, for a year? The appleNotification Payload as follows: JWSTransactionDecodedPayload( originalTransactionId='2000000731045285', transactionId='2000000731088945', webOrderLineItemId='2000000076096676', bundleId='app.xxxx', productId='com.xxxx.365', subscriptionGroupIdentifier='21514251', purchaseDate=1727855520000, 2024-10-02 15:52:00 originalPurchaseDate=1727852699000, 2024-10-02 15:04:59 expiresDate=1727859120000, 2024-10-02 16:52:00 quantity=1, type=<Type.AUTO_RENEWABLE_SUBSCRIPTION: 'Auto-Renewable Subscription'>, rawType='Auto-Renewable Subscription', appAccountToken='fa37b7a2-2b0b-43cb-8fda-a1fb21168efe', inAppOwnershipType=<InAppOwnershipType.PURCHASED: 'PURCHASED'>, rawInAppOwnershipType='PURCHASED', signedDate=1727855526632, 2024-10-02 15:52:06 revocationReason=None, rawRevocationReason=None, revocationDate=None, isUpgraded=None, offerType=None, rawOfferType=None, offerIdentifier=None, environment=<Environment.SANDBOX: 'Sandbox'>, rawEnvironment='Sandbox', storefront='CAN', storefrontId='143455', transactionReason=<TransactionReason.PURCHASE: 'PURCHASE'>, rawTransactionReason='PURCHASE', currency='CAD', price=14990, offerDiscountType=None, rawOfferDiscountType=None) JWSRenewalInfoDecodedPayload( expirationIntent=None, rawExpirationIntent=None, originalTransactionId='2000000731045285', autoRenewProductId='com.xxxx.365', productId='com.xxxx.365', autoRenewStatus=<AutoRenewStatus.ON: 1>, rawAutoRenewStatus=1, isInBillingRetryPeriod=None, priceIncreaseStatus=None, rawPriceIncreaseStatus=None, gracePeriodExpiresDate=None, offerType=None, rawOfferType=None, offerIdentifier=None, signedDate=1727855526632, 2024-10-02 15:52:06 environment=<Environment.SANDBOX: 'Sandbox'>, rawEnvironment='Sandbox', recentSubscriptionStartDate=1727852698000, 2024-10-02 15:04:58 renewalDate=1727859120000, 2024-10-02 16:52:00 currency='CAD', renewalPrice=14990, offerDiscountType=None, rawOfferDiscountType=None, eligibleWinBackOfferIds=None)
0
0
416
Oct ’24
Iphone 14 Pro Max Keeps restarting
My phone keeps restarting randomly every few seconds to every few minutes at random. It also feels like its overheating at the same time. Heres the panic log: bug_type":"210","timestamp":"2024-10-22 12:23:26.00 -0400","os_version":"iPhone OS 18.0.1 (22A3370)","roots_installed":0,"incident_id":"E2DC5427-D751-4339-827B-181625987FCF"} { "build" : "iPhone OS 18.0.1 (22A3370)", "product" : "iPhone15,3", "socId" : "8120", "socRevision" : "11", "incident" : "E2DC5427-D751-4339-827B-181625987FCF", "crashReporterKey" : "df026d01d48e533d7258182dafc82a95473d59d4", "kernel" : "Darwin Kernel Version 24.0.0: Thu Aug 8 01:15:37 PDT 2024; root:xnu-11215.2.562/RELEASE_ARM64_T8120", "date" : "2024-10-22 12:23:26.77 -0400", "panicString" : "panic(cpu 0 caller 0xfffffff040697444): AOP PANIC - !pulse pearl@0x1173490 - power(2) OUTBOX3 not ready - \nuser handlers:\nEiger::probe=0 [e4 30 1] conn=0\n\nPrAS Comp = stat [0, 0], dbg [205452, 41680, 416832, 0, 12665, 404163, 1, 9973, 4] \n\n\n!pulse pearl@0x1173490\nRTKit: RTKit-2758.2.1.debug - Client: iphone15aop:DEBUG:AppleSPUFirmwareBuilder-632.0.717199\n!UUID: 26e83ac2-7536-30ff-9f4c-57d91477a498\nASLR slide: 0x0000000000000000\nTime: 0x000000025b5db6d5\n\nFaulting task 2 Call Stack: 0x00000000011078c4 0x0000000001107250 0x0000000001107064 0x000000000110acf4 0x000000000110adb4 0x00000000010ef884 0x00000000010f3c38 0x00000000010e9438 0x00000000010148cc 0x00000000010e93a8 0x00000000011069b4 0x0000000001106730
0
0
604
Oct ’24
Disabling Streamlined Purchasing
We have an application that currently supports iOS 16, and in order to disable Streamlined Purchasing, the latest approved binary must include the necessary StoreKit APIs. The StoreKit API includes the PurchaseIntent, which is available from iOS 16.4. Our question is: Can we disable Streamlined Purchasing for our app? If yes, how will it work for devices running iOS versions earlier than 16.4?
0
0
414
Oct ’24