I made an additional test using C2 IAP plugin instead of Cranberrygame's. The behavior is different.
When I start the game, I get the following message (translation from french, could be slightly different in english):
Connect to the iTunes Store.
If you have an Apple ID, please connect.
(environment : Sandbox)
I touch "cancel" (I'm afraid that "purchase" may disable my sandbox account, I've read a few things about that)
Then I have another message :
IAP error (only reported in test mode):
restore failed with code 4983503
THEN I got the message that my sandbox account connected to the game.
I closed the game, reopened it, and everything was exactly the same.
Then I disconnected from my non-sandbox account in the device's settings an re-run the game
I've been prompted to enter my sandbox account, which I did, and the game connected correctly to the sandbox environment.
So I tested if the store listing was successful, and... the store listing request actually never got a response... Neither "on store listing success" or "on store listing failed" triggered.
So I made a new test to see whether or not "is store available" triggers, and it triggered both for C2 IAP and Phonegap IAP.
C2 IAP :
Store listing never get a response
Phonegap IAP :
Store listing always fails.
I'm currently making a blank project with just the store listing actions and conditions to see if a basic test works or not.
I copied and pasted my "add product IDs" action in a new project which is as follow :
Only one layout, with one event sheet :
at the start of layout :
add product IDs
Request store listing
On store listing success : set text to "success"
On store listing failed : set test to "failed"
Then I exported the project as the newest version of Healer Quest in XDK then in App Loader, tested it in sandbox mode...
And it succeeded!!!!!!
Incredible! I guess the conclusion is that the only thing problematic is the way my events are dispatched into the code. Even thought it works on Android, it seems like iOS has further restrictions. I'll try to make further changes to my code in order to make it work.