I'm testing my implementation of the new App Tracking Transparency framework and am running into an issue: requestTrackingAuthorization() never shows the authorization prompt, and ATTrackingManager.trackingAuthorizationStatus always returns .denied.
I've verified that the following settings are enabled: Privacy -> Tracking -> Allow Apps to Request to Track
Privacy -> Apple Advertising -> Personalized Ads (not sure this is even related)
I've deleted and reinstalled the app and restarted my device, but to no avail.
Any ideas as to what's going on here? Notably, I do see the prompt when running on the simulator, just not when running on actual hardware.
Versions of stuff
iOS: 14.3 (18C66)
Xcode: 12.3 (12C33)
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The documentation for Transaction.updates states, "If your app has unfinished transactions, the listener receives them immediately after the app launches. Without the Task to listen for these transactions, your app may miss them." My app is currently following these instructions: I start a background Task to await results from Transaction.updates in application(didFinishLaunchingWithOptions:). However, I've noticed that when using StoreKit testing on the Simulator, my app does not receive transactions via Transactions.updates if they occur while the app is not running. For example, if I subscribe to a monthly subscription and quit the app before the first renewal, when I fire the app back up, the "StoreKit Transactions" window in Xcode shows a new unfinished transaction, and that transaction is not delivered via Transaction.updates. I know that Transaction.updates is wired up correctly because if I let renewals happen while the app is running, they are delivered.
I see two probable explanations:
The simulator and/or StoreKit testing just aren't properly supporting this scenario
I'm actually supposed to be querying Transactions.unfinished at some point
I'm really unsure about #2 because I haven't seen it used in any sample code, nor found its intended usage discussed in any docs. Furthermore, this sample project exhibits the same exact issue: https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_a_store_in_your_app_using_the_storekit_api
Anyone have any insights here?
The sample code provided in https://developer.apple.com/wwdc21/10114 doesn't appear to call finish() on unverified transactions, and I haven't been able to find any documentation regarding what to do with unfinished transactions. However, Apple has always emphasized the importance of finishing transactions, and since a transaction object is provided even with the unverified state, I'd love some guidance!