Skip to content
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

Update deprecations #1544

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/Misc/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public extension Purchases {
@available(watchOS, introduced: 6.2, deprecated: 1, renamed: "checkTrialOrIntroDiscountEligibility(productIdentifiers:)")
@available(macOS, introduced: 10.15, deprecated: 1, renamed: "checkTrialOrIntroDiscountEligibility(productIdentifiers:)")
@available(macCatalyst, introduced: 13.0, deprecated: 1, renamed: "checkTrialOrIntroDiscountEligibility(productIdentifiers:)")
func checkTrialOrIntroDiscountEligibility(_ productIdentifiers: [String]) async -> [String: IntroEligibility] {
@objc func checkTrialOrIntroDiscountEligibility(_ productIdentifiers: [String]) async -> [String: IntroEligibility] {
Copy link
Contributor

@NachoSoto NachoSoto Apr 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, why do these need @objc? it's an async version (so Swift only), the non-async is above, and that one doesn't have @objc?

return await self.checkTrialOrIntroDiscountEligibility(productIdentifiers: productIdentifiers)
}

Expand All @@ -42,8 +42,8 @@ public extension Purchases {
@available(watchOS, introduced: 6.2, deprecated, renamed: "promotionalOffer(forProductDiscount:product:)")
@available(macOS, introduced: 10.15, deprecated, renamed: "promotionalOffer(forProductDiscount:product:)")
@available(macCatalyst, introduced: 13.0, deprecated, renamed: "promotionalOffer(forProductDiscount:product:)")
func getPromotionalOffer(forProductDiscount discount: StoreProductDiscount,
product: StoreProduct) async throws -> PromotionalOffer {
@objc func getPromotionalOffer(forProductDiscount discount: StoreProductDiscount,
product: StoreProduct) async throws -> PromotionalOffer {
return try await self.promotionalOffer(forProductDiscount: discount, product: product)
}

Expand All @@ -52,7 +52,7 @@ public extension Purchases {
@available(watchOS, introduced: 6.2, deprecated, renamed: "eligiblePromotionalOffers(forProduct:)")
@available(macOS, introduced: 10.15, deprecated, renamed: "eligiblePromotionalOffers(forProduct:)")
@available(macCatalyst, introduced: 13.0, deprecated, renamed: "eligiblePromotionalOffers(forProduct:)")
func getEligiblePromotionalOffers(forProduct product: StoreProduct) async -> [PromotionalOffer] {
@objc func getEligiblePromotionalOffers(forProduct product: StoreProduct) async -> [PromotionalOffer] {
return await eligiblePromotionalOffers(forProduct: product)
}

Expand All @@ -64,7 +64,7 @@ public extension StoreProduct {
@available(watchOS, introduced: 6.2, deprecated, renamed: "eligiblePromotionalOffers()")
@available(macOS, introduced: 10.15, deprecated, renamed: "eligiblePromotionalOffers()")
@available(macCatalyst, introduced: 13.0, deprecated, renamed: "eligiblePromotionalOffers()")
func getEligiblePromotionalOffers() async -> [PromotionalOffer] {
@objc func getEligiblePromotionalOffers() async -> [PromotionalOffer] {
return await self.eligiblePromotionalOffers()
}
}
6 changes: 5 additions & 1 deletion Sources/Purchasing/Purchases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,11 @@ public extension Purchases {
}

/**
* Deprecated
* Deprecated: Configure behavior through the RevenueCat dashboard instead.
* Determines whether or not users may reuse a subscription from an App or Play Store
* account that already has that subscription active.
* ### Related articles:
* - https://docs.revenuecat.com/docs/user-ids
*/
@available(*, deprecated, message: "Configure behavior through the RevenueCat dashboard instead")
@objc var allowSharingAppStoreAccount: Bool {
Expand Down