Question

Problem fetching StoreKit Configuration file offerings on physical device

  • 16 January 2023
  • 13 replies
  • 107 views

Badge +3

I’ve set up a synced StoreKit Configuration file for my app. On simulators it fetches all the offerings without a hitch, but when running on device it doesn’t. Is this a known limitation or is there something I’ve missed?


13 replies

Userlevel 2
Badge +6

Hi Johan,

 

Not an expert with StoreKit config files at all (they are newer than my iOS development times haha), but it might be due to the schema not having the file selected. Do you have any other logs?

Badge +3

Hey Miguel!

The schema has the file selected properly so that shouldn’t be it.

I do get a log message which lead me to this board initially:

Error fetching offerings: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used).

More information: https://rev.cat/why-are-offerings-empty

 

I’ve looked through that post and made sure I’ve not missed any tips already specified there.

 

Badge +3

I’ve also made sure the Product IDs from RC match the ones in the Store Kit Config.

 

Userlevel 3
Badge +5

@Johan Forsell Hey! Let’s get this sorted out for you 😊 

Going to ask some high level questions here that you probably did but just wanted to make sure since they are on my debugging checklist…

  1. Your bundle identifier in your Xcode project matches the bundle identifier in your RevenueCat app
  2. Your are using the correct API key while configuring your SDK (its for the correct app for the correct platform)
  3. What version of Xcode are you using
  4. What version of iOS on your device?

Can you also give us the full console output logs from app start to trying to fetch products? There will probably be a lot of logs there but curious as what the SDK is all doing 😇

Badge +3

Thanks for digging in to this :)

  1. Double checked, yes.
  2. Double checked, yes.
  3. Xcode version 14.2 (14C18)
  4. iOS 16.2 (20C65) on iPhone 14 and iPhone SE. (Same on both unfortunately)

Actually the logs are empty apart from the message quoted above 🤔

 

Userlevel 3
Badge +5

@Johan Forsell The logs being empty is really strange! I just verified that this is working for me running a debug build on my device with a StoreKit config file. You should definitely see something like this 👇 Especially the first line.

2023-01-23 04:32:16.278321-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ Configuring SDK using RevenueCat's UserDefaults suite.
2023-01-23 04:32:16.280769-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: 👤 Identifying App User ID
2023-01-23 04:32:16.284904-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ Debug logging enabled
2023-01-23 04:32:16.284932-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ SDK Version - 4.17.0-SNAPSHOT
2023-01-23 04:32:16.284950-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ Bundle ID - com.revenuecat.StoreKitConfigDemo
2023-01-23 04:32:16.284963-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: 👤 No initial App User ID
2023-01-23 04:32:16.286142-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ No cached Offerings, fetching from network
2023-01-23 04:32:16.286626-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ GetCustomerInfoOperation: Started
2023-01-23 04:32:16.286724-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET subscribers/$RCAnonymousID%3A8b5384fbaf6e4984bc7b2fb9d8cd603a
2023-01-23 04:32:16.286886-0600 StoreKitConfigDemo[34700:8554378] [Purchases] - DEBUG: ℹ️ Network operation 'GetOfferingsOperation' found with the same cache key 'GetOfferingsOpe...'. Skipping request.
2023-01-23 04:32:16.292066-0600 StoreKitConfigDemo[34700:8554382] [Purchases] - DEBUG: ℹ️ API request started: GET

 

The project I ran is here located here - https://github.com/joshdholtz/storekit-config-file-demo

Do you mind maybe trying to run this same app on your device? I think this would help us show that this does work on your machine with your device and that there could be something else a little deeper going on 🤷‍♂️ This project uses a demo RevenueCat API key that matches the values in the StoreKit Config File so it should work for you without having to do anything (besides maybe a signing thing 😇)

 

Badge +3

I found the issue with the missing logs for my own app, here are the logs I get from running it:

2023-01-24 12:08:09.208296+0100 BarTab[5378:2811766] 9.6.0 - [GoogleUtilities/AppDelegateSwizzler][I-SWZ001014] App Delegate does not conform to UIApplicationDelegate protocol.
2023-01-24 12:08:09.211583+0100 BarTab[5378:2811736] [Purchases] - DEBUG: 👤 Identifying App User ID
2023-01-24 12:08:09.213215+0100 BarTab[5378:2811736] [Purchases] - DEBUG: ℹ️ Debug logging enabled
2023-01-24 12:08:09.213245+0100 BarTab[5378:2811736] [Purchases] - DEBUG: ℹ️ SDK Version - 4.12.1
2023-01-24 12:08:09.213265+0100 BarTab[5378:2811736] [Purchases] - DEBUG: ℹ️ Bundle ID - com.joforsell.BarTab
2023-01-24 12:08:09.213279+0100 BarTab[5378:2811736] [Purchases] - DEBUG: 👤 No initial App User ID
2023-01-24 12:08:09.260905+0100 BarTab[5378:2811736] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-24 12:08:09.260975+0100 BarTab[5378:2811736] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-24 12:08:09.261065+0100 BarTab[5378:2811736] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-01-24 12:08:09.502341+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ GetCustomerInfoOperation: Started
2023-01-24 12:08:09.502419+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1
2023-01-24 12:08:09.507108+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1
2023-01-24 12:08:09.508254+0100 BarTab[5378:2811736] [Purchases] - DEBUG: ℹ️ applicationDidBecomeActive
2023-01-24 12:08:09.510967+0100 BarTab[5378:2811736] [Purchases] - DEBUG: ℹ️ Offerings cache is stale, updating caches
2023-01-24 12:08:09.513862+0100 BarTab[5378:2811775] [Purchases] - WARN: ⚠️ The appUserID passed to logIn is the same as the one already cached. No action will be taken.
2023-01-24 12:08:09.514096+0100 BarTab[5378:2811775] [Purchases] - DEBUG: ℹ️ Vending CustomerInfo from cache.
2023-01-24 12:08:09.514129+0100 BarTab[5378:2811775] [Purchases] - WARN: ⚠️ The appUserID passed to logIn is the same as the one already cached. No action will be taken.
2023-01-24 12:08:09.514320+0100 BarTab[5378:2811775] [Purchases] - DEBUG: ℹ️ Vending CustomerInfo from cache.
2023-01-24 12:08:09.517607+0100 BarTab[5378:2811771] [Purchases] - DEBUG: ℹ️ No cached Offerings, fetching from network
nil
2023-01-24 12:08:10.402358+0100 BarTab[5378:2811774] [Purchases] - DEBUG: ℹ️ API request completed: GET /v1/subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1 304
2023-01-24 12:08:10.421793+0100 BarTab[5378:2811774] [Purchases] - DEBUG: ℹ️ Sending latest CustomerInfo to delegate.
2023-01-24 12:08:10.421926+0100 BarTab[5378:2811774] [Purchases] - DEBUG: 😻 CustomerInfo updated from network.
2023-01-24 12:08:10.422020+0100 BarTab[5378:2811774] [Purchases] - DEBUG: ℹ️ GetCustomerInfoOperation: Finished
2023-01-24 12:08:10.422202+0100 BarTab[5378:2811774] [Purchases] - DEBUG: ℹ️ Serial request done: GET subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1, 0 requests left in the queue
2023-01-24 12:08:10.422256+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Started
2023-01-24 12:08:10.422372+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1/offerings
2023-01-24 12:08:10.424203+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1/offerings
2023-01-24 12:08:10.618709+0100 BarTab[5378:2811765] [Purchases] - DEBUG: ℹ️ API request completed: GET /v1/subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1/offerings 304
2023-01-24 12:08:10.629735+0100 BarTab[5378:2811765] [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Finished
2023-01-24 12:08:10.630100+0100 BarTab[5378:2811765] [Purchases] - DEBUG: ℹ️ Serial request done: GET subscribers/ctHkUM5U0fY48Npd3ocBfvnmuTj1/offerings, 0 requests left in the queue
2023-01-24 12:08:10.630408+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ No existing products cached, starting store products request for: ["com.joforsell.BarTab.lifetime", "com.joforsell.BarTab.monthly", "com.joforsell.BarTab.annual"]
2023-01-24 12:08:10.632789+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ Found an existing request for products: ["com.joforsell.BarTab.monthly", "com.joforsell.BarTab.annual", "com.joforsell.BarTab.lifetime"], appending to completion
2023-01-24 12:08:10.632987+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ Found an existing request for products: ["com.joforsell.BarTab.monthly", "com.joforsell.BarTab.lifetime", "com.joforsell.BarTab.annual"], appending to completion
2023-01-24 12:08:10.633107+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ Found an existing request for products: ["com.joforsell.BarTab.annual", "com.joforsell.BarTab.lifetime", "com.joforsell.BarTab.monthly"], appending to completion
2023-01-24 12:08:10.633221+0100 BarTab[5378:2811777] [Purchases] - DEBUG: ℹ️ Found an existing request for products: ["com.joforsell.BarTab.monthly", "com.joforsell.BarTab.annual", "com.joforsell.BarTab.lifetime"], appending to completion
2023-01-24 12:08:10.683904+0100 BarTab[5378:2811777] <SKProduct: 0x282a4a9d0>: Skipping product "com.joforsell.BarTab.lifetime" because no price was available
2023-01-24 12:08:10.683983+0100 BarTab[5378:2811777] <SKProduct: 0x282a4a9c0>: Skipping product "com.joforsell.BarTab.annual" because no price was available
2023-01-24 12:08:10.684024+0100 BarTab[5378:2811777] <SKProduct: 0x282a4a9f0>: Skipping product "com.joforsell.BarTab.monthly" because no price was available
2023-01-24 12:08:10.684122+0100 BarTab[5378:2811777] [Purchases] - DEBUG: 😻 Store products request request received response
2023-01-24 12:08:10.684123+0100 BarTab[5378:2811774] [Purchases] - DEBUG: 😻 Store products request finished
2023-01-24 12:08:10.688602+0100 BarTab[5378:2811777] [Purchases] - ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
2023-01-24 12:08:10.688758+0100 BarTab[5378:2811777] [Purchases] - ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
2023-01-24 12:08:10.688875+0100 BarTab[5378:2811777] [Purchases] - ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
2023-01-24 12:08:10.689171+0100 BarTab[5378:2811777] [Purchases] - ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
2023-01-24 12:08:10.689268+0100 BarTab[5378:2811777] [Purchases] - ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
2023-01-24 12:08:10.689406+0100 BarTab[5378:2811736] [Purchases] - ERROR: 😿‼️ There is an issue with your configuration. Check the underlying error for more details. There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used).
More information: https://rev.cat/why-are-offerings-empty
Error fetching offerings: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used).
More information: https://rev.cat/why-are-offerings-empty

 

Userlevel 4
Badge +8

@Johan Forsell thanks for sharing the debug logs! That sheds some light on what’s going on. 

It seems like StoreKit itself is failing to fetch the products: these lines are coming directly from StoreKit. 

2023-01-24 12:08:10.684024+0100 BarTab[5378:2811777] <SKProduct: 0x282a4a9f0>: Skipping product "com.joforsell.BarTab.monthly" because no price was available

 

What version of iOS are you using? A few people here suggest that this issue is tied to some versions of iOS 16 beta and iOS 13. Are you able to test this out on another iOS version? 

https://stackoverflow.com/questions/73810958/skproduct-skipping-product-because-no-price-was-available

 

If you can share with us a sysdiagnose, we’d be happy to report this to Apple as a radar. 

 

Badge +3

Ah, okay! I’m running iOS 16.2. It’s likely I update to 16.3 later today to test, I’ll report back after!

What’s a sysdiagnose and how do I go about sharing it?

Userlevel 4
Badge +8

@Johan Forsell

Awesome, keep us posted! 

A sysdiagnose is basically a big log file that has information about everything that was happening on your device. Apple often asks for it when you file a bug, and it helps expedite bug reports when you include one (or they seem to get better responses at least, since the report is more helpful for Apple), which is why we try to always include it. 

Here’s how you obtain one:

https://it-training.apple.com/tutorials/support/sup075

As for sharing: it may contain sensitive information about your device, so if you do get a sysdiagnose, could you send it to me through a DM? You can click on my profile and then “Send message” to do that. 

 

Badge +3

No dice with 16.3 either 😥 I’ll see if I get time to get a sysdiagnose and send it over before I go on vacation!

Looks like there’s not much more we can do here though. I appreciate your help, guys!

Userlevel 4
Badge +8

@Johan Forsell Just in case, have you tried using both: 

  • a StoreKit Configuration file that syncs with App Store Connect
  • a StoreKit Configuration file that doesn’t sync with App Store Connect

I’m just wondering if maybe the bug is limited to one of those flows (the feature to sync automatically is fairly new so I wouldn’t be surprised if it had issues)

Badge +3

I think I tried doing one manually while troubleshooting, with no luck. I’ll try again when I’m back from skiing ⛷️ and get back to you!

Reply