switch (transaction.transactionState) situation SKPaymentTransactionStatePurchasing: // present wait view below statusLabel.text =
You are watching: Cannot jump from switch statement to this case label
"Processing..."; break; situation SKPaymentTransactionStatePurchased: <
"whatever" forServiceName: kStoredData updateExisting:YES error:&error>; // apply purchase activity - hide lock overlay and also
""; break; case SKPaymentTransactionStateFailed: if (transaction.error.code != SKErrorPaymentCancelled) NSLog(
"Error payment cancelled"); <
"Purchase Error!"; break; default: break; The last two cases, plus the default, are offering me the following error:
Cannot jump from switch statement come this situation label
I have used the move statement many, countless times; this is the first time I have seen this. The code has been duplicated from a accuse (here), which ns am trying to it is adapted for my app. Would appreciate the assist on this one. SD
C is no Swift. You"ll be happier if you framework your move statements utilizing curly braces round every one of the instances interiors, like this:
switch (tag) instance 1: // curly braces // ... Break; situation 2: // curly braces // ... Break; instance 3: // curly braces // ... Break; The extra level that curly braces enables you to perform things you can"t perform otherwise.
Not the answer you're looking for? Browse various other questions tagged objective-c switch-statement ios9 or asking your own question.
site style / logo © 2021 stack Exchange Inc; user contributions licensed under cc by-sa. Rev2021.9.10.40187
See more: What Is The Date Eight 8 Weeks From Now Best Calculator, Simple Online Calculator · 6 Weeks From Today