In-app purchase sync between iOS & Apple Watch

Hello,


I already sort of asked this but the discussion was more regarding checking the status of an in-app purchase on Apple Watch.


I'm now wondering, how does a developer like myself sync in-app purchases with Apple Watch. Currently when the purchase is complete I use updateApplicationContext to let the Apple Watch know the purchase was made and save the value to an NSUserDefault on the watch itself.


Initial solution: NSUserDefaults & WatchConnectivity:

This solution involved sending Apple Watch info through watchConnectivity and updating an NSUserDefault. This was flawed and only works with iOS9 (WatchConnectivity on availble on iOS9)


Solution #2: Keychain & WatchConnectivity:
This is a more secure way becaue you store your in-app purchase as a more secure key and send Apple Watch info to save its own key using watchConnectivity. As Apple Watch doesn't support iCloud keychain, you stil need watchConnectivity and each device has its own keychain.

So my question to Apple and other devs:

How do I go about making sure the Apple Watch knows a certain in-app purchase was made on iOS? A solution that isnt just iOS9 would be appreciated.


Any feedback is greatly appreciated.


Thanks in advance,

Ace

Accepted Reply

watchOS 2 requires iOS 9...

Replies

Apple Staff??

watchOS 2 requires iOS 9...

This is really not an IAP question. It is really 'how do I share data between an iPhone and a connected watch?' As such, there are already many answers on this forum.

Yea true but I was assuming that in-app purchases are not your average data to share. But anyways ended up saving it to keychain and since WatchOS 2 is only available for iOS9, I could use WatchConnectivity to set the keychain value on Apple Watch as well. Without worrying about the iOS8 case.