swifty-receipt-validator: Multiple Code Errors
Hi, when I add the files I get an 3 errors and a fail warning.
The First error comes up here (Line 328)
let receiptBundleID = receipt[ReceiptInfoField.bundle_id.rawValue] as? String ?? "NoReceiptBundleID
Binary operator ‘??’ cannot be applied to operands of type ‘[String : AnyObject]?’ and ‘String’
The seconds comes up at Line 351
receiptProductID = receiptInApp[ReceiptInfoField.InApp.product_id.rawValue] as? String ?? "NoReceiptProductID"
Ambiguous use of ‘subscript’
The third comes up at Line 328
let receiptBundleID = receipt[ReceiptInfoField.bundle_id.rawValue] as? String ?? "NoReceiptBundleID"
Ambiguous use of ‘subscript’
And just a plain warning saying
Cast from ‘MDLMaterialProperty?!’ to unrelated type ‘[AnyObject]’ always fails
At line 343
guard let inApp = receipt[ReceiptInfoField.in_app.rawValue] as? [AnyObject] else
I’ll have a go at it myself and see what I can do
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (9 by maintainers)
Great. I will still leave this issue open until I upgraded to Swift 3. Thanks again and happy coding.
I fixed the swift two errors by casting the
Anyto anNSDictionanryalso, It’s fully compatible with swift 3, I just changed the request from aNSMutableURLRequestto anNSURLRequestand changed it from aletto avar. All the other errors can be fixed with a click. So far so good