Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

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
scenePhase change on display cadence change
My Watch app is a workout app that has to be careful to minimize CPU load when backgrounded to get below the 15% avg/60 s in order to avoid being terminated by the system. Accordingly I have logic to detect a transition to the background using a .onChange(of: scenePhase) { phase in… } handler which works well for cases where the app is backgrounded - it is able to reduce its CPU load to just 6-9% while backgrounded. But a special case of the change to scenePhase presents a challenge - when an overlay such as the Control Center or a long-look notification presents, there is no transition to .background, only to .inactive. This is a problem because the system nevertheless imposes the background CPU limit on the app while it’s being covered by the overlay, even though the app didn’t get the .background transition on the scenePhase handler. To further complicate matters, it now seems with watchOS 11 that whenever a transition is made in the screen cadence from .live to .seconds, the scenePhase handler is called with a transition to .inactive. Which is a problem because this transition has to be distinguished from the case of the overlay presentation - the cadence change has no CPU usage implications as long as the app remains foregrounded, but the overlay presentation does, and the system will terminate the app if it exceeds 15% avg/60s. My question: how can I distinguish between the two causes of the transition to .inactive for the two cases: 1) when the overlay presents, and 2) when the display shifts to the slow cadence?
0
0
320
Sep ’24
[macOS] Failed to perform in-line receipt renewal for application at path <path>
Hello, I have a customer who keeps getting an "app is damaged" error for a freshly downloaded app from the Mac App Store. The logs show the following lines: standard 12:58:40.390872+0200 storeuid Receipt Validation (at.EternalStorms.Yoink) Signature Check: PASS Bundle ID Check: PASS Bundle Version Check: PASS GUID Check: PASS Expiration Check: PASS standard 12:58:40.391649+0200 storelegacy StoreLegacy: Failed to perform in-line receipt renewal for application at path /Applications/Yoink.app : '(null)' The Mac in question is running macOS 12 Monterey - curiously, the customer has another Mac with that same system version and there it works just fine. What can be done to make this work again? Thank you, – Matthias
0
0
566
Oct ’24
How can I sync users with code/invite like that (image) with cloudkit, is it possible?
Users will receive a unique ID, if a user enters another user's ID they will go to a view where both have access to the information, being able to change, add, delete... (Paired, available on App Store) Public container is not secure, private with ckshare doesn't seem to work for what I would like, plus the content is very confusing I need something that uses native Apple technologies to build this system.
1
0
464
Sep ’24
Push notifications functions never triggered
I've spent over a day on this so I'm hoping someone on here has some idea as to what is going on for me. I've implemented push notifications in my app, but when I send a notification to a device, none of the receiving function are triggered. When the app is in the background, the notification arrives correctly, and when tapped it correctly launches the app - but the didReceiveRemoteNotification function is never triggered, so I'm unable to handle/react to the notification. When the app is in the foreground, neither the willLaunch or didReceive functions are triggered. I'm setting the UNUserNotificationCenterDelegate in the willFinishLaunchingWithOptions function, and when I monitor the app via the console, it shows no errors and shows willPresentNotification delivery succeeded I have updated the Background Modes to include background fetch, background processing, and remote notifications. I have also tested this on both the Xcode simulator and a physical device with the same results. I've also tested this with push notifications coming from my server, push notifications coming from the CloudKit console, and just dropping a JSON file onto the simulator. All resulted in the same behaviour. Does anyone have any idea why these functions might not be triggered??
3
0
508
Oct ’24
How can the owner access a zone he shared on cloudkit?
Using this Apple repository as a basis https://github.com/apple/sample-cloudkit-zonesharing I created and verified the shared zone and the same zone is private for the person who shared it and shared for the person who received it, so aren't they the same zones? [same zone but different id?] I can make the person who shared the zone (owner) access the zone as a .shared scope just like the person who was shared.
1
0
481
Oct ’24
Need Help problem
hello, apple send me this problem: We found that your in-app purchase products exhibited one or more bugs which create a poor user experience. Specifically, purchase feature was not responsive. Please review the details and resources below and complete the next steps. we did everything. Our app should be paid for but is offered for free. Payment cannot be made, who can help us? The app is called DRACHMI
0
0
248
Sep ’24
How to use In-app purchase for Auto Reload?
I have an app that allows users to complete a video call and then bills them a per-minute charge for the length of the call. How can I automatically bill my app user using in-app purchase without prompting for approval? I'm using Stripe on the web to complete an automatic purchase with the user's stored credit card. How do I accomplish the same thing on the web while on Apple device (or within my app) without prompting them for approval? They've already given approval by completing the call. I am aware that I can create an in-app purchase product for the necessary "credits" but this will prompt them to complete the purchase which should instead be automatic. Thanks!
1
0
390
Oct ’24
IOS 18: How to create a custom App 'Control' that could be display in Control List?
in ios 18, we can custom two bottom button on Lock Screen, in past, they are Flash and Camera. So I want my app's function could be display in here, and I custom it, and will show a Controls List, But I can not found my app's icon. How to make a myself Control item and add it to Control List? any guideline or tutorials are welcome :D
0
0
403
Sep ’24
app transfer encountered subscription verification and login issues
For V1 used for internal purchase verification, when will the exclusive shared key regenerated after transfer be replaced? Will it affect in-app purchases and subscriptions by online users? The V2 used for internal purchase verification uses the key ID instead of the dedicated shared key. In this case, what should we pay attention to before and after the transfer? Do I need to regenerate the key ID for the new account? Is the private shared key still useful? Do I need to generate a dedicated shared key again in the transferred App? What will be the impact on existing subscriptions after the transfer? What do I need to do with the current existing subscriptions? We have used universalLink, do we need to add a new TeamId to the apple-app-site-assn. txt file? { "applinks": { "apps": [], "details": [ { "appID": “TeamIdA.com.***.***”, "paths": [""] }, { "appID": “TeamIdB.com.***.***”, "paths": [""] } ] } } We have stored the login information in Keychain Sharing, is there no way to get the original stored information after transfer? Is there a reasonable solution?
0
0
573
Sep ’24
Unable to make a sandbox purchasing with SubscriptionStoreView
Hi I'm writing my first in-app purchase app, and I'm trying to do some testing with sandbox accounts. I wrote my subscription page use SwiftUI SubscriptionStoreView. And I read the documentation it says : The sandbox account appears in Settings > App Store after the first time you use the device to attempt a purchase in a development-signed app. But I have no idea how to make a sandbox purchasing. Every time I click the subscription button it just making a purchase in xcode environment. Did I missed anything? What can I do to make a sandbox pruchasing?
2
0
482
Oct ’24
Instant access to call log with new ios 18 commands
Hello, I am wondering about developing my application. Can the new commands available with iOS 18 give me access to the call log (recent calls)? With a request prior to installing the application for example. I saw that Truecaller has just launched an update on iOS to offer the same features as Android, i.e. capture the call log. Apple allows applications like Truecaller to integrate their spam databases into the iOS caller ID system. I wonder by which command! Otherwise, I can perhaps use the "SMS and Call Spam Reporting" commands and divert them to retrieve the call log. To tell you the truth, I'm trying to find, for my application, a way to retrieve recent call data to create a call dashboard of certain calls, by retrieving the name or phone number, call date, call time and call duration. Does anyone have an idea?
4
0
1.4k
Oct ’24
BGTask expiry is never called for the requested BGTask.
We have a push-to-talk client, Part of Push APNS, app never received the BG task expiry. The app is suspended. Received Push-To-Talk APNS Here requested a BGTask and it got successfully registered Since it is a PTT call path, it ended immediately(via code) due to internal restrictions Ex: DND mode for client specific. The client allowed BG time more than 30 seconds and looks client has been suspended but Never received a BG task expiration handler from OS In sys diagnose logs confirmed, BGTask registered successfully 2024-09-03 16:18:47.331890 +0530 default AT&T EPTT : Created background task . But never got fired expiration handler. Feedback - FB15145380
3
0
434
Oct ’24
Intermittently Transaction.latest(for:) api returns nil and unverified transaction
We are using method “Transaction.latest(for: productId)” to verify the transaction . Steps to reproduce : Step 1 : User made purchase for productId “product_id_one” Step 2 : “paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction])” api returns successful purchase for product_id_one . func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { for transaction in transactions { switch transaction.transactionState { case .purchased: let mProductId = transaction.payment.productIdentifier Print(mProductId) // product_id_one .. Step 3: Call “Transaction.latest(for: product_id_one)” api . guard let verificationResult = await Transaction.latest(for: productId) else { // Here some times its returning nil for valid transaction return } switch verificationResult { case .verified(let transaction): // at time its working fine . we are getting verified purchase . // Check the transaction and give the customer access to purchased case .unverified(let transaction, let verificationError): // Here some times its returning unverified for valid transaction } Issue : For valid purchase , Sometimes Transaction.latest(for: productId) api is returning nil and unverified transaction . This is intermittent  issue.
0
0
321
Sep ’24
Cloudkit issue | development environment
Hello! I deleted an index on the cloudkit console of a container in development environment and re-added it again with the same name. After that my app has been giving error on development environment. The live version is working fine as I haven't deployed the changes.. Any idea what can cause this issue and is there a way to fix it? Thank you
1
0
700
Oct ’24
Manage Subscriptions prompts for a sandbox user credential that belongs to another app
When I trigger the 'you've already purchased this subscription' alert and go to "Manage" my subscriptions, I'm prompted for a password to: a Sandbox test account that belongs to a different app and I no longer have access to Key Details: I no longer have access to that Sandbox user, as I no longer work for that company. I have long-since removed my AppleID from all of those apps using the appropriate flow to remove myself from their development accounts. As such, I cannot delete these sandbox users myself. I have wicked psychological damage from working at that company, and cannot 'reach out to them' to have them delete the sandbox accounts. I'm taking damage every time I see this alert as it is. I'm NOT logged into my iPhone as a Sandbox tester, but with my AppleID proper. NO purchases/iTunes email separate from my AppleID. The prior AppStore Connect + App that it's asking me for credentials for did not offer subscriptions of any kind. We only use Purchases Sandbox. We DON'T use StoreKit. Questions: Why am I being asked for this when I cannot ever succeed at providing it? How do I work around this problem, so I can view and manage my test subscriptions? Screenshots: This alert: Leads to this alert, which is an email address that belongs to a sandbox account that was created for an entirely different application on an entirely different AppStore Connect account, that I no longer develop for. I want to make this 100% crystal clear that there is no association whatsoever with my current application and the sandbox user this alert is asking me to provide credentials for.
1
0
375
Sep ’24
In-app provisioning error: Card eligibility status: 0
I am developing In-App Provisioning functionality within an iOS application. When I try to perform the process, the process fails and the following is displayed on the screen: "Your issuer does not yet offer support for this card". The PassbookUIService logs show: https://nc-pod8-smp device.apple.com:443/broker/v4/devices/xxxxxxxxxxxxxx/cards 200 Time profile: 0.25497 seconds { auxiliaryCapabilities = { }; eligibilityStatus = 0; sanitizedPrimaryAccountPrefix = ""; } ProvisioningStepEligibility: received eligibility status: 0 Showing eligibility issue with reason: 2 ProvisioningOperationComposer: Step 'eligibility' failed with error (null) Would like to seek your help to investigate the problem. Thanks
0
0
413
Sep ’24