switch (transaction.transactionState) situation SKPaymentTransactionStatePurchasing: // display wait view right here statusLabel.text =
You are watching: Cannot jump from switch statement to this case label
"Processing..."; break; instance SKPaymentTransactionStatePurchased: <
"whatever" forServiceName: kStoredData updateExisting:YES error:&error>; // apply purchase activity - hide lock overlay and also
""; break; situation SKPaymentTransactionStateFailed: if (transaction.error.code != SKErrorPaymentCancelled) NSLog(
"Error payment cancelled"); <
"Purchase Error!"; break; default: break; The last two cases, add to the default, are providing me the complying with error:
Cannot run from switch statement to this situation label
I have actually used the switch statement many, plenty of times; this is the very first time I have actually seen this. The code has actually been replicated from a indict (here), which ns am do the efforts to adapt for my app. Would certainly appreciate the aid on this one. SD
C is not Swift. You"ll be happier if you framework your switch statements using curly braces round all of the instances interiors, favor this:
switch (tag) case 1: // curly braces // ... Break; case 2: // curly braces // ... Break; instance 3: // curly braces // ... Break; The extra level of curly braces permits you to perform things girlfriend can"t do otherwise.
Not the price you're looking for? Browse other questions tagged objective-c switch-statement ios9 or questioning your own question.
site style / logo © 2021 ridge Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.9.17.40238
See more: Get Moving Journey In A Day, Get Moving! Junior Journey Award Set