Filter
Exclude
Time range
-
Near
SDK Design Principles: Configuration and Progressive Disclosure Initialising the RevenueCat SDK reveals another interesting tidbit around progressive disclosure in API design, which is vital for your dev-ex. Most devs will start by configuring their payments SDK with the API key only. @objc(configureWithAPIKey:) @discardableResult static func configure(withAPIKey apiKey: String) -> Purchases { Self.configure(withAPIKey: apiKey, appUserID: nil) } As you grow towards more advanced use cases, you might end up using this alternative function that allows for configuration: @objc(configureWithConfigurationBuilder:) @discardableResult static func configure(with builder: Configuration.Builder) -> Purchases { return Self.configure(with: builder.build()) } This Configuration object offers more granular control over SDK behaviour (see screenshot). This means we can keep APIs simple while enabling customised behaviour for power users. Consider a developer introducing this advanced configuration for the SDK to enforce response verification, hardcode StoreKit 2, and configure timeouts: let config = Configuration.Builder(withAPIKey: apiKey) .with(observerMode: true) .with(storeKitVersion: .storeKit2) .with(responseVerificationMode: .enforced) .with(networkTimeout: 90) .with(storeKit1Timeout: 45) .with(preferredLocale: "fr_FR") .build() Purchases.configure(with: config) Without being able to apply this configuration at init, we would have to make the API surface far more complex, for example the basic purchase() API would require far more parameters: try await Purchases.shared.purchase( product: product, observerMode: true, storeKitVersion: .storeKit2, responseVerificationMode: .enforced, networkTimeout: 90, storeKit1Timeout: 45, preferredLocale: "fr_FR" ) Because this all lives in the configuration at init, the API can remain simple: try await Purchases.shared.purchase(product: product) Configuration creep is also a problem, so you need to be thoughtful about how much should be configurable locally, vs how much can be set up on a dashboard somewhere. You need to carefully balance ease-of-use, flexibility, and actual customer needs. Learn iOS SDK design principles in my RevenueCat SDK deep dive 😼 blog.jacobstechtavern.com/p/…
7
543
Embark, Embark, why have you forsaken me? | #ArcRaiders | #networktimeout
1
6
2,348
24 Jan 2023
Kubernetes error crahloopbackoff, imagepullbaackof and networktimeout are here to make sure your DevOps career is never dull or boring @memenetes @SimpsonsOps #DevOps #Kubernetes #Crashloopbackoff #Imagepullbackoff #NetworkTimeout
1
13
72
8,781
New events coming-BlackFridayCombo You will get a rare chance of login. It will increased your chances for NetworkTimeout & BlackScreen. Both #F2P and #P2P have the same opportunity to try this We won't released a special events (JustForFun) Hp you all have a happy new year 😄
1
10
21 Oct 2017
Replying to @ManLikeNadat
1
@PUBATTLEGROUNDS is there a way to reconnect to a game after i got a networktimeout (only in pubg) ?
1