Topics

Leave a Reply

137 Comments on "In App Purchases! (Swift 3 in Xcode : Swifty Store Kit)"

Notify of
avatar

Edward Hasted
Guest
Edward Hasted
2 days 7 hours ago

Very impressive and comprehensively awesome video, as always. VERY many thanks.

Now the questions:
1. SwiftyStoreKit.verifyReceipt(password: sharedSecret, completion: {
seems to need to be written as
SwiftyStoreKit.verifyReceipt(using: sharedSecret as! ReceiptValidator, completion: {

2. In func alertForPurchaseResult(result : PurchaseResult) -> UIAlertController {
gives four Enum case failed not found in type SKError in the following lines:
case .failed(let error):
case .invalidProductId(let productID):
case .noProductIdentifier:
case .paymentNotAllowed:

Edward Hasted
Guest
Edward Hasted
2 days 5 hours ago

Have changed
switch error { to
switch error.code {
in the lines above

edgramosmurillo
Guest
edgramosmurillo
2 days 19 hours ago

Great stuff Jared!

Yaroslav Dukal
Guest
Yaroslav Dukal
9 days 12 hours ago

well, tapping cancel on in app pop up still process the transaction… What to do?

Munib Rahman
Guest
Munib Rahman
13 days 20 hours ago

It appears that this tutorial is now old, download the SwiftyStoreKit master from github, and one of the examples has this exact code already done for you.

Will Hutson
Guest
Will Hutson
15 days 1 hour ago

when I do .verifyReceipt the options are different and now i need a 'using:' section, what does this mean?great video though.

Richard Smith
Guest
Richard Smith
12 days 21 hours ago

Okay, Thanks so much!

Will Hutson
Guest
Will Hutson
12 days 22 hours ago

Richard Smith if you follow the link to the GitHub page (in the description) you can find the view controller and see the newer version of it, just copy and past that in

Richard Smith
Guest
Richard Smith
12 days 22 hours ago

How did you fix it? I am getting the same issue

Will Hutson
Guest
Will Hutson
13 days 10 hours ago

Thanks, I did do this in the end!

Will Hutson
Guest
Will Hutson
14 days 7 hours ago

I am getting a lot of issues in func alertForPurchaseResult with the 'switch error' statement, when I write case .failed etc it says 'Enum case "failed" not found in type SKError'.

Will Hutson
Guest
Will Hutson
14 days 8 hours ago

I have now resolved this issue.

Oli C
Guest
Oli C
26 days 7 hours ago

I get "Error: SwiftyStoreKit Module not found!", any answers as I need them ASAP.

Oli C
Guest
Oli C
5 days 26 minutes ago

Sorry I was being completely stupid. I forgot to do the second step. :/I am soooo stupid. :/

Munib Rahman
Guest
Munib Rahman
23 days 21 hours ago

Just build it and see what happens.

kinosyavah
Guest
kinosyavah
28 days 8 hours ago

I get error use of undeclared type 'RetriveResult' when trying to add alertForPruductRetriveInfo func. Somebody help me to figured out where it came from. Thanks

kinosyavah
Guest
kinosyavah
28 days 8 hours ago

I find an error, I just add it like SwiftyStoreKit.RetrieveResults

Антон Платонов
Guest
Антон Платонов
29 days 7 hours ago

When I press the purchase button, the Network Activity Indicator shows up for a couple of seconds then nothing happens, no errors as well. Can anybody give advice on what might be wrong? Thanks

Антон Платонов
Guest
Антон Платонов
22 days 10 hours ago

The code works just fine. It turned out that you have to provide all the banking info before you can even start testing the IAP. After I added it, the products became valid. The only difference in the code is that you have to add AppleValidator to some functions, and xcode tells you to do that and there are no other issues. Thanks

Munib Rahman
Guest
Munib Rahman
23 days 21 hours ago

Same here, I think the code is old now. SwiftyStoreKit has been updated and this code is still for the older version.

kinosyavah
Guest
kinosyavah
1 month 2 days ago

if you have error on the beginning with adding SwiftyStoreKit you need to uninstall, and than install cocoa. You're welcome 🙂

Rabbi Eli Garfinkel
Guest
Rabbi Eli Garfinkel
1 month 6 days ago
Jared, Great tutorial! I have five errors that I can't figure out and that also seem to appear in the description's downloadable code: 1. In the verifyPurchase function, I get an error on the "if product == .autorenewable." The error says the binary operator == cannot be used on operands of type 'RegisteredPurchase.'2 – 5: The other four errors are in the alertForPurchaseResult function. In the switch error statement, these cases are not found in type 'SKError': .failed, .invalidProductId, .noProductIdentifier, and .paymentNotAllowed.What am I doing wrong?I've learned so much from your tutorials, keep up the great work!Eli
Zama Syed
Guest
Zama Syed
1 month 5 days ago

Hi Eli,could you solve your first error?If no, then check if you have implemented the enum RegisteredPurchase accordingly. In Jared's tutorial, you will find it on line 15 in file ViewController.swift.enum RegisteredPurchase : String { case Dolla10 = "10Dolla" case RemoveAds = "RemoveAds" case autoRenewable = "autoRenewable"}Hope this helps you!Z

1 2 3 9
wpDiscuz