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: < finishTransaction:transaction>; // eliminate wait view and also unlock iClooud Syncing statusLabel.text =
"whatever" forServiceName: kStoredData updateExisting:YES error:&error>; // apply purchase activity - hide lock overlay and also ; // do other thing to permit the features break; case SKPaymentTransactionStateRestored: < finishTransaction:transaction>; // remove wait view here statusLabel.text =
""; break; case SKPaymentTransactionStateFailed: if (transaction.error.code != SKErrorPaymentCancelled) NSLog(
"Error payment cancelled"); < finishTransaction:transaction>; // remove wait view here statusLabel.text =
"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

Stack Overflow works best with JavaScript allowed

her privacy

By clicking “Accept all cookies”, girlfriend agree ridge Exchange have the right to store cookie on your an equipment and disclose details in accordance with our Cookie Policy.