-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate usesStoreKit2IfAvailable
#2293
Changes from 4 commits
1f61f3a
ac800e0
440b170
3d4a4bf
4cadcb1
b28c0be
0612f03
29f3411
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
import Foundation | ||
import StoreKit | ||
|
||
// swiftlint:disable line_length missing_docs | ||
// swiftlint:disable line_length missing_docs file_length | ||
|
||
public extension Purchases { | ||
|
||
|
@@ -389,3 +389,26 @@ extension CustomerInfo { | |
} | ||
|
||
} | ||
|
||
public extension Configuration.Builder { | ||
/// | ||
/// Set `usesStoreKit2IfAvailable`. If `true`, the SDK will use StoreKit 2 APIs internally. If disabled, it will use StoreKit 1 APIs instead. | ||
/// - Parameter usesStoreKit2IfAvailable: enable StoreKit 2 on devices that support it. | ||
/// Defaults to `false`. | ||
/// - Important: This configuration flag has been deprecated, and will be replaced by automatic remote configuration in the future. | ||
/// However, apps using it should work correctly. | ||
/// | ||
@available(*, deprecated, message: """ | ||
RevenueCat currently uses StoreKit 1 for purchases, as its stability in production scenarios has overall | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would just remove the word,
from the end. |
||
proved more better than StoreKit 2. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would change this:
to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol "more better" |
||
However, in the future the SDK will be opinionated and selectively use StoreKit 2 APIs for certain features where | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would make this,
more concise,
|
||
StoreKit 2 APIs have been proven to perform better than StoreKit 1. | ||
Simply remove this method call to let RevenueCat decide for you which StoreKit implementation to use. | ||
""") | ||
@objc func with(usesStoreKit2IfAvailable: Bool) -> Configuration.Builder { | ||
self.storeKit2Setting = .init(useStoreKit2IfAvailable: usesStoreKit2IfAvailable) | ||
return self | ||
} | ||
} | ||
|
||
// swiftlint:enable line_length missing_docs file_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what you mean by "automatic remote configuration"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm well, this might be going too ahead with this comment, but I believe the intention is to support changing this dynamically from the backend. So we could decide, according to the status returned by diagnostics or other sources, change whether apps use SK1 or SK2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh that makes sense