Skip to main content
Question

Offerings are nil when testing (a classic, I know - but with Xcode StoreKit Testing)

  • 24 November 2021
  • 1 reply
  • 186 views

I have followed all the instructions I can find, but I cannot get the Purchases framework to give me any offerings when running a debug build in the simulator against Xcode StoreKit testing.

  1. Offerings, entitlements, packages and products are set up
  2. I’ve set up my Xcode scheme to use the storekit configuration file (I also see three in the list, as mentioned elsewhere by another user - I’ve tried all three to no avail)
  3. RC product IDs match Xcode StoreKit config product IDs even though I’m just testing the Debug build that I don’t submit to Apple.
  4. I created an App ID for the debug bundle ID etc. in App Store Connect
  5. I’ve uploaded the StoreKit testing cert to RC
  6. I’ve set up an app-specific password on the IAPs for the debug build in App Store Connect and put that into RC
  7. My app has the In App Purchases entitlement in Xcode
  8. All my banking & agreements stuff is sorted out App Store Connect

The things I am NOT doing:

  • Running on a real device. Xcode StoreKit testing works in the simulator, doesn’t it?
  • App is not “Ready to submit”. Because it’s the debug app. Do I really have to archive and submit for review + populate metadata just to get RC to work with StoreKit?

The above two do not seem to be things I need to do, because my day job’s app does not even have the debug app registered with App Store Connect and we use StoreKit testing there fine, on the simulator too as far as I recall.

Surely if there is a problem that prevents RC from fetching the offerings, it should show what this is? The offerings are clearly configured so it should be reporting the reason for the failure.

I tweeted yesterday that in two hours I managed to integrate all the RC code — it was pretty amazing. Today… I’ve spent more time just trying to follow all the instructions (which are pretty piecemeal - can’t we get a single document guide per platform?) and I’ve not got anywhere.

Here’s the log output showing that it makes a request and RC returns a 304 indicating the content is not changed but… we never had any so 🤷‍♂️

2021-11-24 22:11:54.448602+0000 Captionista Debug274834:10233232] .Purchases] - DEBUG: ℹ️ Debug logging enabled
2021-11-24 22:11:54.448686+0000 Captionista Debug/74834:10233232] 1Purchases] - DEBUG: ℹ️ SDK Version - 3.12.4
2021-11-24 22:11:54.448736+0000 Captionista Debug<74834:10233232] 2Purchases] - DEBUG: 👤 Initial App User ID - (null)
2021-11-24 22:11:54.449656+0000 Captionista Debugl74834:10233232] 2Purchases] - DEBUG: ℹ️ No cached Offerings, fetching from network
2021-11-24 22:11:54.451788+0000 Captionista Debugn74834:10233232] -Purchases] - DEBUG: ℹ️ Vending PurchaserInfo from cache.
2021-11-24 22:11:54.458611+0000 Captionista Debugf74834:10233232] 2plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000c6cae0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2021-11-24 22:11:54.622561+0000 Captionista Debug074834:10233573] 2Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/$RCAnonymousID0X0P+08f4d245eeeec427cbb5878ac657921f9/offerings
2021-11-24 22:11:54.622697+0000 Captionista Debug974834:10233573] rPurchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/$RCAnonymousID:8f4d245eeeec427cbb5878ac657921f9/offerings
2021-11-24 22:11:54.623902+0000 Captionista Debugc74834:10233232] gPurchases] - DEBUG: ℹ️ applicationDidBecomeActive
2021-11-24 22:11:54.624544+0000 Captionista Debugl74834:10233573] APurchases] - DEBUG: ℹ️ There's a request currently running and 0 requests left in the queue, queueing GET /subscribers/$RCAnonymousID0X0P+08f4d245eeeec427cbb5878ac657921f9
2021-11-24 22:11:55.041025+0000 Captionista Debug474834:10233577] aboringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
objcs74834]: Class _PathPoint is implemented in both /Applications/Xcode-beta-2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x1116babb8) and /Applications/Xcode-beta-2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x295655210). One of the two will be used. Which one is undefined.
objcu74834]: Class _PointQueue is implemented in both /Applications/Xcode-beta-2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x1116bab90) and /Applications/Xcode-beta-2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x295655238). One of the two will be used. Which one is undefined.
2021-11-24 22:11:55.160275+0000 Captionista Debuge74834:10233579] uPurchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/$RCAnonymousID:8f4d245eeeec427cbb5878ac657921f9/offerings 304
2021-11-24 22:11:55.161091+0000 Captionista Debugc74834:10233579] /Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/$RCAnonymousID0X0P+08f4d245eeeec427cbb5878ac657921f9/offerings, 1 requests left in the queue
2021-11-24 22:11:55.161212+0000 Captionista Debugr74834:10233579] Purchases] - DEBUG: ℹ️ Starting the next request in the queue, <RCHTTPRequest: httpMethod=GET
path=/subscribers/$RCAnonymousID0X0P+08f4d245eeeec427cbb5878ac657921f9
requestBody=(null)
headers={
Authorization = "Bearer XXXXXXXXXXXXXXXXXX";
}
retried=0
>
2021-11-24 22:11:55.161700+0000 Captionista DebugX74834:10233579] Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/$RCAnonymousID0X0P+08f4d245eeeec427cbb5878ac657921f9
2021-11-24 22:11:55.161760+0000 Captionista Debugo74834:10233579] 5Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/$RCAnonymousID:8f4d245eeeec427cbb5878ac657921f9
2021-11-24 22:11:55.281249+0000 Captionista Debug$74834:10233577] 4Purchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/$RCAnonymousID:8f4d245eeeec427cbb5878ac657921f9 304
2021-11-24 22:11:55.282176+0000 Captionista Debug$74834:10233577] 4Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/$RCAnonymousID0X0P+08f4d245eeeec427cbb5878ac657921f9, 0 requests left in the queue

 

1 reply

Badge +5

Note — if I delete the app and try again, the offerings request receives a 200, and still no offerings.

Reply