Hey twg
I have Cranberrygame's Cordova iAP working on Android and iOS at the moment. But like you say the game was built with XDK not Cocoon.
I am currently in the process of migrating the same game from XDK to Cocoon and decided I would also swap from Cranberry's plugins to Cocoon's own plugins for iAP and GooglePlay / GameCenter.
So at this stage I can tell you that I have Cocoon's iAP plugin working for Android, but I haven't tested for iOS. In Android, the purchasing events, restore purchase events, and conditions for checking purchases all seem to work. Ill be testing iOS in the next few days, so ill be able to comment on Cocoon iAP on that platform soon.
I tried to use the Cocoon iAP plugin in exactly the same way as I used Cordova iAP. When the game first loads up and the title screen is showing, check if the remove ads iAP has been purchased and if so restore the purchase.
On Start of Layout
Cocoon InApps - Fetch products from Store "removeads"
Cocoon In Apps - Update product list
On Products Fetch completed
Restore purchase
The events I use for purchasing the iAP are:
On Touched 'Remove Ads button'
Cocoon InApps - Purchase product "removeads"
If purchase successful
Hide the remove ads button
Store a value in a dictionary, which is later used to disable Ads in game. This value is store in localstorage.
Events linked to restore button for restoring purchase are same as events in the title screen but use 'On Touched "Restore Button"' rather than On Start of Layout. Hope that makes sense?
A super useful trick that AndreasR showed me is how to use the consume purchase action to remove the purchased iAP from the game. That way you can test the iAP works multiple times.
Add a sprite to the menu screen, with events:
On Touched > Consume "Remove Ads" iap
Now you can purchase the iAP again. One difference I noticed between CordovaiAP and Cocoon iAP is that the 'On Consumed' condition doesn't seem to fire for Cocoon's iAP (but does work for Cordova iAP).
twg Hope that helps, sorry for wall of text. Let me know if you get it working on iOS, like I say Ill be battling iOS myself over coming days. So I can give better information once Ive got it working.
Oh one other thing I wanted to say. You mentioned in your post about having a sandbox account. I never managed to figure out wtf the sandbox account was all about. I never managed to use it. I use the 'Internal Testers' section in iTunesConnect to test pre-release builds of my game for iOS.