Comments (7)
Yes, but it adds extra info e.g. (Mercato.MercatoError error 0.)
. Apple would not allow this kind of message.
So I fixed this by checking for "(" character and remove everything behind.
func cleanPossibleStoreKitAndExtraAddedMessage(input: String) -> String
{
// NOTE: Input can be like this ---> "The operation couldn’t be completed. (Mercato.MercatoError error 0.)"
let splitted = Array(input.components(separatedBy: "("))
return (splitted.first ?? input).fullTrim()
}
from mercato.
Hi @sabiland, thanks for asking. Yes, it's production ready and I have been using it since I released it.
Failed transaction will throw an error from StoreKit framework.
Restoring purchases works differently in store kit 2 and Mercato supports it as well.
With store kit 2 you can only track non-consumable + subscriptions iaps, Mercato only support subscriptions, but I will add support for non-consumable.
from mercato.
Thx for quick reply. About non-consumable, can I make non-consumable purchase with Mercato? I have already checked about restoring purchases with StoreKit 2, will do it manually for now probably.
And where is Mercato.purchase completion block? Success, etc.? Maybe I don’t yet understand how StoreKit2 and/or Mercato works.
EDIT: I saw the StoreKit 2 is handling error messages via popups right?
from mercato.
Ok I think I have managed to refactor first of my apps to StoreKit 2 with the help of Mercato.
from mercato.
Sounds good!
from mercato.
@tikhop Will you allow another question, where are string messages defined for your errors?
I get this for example if I simulate IAP and then cancel it. I know Apple does not allow those kind of messages for the user.
The operation couldn’t be completed. (Mercato.MercatoError error 2.)
public enum MercatoError: Error
{
case storeKit(error: StoreKitError)
case purchase(error: Product.PurchaseError)
case purchaseCanceledByUser
case userCancelledRefundProcess
case purchaseIsPending
case failedVerification
case genericError
}
from mercato.
@sabiland the message comes from the system.
from mercato.
Related Issues (6)
- Support cocoapods
- watchOS compilation errors HOT 3
- European 2FA issues HOT 2
- Feature Request HOT 4
- Purchase not working in iOS 16 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mercato.