Solved

Companion watchOS app

  • 27 October 2022
  • 6 replies
  • 38 views

Badge +3

Should I use the main app’s bundle identifier, or should I create a new app in revenue cat in the same project with the watchkitapp identifier?

icon

Best answer by Andy 28 October 2022, 19:46

View original

6 replies

Userlevel 4
Badge +8

Hi @Arnaud! 👋🏻

 

For Apple watch, the app should work with the main app’s bundle identifier. 

See an example setup here https://stackoverflow.com/a/62778077/5074358 (we’ve issued patches for the path issues on watchOS so no need to worry about that part of the answer in SO). 

 

If you use StoreKit Configuration files, I’m not entirely sure that purchases will be validated if you use the main app’s bundle identifier. I’m in the process of testing that, but having some issues getting either of my 2 watches to run 🤦🏻‍♂️

 

I’ll update when I get it to work

 

 

Badge +3

Thanks, @Andy  and please do keep me posted!

Up until now, I used WatchConnectivity to pass the subscription status, but I would rather not depend on it.

Userlevel 4
Badge +8

To be clear, using the main app’s bundle ID should work, the part that I’m testing is compatibility with StoreKit Configuration files. But that’s not strictly needed for an app, it just allows for somewhat easier testing. 

Badge +3

To be clear, using the main app’s bundle ID should work, the part that I’m testing is compatibility with StoreKit Configuration files. But that’s not strictly needed for an app, it just allows for somewhat easier testing. 

Very clear. I did the test with StoreKit Configuration files, I’m actually not sure I tested without them.

Userlevel 4
Badge +8

I’m still running into issues running with StoreKit Configuration files, it looks like I might have to factory reset both my Apple Watches to get something working 🤕

 

In the meantime, if you test with StoreKit Config files and the main app’s bundle ID, as long as you’re not getting “Receipt is not valid” after a successful purchase, you should be good. If you do get that error message, there are two solutions: 

Either:

  • Separate the apps in RevenueCat and have one with each bundle ID
  • Test exclusively in Sandbox, without StoreKit Configuration files.

The good news is that production and sandbox should work correctly regardless with the main app’s bundle ID. 

Badge +2

I’ll update here when I hear back from my support ticket, but just a caution, RC on Apple Watch doesn’t appear to pick up the RCID from the phone and so it can’t read the subscription status. Hopefully this is an issue my end.

Reply