Team-scoped keys introduce the ability to restrict your token authentication keys to either development or production environments. Topic-specific keys in addition to environment isolation allow you to associate each key with a specific Bundle ID streamlining key management.
For detailed instructions on accessing these features, read our updated documentation on establishing a token-based connection to APNs.
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 running into a contradictory requirement involving the DeviceActivity Report extension (com.apple.deviceactivityui.report-extension) that makes it impossible to both:
upload the app to App Store Connect, and
install the app on a physical device.
This creates a complete catch-22.
📌 Overview
My extension:
Path: Runner.app/PlugIns/LoADeviceActivityReport.appex
Extension point: com.apple.deviceactivityui.report-extension
Implementation (SwiftUI):
import SwiftUI
import DeviceActivity
@main
struct LoADeviceActivityReport: DeviceActivityReportExtension {
var body: some DeviceActivityReportScene {
// ...
}
}
This is the standard SwiftUI @main DeviceActivityReportExtension template.
🟥 Side A — iOS runtime behavior (device installer)
If I add either of these keys to the extension's Info.plist:
NSExtensionPrincipalClass
NSExtensionMainStoryboard
then the app cannot be installed on a real iPhone/iPad.
The device installer fails with:
Error 3002
AppexBundleContainsClassOrStoryboard
NSExtensionPrincipalClass and NSExtensionMainStoryboard are not allowed
for extension point com.apple.deviceactivityui.report-extension.
To make the app install and run, I must remove both keys completely.
This leaves the extension Info.plist like:
NSExtension
NSExtensionPointIdentifier
com.apple.deviceactivityui.report-extension
With this, the app installs and runs correctly.
🟥 Side B — App Store Connect upload validator
However, when I upload the IPA with the runtime-correct Info.plist, App Store Connect rejects it:
State: STATE_ERROR.VALIDATION_ERROR (HTTP 409)
Missing Info.plist values.
No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found in
extension Info.plist for Runner.app/PlugIns/LoADeviceActivityReport.appex.
So ASC requires that at least one of those keys be present.
💥 The catch-22
If I add PrincipalClass / MainStoryboard:
✔ App Store Connect validation passes
❌ But the app can NOT be installed on any device (Error 3002)
If I remove PrincipalClass / MainStoryboard:
✔ The app installs and runs correctly
❌ ASC rejects the upload with “Missing Info.plist values”
There is currently NO Info.plist configuration that satisfies both:
Runtime:
"NSExtensionPrincipalClass and NSExtensionMainStoryboard are not allowed."
App Store Connect:
"You must include NSExtensionPrincipalClass or NSExtensionMainStoryboard."
📌 Expected behavior
For SwiftUI @main DeviceActivityReportExtension, the documentation and examples suggest the correct configuration is:
NSExtensionPointIdentifier
com.apple.deviceactivityui.report-extension
with no principal class or storyboard at all.
If that is correct for runtime, ASC seems to need updated validation rules for this extension type.
❓My Questions
What is the officially correct Info.plist configuration for a SwiftUI DeviceActivityReportExtension?
Should principal class / storyboard not be required for this extension type?
Is this a known issue with App Store Connect validation?
Is there currently a workaround that allows:
installation on device and
successful App Store Connect upload,
without violating runtime restrictions?
I'm encountering a strange behavior with one of my home's on Home app while I'm off network. When I launch the app it indicates that the hub is not responding and all of my devices are unavailable.
However, on the menu bar at the bottom if I switch to "Automation" and back to "Home" the pop-up goes away and my devices are accessible again (sometimes this take a few attempts). Siri is also able to consistently control my devices without an issue.
The same behavior occurs with Home app on other devices (e.g. Mac) and with other members that have access to the household. 3rd party HomeKit app like "Controller" does not have an issue.
This issue began with iOS 26 and I haven't had much luck resolving the issue. I already tried rebooting everything, including removing and re-adding an Apple TV (home hub). I have other homes shared with me in Home App with similar network/environment that are still working. The home I'm having issues has the most number of devices though (over 100+).
I filed FB19631435 about this just now. Basically: starting with 15.6, we've had reports (internally and outternally) that after some period of time, networking fails so badly that it can't even acquire a DHCP lease, and the system needs to be rebooted to fix this. The systems in question all have at least 2 VPN applications installed; ours is a transparent proxy provider, and the affected system also had Crowdstrike's Falcon installed. A customer system reported seemingly identical failures on their systems; they don't have Crowdstrike, but they do have Cyberhaven's.
Has anyone else seen somethng like this? Since it seems to involve three different networking extensions, I'm assuming it's due to an interaction between them, not a bug in any individual one. But what do I know? 😄
Hello,
We are having an issue with the RequestReview API and were hoping to get some help. We know that there is no guarantee that the in-app review modal will show and we know that there are 3 circumstances in which it will definitely not appear:
if the user has turned off in-app review/ratings in their settings
if the user has submitted a review for that app on that device within the last 365 days
if the user has been asked for a review >3 times in the last 365 days
When testing our implementation, every single one of our testers did not receive the rating modal despite the fact that we had all our testers turn on the app rating setting and that we have never asked for reviews from our app before. So that seems suspicious. While it is possible that something is up with our code (and I have provided some snippets below) we are also concerned that apple maybe is suppressing it for another reason. We really want to go live with our app review code but unfortunately we are not able to get confidence that it will ever appear for the user. Can you please help us understand why this isn't working.
The code: We are using the SwiftUI approach to requesting review. Here are some relevant code snippets
Important to note, we have a modal that appears when the user is in our list of active, targeted users. If they tap yes on this modal, it should show the in app rate the app system modal. If they tap no, we present them with an airship survey so that they can give feedback. Here is the code for the Yes button action:
@Environment(\.requestReview) private var requestReview
private var yesButton: some View {
Button(
action: {
dismiss()
requestReview()
},
label: {
Text(Lingua.General.appRateFirstButton)
.regularParagraph()
.frame(width: 180, height: 35)
}
)
.customButtonStyle(
foregroundColor: .black,
backgroundColor: Color(.powderBlue),
radius: 36
)
}
and this is the logic we use to determine whether we want to show them the modal in the first place. Obviously, a lot of this code leads to deeper areas in our logic and code but to give an idea...
private func showAppRateModalIfNeeded() {
if preferencesManager.appRateReviewShown == nil,
accountManager.userAccount?.permissions.rateTheApp == true {
let appReviewModalVC = UIHostingController(rootView: AppReviewModal())
appReviewModalVC.view.backgroundColor = .init(white: 0, alpha: 0.6)
appReviewModalVC.modalPresentationStyle = .overFullScreen
appReviewModalVC.modalTransitionStyle = .crossDissolve
parentVC?.navigationController?.present(appReviewModalVC, animated: true)
preferencesManager.appRateReviewShown = true
}
}
When testing in debug, we do find that the modal appears and works as expected. However, on release builds nobody is able to trigger it. Why? Are we doing something wrong here or is Apple just suppressing it. We are thinking about implementing the button taking the user directly into the app store review but we'd prefer to do the lower-friction dialog in-app if we can get it work so the user doesn't get sent out of the app.
Topic:
App & System Services
SubTopic:
StoreKit
The universal links for my apps stopped working.
The server where the AASA files where hosted worked on IPV4 exclusively, a few days ago i changed the configuration to IPV6 only. I´ve created new IPV6 entries, renewed all certifactes and deleted all IPV4 entries for the domains.
All seemed fine, but at Saturday I realized that my universal links stopped working for new user.
What i´ve done to find the issue:
Example domain that was used for debugging: "https://developffw.burns.fun"
I´ve verified the AASA file is hosted properly by using different browsers and Postman to retrieve it. The file can be accessed and the certificates look fine.
Output of curl -v https://developffw.burns.fun/.well-known/apple-app-site-association
* Host developffw.burns.fun:443 was resolved.
* IPv6: 2a01:4f8:13b:340a::2
* IPv4: (none)
* Trying [2a01:4f8:13b:340a::2]:443...
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* ALPN: server accepted http/1.1
* Established connection to developffw.burns.fun (2a01:4f8:13b:340a::2 port 443) from 2a00:79c0:65c:8b00:80ee:175b:3e2a:1e7d port 61014
* using HTTP/1.x
> GET /.well-known/apple-app-site-association HTTP/1.1
> Host: developffw.burns.fun
> User-Agent: curl/8.16.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Server: nginx/1.22.1
< Date: Mon, 15 Dec 2025 11:34:22 GMT
< Content-Type: application/octet-stream
< Content-Length: 329
< Last-Modified: Sat, 21 Dec 2024 08:53:11 GMT
< Connection: keep-alive
< ETag: "676681f7-149"
< Accept-Ranges: bytes
<
{
"applinks": {
"details": [
{
"appIDs": [ "6LN7G8JEA5.burns.FFW-Manager-SwiftUI.Debug"],
"components": [
{
"/": "/onboard",
"?": { "id": "*"},
"?": { "name": "*"},
"?": { "token": "*" }
}
]
}
]
}
}
* Connection #0 to host developffw.burns.fun:443 left intact
I took a look at the headers from the Apple CDN network response. These indicate some sort of connection error.
The response code is 404
Response headers:
Apple-Failure-Details: {"cause":"dial tcp [2a01:4f8:13b:340a::2]:443: connect: network is unreachable"}
Apple-Failure-Reason: SWCERR00305 Network error
Apple-From: https://betaffw.burns.fun/.well-known/apple-app-site-association
Apple-Try-Direct: false
Via: https/1.1 defra2-vp-vst-003.ts.apple.com (acdn/268.16305), https/1.1 defra2-vp-vfe-004.ts.apple.com (acdn/268.16305), http/1.1 defra2-xdc-mx-028.ts.apple.com (acdn/3.16363), https/1.1 defra1-edge-fx-021.ts.apple.com (acdn/3.16363)
X-Cache: hit-stale, miss, hit-fresh, miss
CDNUUID: 4321f35e-b73b-4031-a054-7c63af69e126-712221049
Took a look at the log files of the server.
I can´t find any entry from the Apple servers neither in the default logs nor in the error log entries.
The curl attempts are logged with response code 200.
I´ve tried sudo swcutil dl -d https://developffw.burns.fun/onboard in the Terminal on my MAC.
Output:
The operation couldn´t be completed. (SWCErrorDomain error 8.)
This indicates to me threre is an issue for the Apple servers accessing my server. But I don´t know what could be the reason. There is no firewall configuration that could block the requests. And there has been no change at all besides the IPV4 / IPV6 protocol change.
This issue is the same for all the domain listed on this server.
I´v even created a new app for this purpose and created a new AASA entry and associated link. Same issue.
I´m pretty much lost here. Everything looks fine from my side. Google assetlinks.json seem to work fine.
I would really appreciate some help on how to solve this, i´m at my wits end.
Hi,
You're here because you've had issues with your implementation of Wallet Extensions for Apple Pay In-App Provisioning or In-App Verification. To prevent sending sensitive credentials in plain text, create a new report in Feedback Assistant to share the details requested below with the appropriate log profiles installed.
Gathering Required Information for Troubleshooting Apple Pay In-App Provisioning or In-App Verification Issues
While troubleshooting Apple Pay In-App Provisioning or In-App Verification, it is essential that the issuer is able to collect logs on their device and check those logs for error message. This is also essential when reporting issues to Apple. To gather the required data for your own debugging as well as reporting issues, please perform the following steps on the test device:
Install the Apple Pay and Wallet profiles on your iOS or watchOS device. If the issue occurs on Mac, continue to Step 2.
Reproduce the issue and make a note of the timestamp when the issue occurred, while optionally capturing screenshots or video.
Gather a sysdiagnose on the same iOS or watchOS device, or on macOS.
Create a Feedback Assistant report with the following information:
The bundle IDs
App bundle ID
Non-UI app extension bundle ID (if applicable)
UI app extension bundle ID (if applicable)
The serial number of the device.
For iOS and watchOS: Open Settings > General > About > Serial Number (tap and hold to copy).
For macOS: Open the Apple () menu > About This Mac > Serial Number.
The SEID (Secure Element Identifier) of the device, represented as a HEX encoded string.
For iOS and watchOS: Open Settings > General > About > SEID (tap and hold to copy).
For macOS: Open the Apple () menu > About This Mac > System Report > NVMExpress > Serial Number.
The sysdiagnose gathered after reproducing the issue.
The timestamp (including timezone) of when the issue was reproduced.
The type of provisioning failure (e.g., error at Terms & Conditions, error when adding a card, etc.)
The issuer/network/country of the provisioned card (e.g., Mastercard – US)
Last 4 digits of the FPAN
Last 4 digits of the DPAN (if available)
Was this test initiated from the Issuer App? (e.g., yes or no)
The type of environment (e.g., sandbox or production)
Screenshots or videos of errors and unexpected behaviors (optional).
Important: From the logs gathered above, you should be able to determine the cause of the failure from PassbookUIService, PassKit or PassKitCore, and by filtering for your SEID or bundle ID of your app or app extensions in the Console app.
Submitting your feedback
Before you submit to Feedback Assistant, please confirm the requested information above is included in your feedback. Failure to provide the requested information will only delay my investigation into the reported issue within your Apple Pay client.
After your submission to Feedback Assistant is complete, please respond in your existing Developer Forums post with the Feedback ID. Once received, I can begin my investigation and determine if this issue is caused by an error within your client, a configuration issue within your developer account, or an underlying system bug.
Cheers,
Paris X Pinkney | WWDR | DTS Engineer
I am facing a problem of payment using credit card.
I tried several banks and cards without any result.
I also used one of the card I have successfully paid another account.
Heeeeelp
Hello everybody!
I'm currently working on a Bluetooth Low Energy Sync that is using BGTaskScheduler & successfully running periodically in the Background on iOS 26. I did watch this years WWDC Session 227 (Finish tasks in the background) & follow the recommendations as suggested.
Currently, the App is only using 37 Mb (iPhone 12 mini) & no Location or other services are running in Background.
However, when opening Safari & scrolling through some webpages, the App is killed because of "Terminated due to memory issue". I profiled the App & followed advice when it comes to reducing the memory footprint of the App. Are there any additional steps I can take to prevent the App being killed? Are there any recommendations for periodically scheduled Tasks when it comes to the Interval? Do more frequent Tasks (30min compared to one or two hours) have any impact? I tried many different schedules but none seem to make a difference.
From my observation, the App is first suspended & eventually killed because of the Memory Pressure. Any hints, suggestions or recommendations are highly appreciated!
Thanks a lot for the support!
My main goal is to maximize BLE range at the moment, though eventually I would like to allow for greater throughput when updating firmware over the air as well. I understand that Coded PHY is not on the roadmap based on the support ticket I previously entered, but is there any way to force 1M PHY. Even when I request it, I get a phy renegotiation (update) of 2 PHY.
We are developing a hybrid iOS app where Angular content is rendered inside a WKWebView, hosted by a native Swift application.
We use the GameController framework to detect whether an external Bluetooth keyboard is connected to an iPad. The following code is executed when the app enters the foreground and also when requested by the web layer:
func keyboardStatusHandler(){
let isKeyboardConnected = GCKeyboard.coalesced != nil
if(!isKeyboardConnected){
//sent status to Angular
} else {
//sent status to Angular
}
}
Crash details
We are seeing intermittent crashes on iPad with the following stack trace:
Crashed: GCDeviceSession.HID
0 libobjc.A.dylib 0x7db8 objc_retain_x8 + 16
1 libsystem_blocks.dylib 0xfb8 void HelperBase<ExtendedInline>::copyCapture<(HelperBase<ExtendedInline>::BlockCaptureKind)3>(unsigned int) + 48
2 libsystem_blocks.dylib 0xbc4 HelperBase<GenericInline>::copyBlock(Block_layout*, Block_layout*) + 108
3 libsystem_blocks.dylib 0xc94 _call_copy_helpers_excp + 60
4 libsystem_blocks.dylib 0xef8 _Block_copy + 412
5 libdispatch.dylib 0x1a70 _dispatch_Block_copy + 32
6 libdispatch.dylib 0x792c dispatch_async + 56
7 libdispatch.dylib 0x792c dispatch_channel_async + 56
8 GameController 0xea6dc -[GCKeyboardInput _handleKeyboardEvent:] + 324
9 GameController 0x22508 __53-[_GCKeyboardEventHIDAdapter initWithSource:service:]_block_invoke + 376
10 GameController 0x11d30 -[_GCHIDEventSubject publishHIDEvent:] + 268
11 GameController 0xb79cc __40-[_GCHIDEventUIKitClient initWithQueue:]_block_invoke_3 + 44
12 libdispatch.dylib 0x1b584 _dispatch_client_callout + 16
13 libdispatch.dylib 0x12088 _dispatch_async_and_wait_invoke_and_complete_recurse + 272
14 libdispatch.dylib 0x8448 _dispatch_async_and_wait_f + 108
15 GameController 0xb7984 __40-[_GCHIDEventUIKitClient initWithQueue:]_block_invoke_2 + 132
16 GameController 0xb746c __48-[__GCHIDEventUIKitClient _initWithApplication:]_block_invoke + 256
17 UIKitCore 0x11fd394 __61-[UIEventFetcher _setHIDGameControllerEventObserver:onQueue:]_block_invoke_3 + 40
18 libdispatch.dylib 0x1aac _dispatch_call_block_and_release + 32
19 libdispatch.dylib 0x1b584 _dispatch_client_callout + 16
20 libdispatch.dylib 0xa2d0 _dispatch_lane_serial_drain + 740
21 libdispatch.dylib 0xadac _dispatch_lane_invoke + 388
22 libdispatch.dylib 0x151dc _dispatch_root_queue_drain_deferred_wlh + 292
23 libdispatch.dylib 0x14a60 _dispatch_workloop_worker_thread + 540
24 libsystem_pthread.dylib 0xa0c _pthread_wqthread + 292
25 libsystem_pthread.dylib 0xaac start_wqthread + 8
Observed scenarios
Crash occurs when the app transitions from background to foreground
Crash also occurs when the Angular layer requests keyboard status, triggering the same code path
Questions
Has anyone encountered crashes related to GCKeyboard.coalesced or GCKeyboardInput like this?
Are there known issues with the GameController framework when querying keyboard state during app lifecycle transitions?
Is there a recommended or safer way to detect external keyboard connection status on iPad (especially when using WKWebView)?
Any insights, known platform issues, or suggested workarounds would be greatly appreciated.
Thanks!
Hello,
I’m integrating promotional offers for auto-renewable subscriptions using StoreKit 2.
The offer is displayed correctly, the Apple purchase sheet appears, and I can start the payment flow. The sheet shows the correct discounted price and the end date of the offer. However, after confirming the purchase, an alert appears saying “Unable to Purchase - Contact the developer for more information”
When dismissing the alert, Xcode logs the following:
Purchase did not return a transaction:
Error Domain=ASDServerErrorDomain Code=3902
"No se ha podido realizar la compra"
UserInfo={
NSLocalizedFailureReason=No se ha podido realizar la compra,
client-environment-type=Sandbox,
AMSServerErrorCode=3902,
storefront-country-code=ESP
}
Test environment:
App installed from Xcode on a real iPhone
Logged in with a Sandbox Apple ID
Using StoreKit 2
Promotional offer applied using:
Product.PurchaseOption.promotionalOffer(_:compactJWS:)
On the server side, I generate the promotional offer signature exactly as described in Apple’s documentation:
https://developer.apple.com/documentation/storekit/generating-a-signature-for-promotional-offers
The signature is generated using a Subscription Key
Signed with ECDSA + SHA256
Uses the correct invisible separator (U+2063)
The signature is validated locally using the derived public key and verifies correctly
The sandbox user has had previous subscriptions, which is why this promotional offer is eligible and shown.
Given that:
The offer is displayed correctly
The purchase sheet shows the discounted price and duration
The signature validates locally
The error occurs only after confirming the purchase
My question is:
Is this a known limitation or issue with promotional offers in the Sandbox environment?
Should promotional offers be tested exclusively via TestFlight instead of Sandbox?
Any clarification would be greatly appreciated.
Thank you!
Trying to figure out how to send btc, eth, etc, phone to phone. Square app allows for the phone to turn into a payment terminal for fiat currencies and payment systems. the data encryption logic and sending p2p is similar but can that functionality be enabled for alternative purposes i.e. sending crypto phone to phone (designated wallet on one phone to designated wallet on another)?
The One-time codes documentation details how to enable autofill for SMS based codes. However, there is no details about how to correctly implement autofill for email based codes.
I am observing the email based autofill works inconsistently when using email based OTC. In my application:
There is latency of 10-15 seconds from when the email arrives to when it is available for autofill.
After the autofill feature is used, the OTC email is not being deleted from the inbox automatically.
Without documentation, it's unclear to me what I might be doing wrong that is causing these side effects.
I found an ietf proposal for how autofill with email based codes might work, but it’s unclear if this is how Apple has implemented the feature: https://www.ietf.org/archive/id/draft-wells-origin-bound-one-time-codes-00.html#name-email
Existing docs for Autofill using SMS: https://developer.apple.com/documentation/security/enabling-autofill-for-domain-bound-sms-codes
I recently submitted an Advanced App Clip Experience, and the status currently shows as "Received."
My default App Clip Experience is already working well, but I need the advanced experience to go live as soon as possible. Does anyone know the typical timeframe for this to be published?
Also, will the status change from "Received" to something else when it is fully active? Any insight would be appreciated.
Thanks!
Hello,
This is my first post in the forums, and I'm still learning my way with iOS Development and Swift. My apologies if the formatting is not correct, or If I'm making any mistakes.
I'm currently trying to implement an iOS App where the device needs to share the location with my server via an API call.
The use case is as follows: the server expects location updates to determine if a device is inside/outside a geofence. If the device is stationary, no locations need to be sent. If the device begins moving, regardless of whether the app is in foreground, background, or terminated, the app should resume posting locations to the server.
I've decided to use the CLLocationUpdate.liveUpdates() stream, together with CLBackgroundActivitySession().
However, I have not been able to achieve the behavior successfully. My app either maintains the blue CLActivitySession indicator active, regardless of whether the phone is stationary or not, or kills the Indicator (and the background capability) and does not restore it when moving again. Below I've attached my latest code snippet (the indicator disappears and does not come back).
// This method is called in the didFinishLaunchingWithOptions
func startLocationUpdates(precise: Bool) {
// Show the location permission pop up
requestAuthorization()
// Stop any previous sessions
stopLocationUpdates()
Task {
do {
// If we have the right authorization, we will launch the updates in the background
// using CLBackgroundActivitySession
if self.manager.authorizationStatus == .authorizedAlways {
self.backgroundActivity = true
} else {
self.backgroundActivity = false
self.backgroundSession?.invalidate()
}
// We will start collecting live location updates
for try await update in CLLocationUpdate.liveUpdates() {
// Handle deprecation
let stationary = if #available(iOS 18.0, *) {
update.stationary
} else {
update.isStationary
}
// If the update is identified as stationary, we will skip this update
// and turn off background location updates
if stationary {
self.backgroundSession?.invalidate()
continue
}
// if background activity is enabled, we restore the Background Activity Session
if backgroundActivity == true { self.backgroundSession = CLBackgroundActivitySession() }
guard let location = update.location else { continue }
// Do POST with location to server
}
} catch {
print("Could not start location updates")
}
}
}
I'm not sure why the code does not work as expected, and I believe I may be misunderstanding how the libraries Work. My understanding is that the liveUpdates stream is capable of emitting values, even if the app has gone to the background/terminated, thus why I'm trying to stop/resume the Background Activity using the "stationary" or "isStationary" attribute coming from the update.
Is the behavior I'm trying to achieve possible? If so, I'm I using the right libraries for it? Is my implementation correct? And If not, what would be the recommended approach?
Regards
I'm implementing the PushToTalk framework and have encountered an issue where channelManager(_:didActivate:) is not called under specific circumstances.
What works:
App is in foreground, receives PTT push → didActivate is called ✅
App receives audio in foreground, then is backgrounded → subsequent pushes trigger didActivate ✅
What doesn't work:
App is launched, user joins channel, then immediately backgrounds
PTT push arrives while app is backgrounded
incomingPushResult is called, I return .activeRemoteParticipant(participant)
The system UI shows the speaker name correctly
However, didActivate is never called
Audio data arrives via WebSocket but cannot be played (no audio session)
Setup:
Channel joined successfully before backgrounding
UIBackgroundModes includes push-to-talk
No manual audio session activation (setActive) anywhere in my code
AVAudioEngine setup only happens inside didActivate delegate method
Issue persists even after channel restoration via channelDescriptor(restoredChannelUUID:)
Question:
Is this expected behavior or a bug? If expected, what's the correct approach to handle
incoming PTT audio when the app is backgrounded and hasn't received audio while in the
foreground yet?
is there a way to make a test subscription in-app purchase expire immediately, for faster testing? it seems exceedingly complicated to test subscriptions if we have to a) wait until the next day for expiry, or b) keep on creating new apple ids to get into a fully unsubscribed state? it is still kind of madness testing this stuff, after all the years it has been available.
I’m implementing a subscription purchase flow using promo code redemption via an external App Store URL.
Flow:
User taps “Purchase” in the app (spinner shown)
App opens the promo redemption URL (apps.apple.com/redeem)
User completes redemption in the App Store
User returns to the app
The app must determine whether the subscription was purchased within a reasonable time window
The app listens to Transaction.updates and also checks
Transaction.currentEntitlements when the app returns to the foreground.
Issue:
After redeeming a subscription promo code via the App Store and returning to the
app, the app cannot reliably determine whether the subscription was successfully
purchased within a short, user-acceptable time window.
In many cases, neither Transaction.updates nor
Transaction.currentEntitlements reflects the newly redeemed subscription
immediately after returning to the app. The entitlement may appear only after a
significant delay, or not within a 60-second timeout at all, even though the
promo code redemption succeeded.
Expected:
When the user returns to the app after completing promo code redemption,
StoreKit 2 should report the updated subscription entitlement shortly thereafter
(e.g. within a few seconds) via either Transaction.updates or
Transaction.currentEntitlements.
Below is the minimal interactor used in the sample project. The app considers
the purchase successful if either a verified transaction for the product is received via Transaction.updates, or the product appears in Transaction.currentEntitlements when the app returns to the foreground. Otherwise, the flow fails after a 60-second timeout.
Questions:
Is this entitlement propagation delay expected when redeeming promo codes through the App Store?
Is there a recommended API or flow for immediately determining whether a subscription has been successfully redeemed?
Is there a more reliable way to detect entitlement changes after promo code redemption without triggering user authentication prompts (e.g., from AppStore.sync())?
import UIKit
import StoreKit
final class PromoPurchaseInteractor {
private let timeout: TimeInterval = 60
private struct PendingOfferRedemption {
let productId: String
let completion: (Result<Bool, Error>) -> Void
}
private var pendingRedemption: PendingOfferRedemption?
private var updatesTask: Task<Void, Never>?
private var timeoutTask: Task<Void, Never>?
enum DefaultError: Error {
case generic
case timeout
}
init() {
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
}
deinit {
NotificationCenter.default.removeObserver(self)
updatesTask?.cancel()
timeoutTask?.cancel()
}
func purchaseProduct(using offerUrl: URL, productId: String, completion: @escaping (Result<Bool, Error>) -> Void) {
guard pendingRedemption == nil else {
completion(.failure(DefaultError.generic))
return
}
pendingRedemption = PendingOfferRedemption(productId: productId, completion: completion)
startPurchase(using: offerUrl)
}
@objc private func willEnterForeground() {
guard let pendingRedemption = pendingRedemption else { return }
startTimeoutObserver()
Task {
if await hasEntitlement(for: pendingRedemption.productId) {
await MainActor.run {
self.completePurchase(result: .success(true))
}
}
}
}
private func startPurchase(using offerURL: URL) {
startTransactionUpdatesObserver()
UIApplication.shared.open(offerURL) { [weak self] success in
guard let self = self else { return }
if !success {
self.completePurchase(result: .failure(DefaultError.generic))
}
}
}
private func completePurchase(result: Result<Bool, Error>) {
stopTransactionUpdatesObserver()
stopTimeoutObserver()
guard let _ = pendingRedemption else { return }
pendingRedemption?.completion(result)
pendingRedemption = nil
}
private func startTransactionUpdatesObserver() {
updatesTask?.cancel()
updatesTask = Task {
for await update in Transaction.updates {
guard case .verified(let transaction) = update else { continue }
await MainActor.run { [weak self] in
guard let self = self,
let pending = self.pendingRedemption,
transaction.productID == pending.productId
else { return }
self.completePurchase(result: .success(true))
}
await transaction.finish()
}
}
}
private func stopTransactionUpdatesObserver() {
updatesTask?.cancel()
updatesTask = nil
}
private func startTimeoutObserver() {
guard pendingRedemption != nil else { return }
timeoutTask?.cancel()
timeoutTask = Task {
try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000_000))
await MainActor.run { [weak self] in
self?.completePurchase(result: .failure(DefaultError.timeout))
}
}
}
private func stopTimeoutObserver() {
timeoutTask?.cancel()
timeoutTask = nil
}
private func hasEntitlement(for productId: String) async -> Bool {
for await result in Transaction.currentEntitlements {
guard case .verified(let transaction) = result else { continue }
if transaction.productID == productId {
return true
}
}
return false
}
}
From the document https://developer.apple.com/documentation/sensorkit/srfetchrequest we know that "SensorKit places a 24-hour holding period on newly recorded data before an app can access it. This gives the user an opportunity to delete any data they don’t want to share with the app. A fetch request doesn’t return any results if its time range overlaps this holding period."
Will this holding period reset each time when I called startRecording() ?
Let's say I upgrade my app to a new version, do I need to call startRecording again to init the data collection process? will it be able to query the data collected from previous version's app ?
Topic:
App & System Services
SubTopic:
General
Bank Accounts details are outdated and status is stack on processing with error: "Your banking updates are processing, and you should see the changes in 24 hours. You won't be able to make any additional updates until then."
This is now stack for a few years since we activated a previous Apple developer account. we must change banking details as it holds up development of an app with in-app purchases.
Finance department has been contacted and they do not answer
What shall we do? senior support staff keep referring to finance department and is not helping
Topic:
App & System Services
SubTopic:
Apple Pay