Skip to content

Commit

Permalink
Update RevenueCat-Swift.h for version 5.14.6
Browse files Browse the repository at this point in the history
  • Loading branch information
RCGitBot committed Jan 8, 2025
1 parent 0e15ac8 commit d723de8
Showing 1 changed file with 78 additions and 34 deletions.
112 changes: 78 additions & 34 deletions Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,12 @@ SWIFT_CLASS_NAMED("Builder")


@interface RCConfigurationBuilder (SWIFT_EXTENSION(RevenueCat))
- (RCConfigurationBuilder * _Nonnull)withObserverMode:(BOOL)observerMode SWIFT_WARN_UNUSED_RESULT SWIFT_AVAILABILITY(macos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.");
- (RCConfigurationBuilder * _Nonnull)withUsesStoreKit2IfAvailable:(BOOL)usesStoreKit2IfAvailable SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use .with(storeKitVersion:) to enable StoreKit 2");
@end


@interface RCConfigurationBuilder (SWIFT_EXTENSION(RevenueCat))
- (RCConfigurationBuilder * _Nonnull)withUsesStoreKit2IfAvailable:(BOOL)usesStoreKit2IfAvailable SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use .with(storeKitVersion:) to enable StoreKit 2");
- (RCConfigurationBuilder * _Nonnull)withObserverMode:(BOOL)observerMode SWIFT_WARN_UNUSED_RESULT SWIFT_AVAILABILITY(macos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.");
@end

/// Specifies the behavior for a caching API.
Expand Down Expand Up @@ -961,11 +961,11 @@ SWIFT_CLASS_NAMED("CustomerInfo")




@interface RCCustomerInfo (SWIFT_EXTENSION(RevenueCat))
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull rawData;
@end


@class RCStoreTransaction;

@interface RCCustomerInfo (SWIFT_EXTENSION(RevenueCat))
Expand Down Expand Up @@ -2896,6 +2896,35 @@ SWIFT_AVAILABILITY(visionos,introduced=2.0) SWIFT_AVAILABILITY(watchos,introduce
@end


@interface RCPurchases (SWIFT_EXTENSION(RevenueCat))
/// Enable debug logging. Useful for debugging issues with the lovely team @RevenueCat.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DEPRECATED_MSG("use Purchases.logLevel instead");)
+ (BOOL)debugLogsEnabled SWIFT_WARN_UNUSED_RESULT;
+ (void)setDebugLogsEnabled:(BOOL)newValue;
/// Deprecated
@property (nonatomic) BOOL allowSharingAppStoreAccount SWIFT_DEPRECATED_MSG("\n Configure behavior through the RevenueCat dashboard instead. If you have configured the \"Legacy\" restore\n behavior in the [RevenueCat Dashboard](app.revenuecat.com) and are currently setting this to `true`, keep\n this setting active.\n ");
/// Deprecated. Where responsibility for completing purchase transactions lies.
@property (nonatomic) BOOL finishTransactions SWIFT_DEPRECATED_MSG("Use ``purchasesAreCompletedBy`` instead.");
/// Deprecated
+ (void)addAttributionData:(NSDictionary<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
/// Send your attribution data to RevenueCat so you can track the revenue generated by your different campaigns.
/// <h4>Related articles</h4>
/// <ul>
/// <li>
/// <a href="https://docs.revenuecat.com/docs/attribution">Attribution</a>
/// </li>
/// </ul>
/// \param data Dictionary provided by the network.
///
/// \param network Enum for the network the data is coming from, see <code>AttributionNetwork</code> for supported
/// networks.
///
/// \param networkUserId User Id that should be sent to the network. Default is the current App User Id.
///
+ (void)addAttributionData:(NSDictionary<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network forNetworkUserId:(NSString * _Nullable)networkUserId SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
@end


@interface RCPurchases (SWIFT_EXTENSION(RevenueCat))
/// Configures an instance of the Purchases SDK with a specified <code>Configuration</code>.
/// The instance will be set as a singleton.
Expand Down Expand Up @@ -2993,35 +3022,6 @@ SWIFT_AVAILABILITY(visionos,introduced=2.0) SWIFT_AVAILABILITY(watchos,introduce
@end


@interface RCPurchases (SWIFT_EXTENSION(RevenueCat))
/// Enable debug logging. Useful for debugging issues with the lovely team @RevenueCat.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DEPRECATED_MSG("use Purchases.logLevel instead");)
+ (BOOL)debugLogsEnabled SWIFT_WARN_UNUSED_RESULT;
+ (void)setDebugLogsEnabled:(BOOL)newValue;
/// Deprecated
@property (nonatomic) BOOL allowSharingAppStoreAccount SWIFT_DEPRECATED_MSG("\n Configure behavior through the RevenueCat dashboard instead. If you have configured the \"Legacy\" restore\n behavior in the [RevenueCat Dashboard](app.revenuecat.com) and are currently setting this to `true`, keep\n this setting active.\n ");
/// Deprecated. Where responsibility for completing purchase transactions lies.
@property (nonatomic) BOOL finishTransactions SWIFT_DEPRECATED_MSG("Use ``purchasesAreCompletedBy`` instead.");
/// Deprecated
+ (void)addAttributionData:(NSDictionary<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
/// Send your attribution data to RevenueCat so you can track the revenue generated by your different campaigns.
/// <h4>Related articles</h4>
/// <ul>
/// <li>
/// <a href="https://docs.revenuecat.com/docs/attribution">Attribution</a>
/// </li>
/// </ul>
/// \param data Dictionary provided by the network.
///
/// \param network Enum for the network the data is coming from, see <code>AttributionNetwork</code> for supported
/// networks.
///
/// \param networkUserId User Id that should be sent to the network. Default is the current App User Id.
///
+ (void)addAttributionData:(NSDictionary<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network forNetworkUserId:(NSString * _Nullable)networkUserId SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
@end



@interface RCPurchases (SWIFT_EXTENSION(RevenueCat))
/// Parses a deep link URL to verify it’s a RevenueCat web purchase redemption link
Expand Down Expand Up @@ -3381,6 +3381,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau
@end



@interface RCPurchasesDiagnostics (SWIFT_EXTENSION(RevenueCat))
/// Perform tests to ensure SDK is configured correctly.
/// <ul>
Expand All @@ -3394,7 +3395,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau




/// A type that can parse Apple receipts from a device.
/// This implements parsing based on <a href="https://rev.cat/apple-receipt-fields">Apple’s documentation</a>.
/// To use this class you must access <code>PurchasesReceiptParser/default</code>:
Expand All @@ -3411,13 +3411,13 @@ SWIFT_CLASS("_TtC10RevenueCat22PurchasesReceiptParser")




@interface PurchasesReceiptParser (SWIFT_EXTENSION(RevenueCat))
- (BOOL)receiptHasTransactionsWithReceiptData:(NSData * _Nonnull)receiptData SWIFT_WARN_UNUSED_RESULT;
@end




@interface PurchasesReceiptParser (SWIFT_EXTENSION(RevenueCat))
/// A default instance of <code>PurchasesReceiptParser</code>
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=default) PurchasesReceiptParser * _Nonnull default_;)
Expand Down Expand Up @@ -3659,6 +3659,11 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", open) {
/// </li>
/// </ul>
@property (nonatomic, readonly, strong) NSDecimalNumber * _Nonnull price;
/// Calculates the price of this subscription product per day.
///
/// returns:
/// <code>nil</code> if the product is not a subscription.
@property (nonatomic, readonly, strong) NSDecimalNumber * _Nullable pricePerDay SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
/// Calculates the price of this subscription product per week.
///
/// returns:
Expand Down Expand Up @@ -3692,6 +3697,20 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", open) {
/// <code>localizedPricePerYear</code>
/// </li>
/// </ul>
@property (nonatomic, readonly, copy) NSString * _Nullable localizedPricePerDay SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
/// The formatted price per week using <code>StoreProduct/priceFormatter</code>.
/// <h3>Related Symbols</h3>
/// <ul>
/// <li>
/// <code>pricePerWeek</code>
/// </li>
/// <li>
/// <code>localizedPricePerMonth</code>
/// </li>
/// <li>
/// <code>localizedPricePerYear</code>
/// </li>
/// </ul>
@property (nonatomic, readonly, copy) NSString * _Nullable localizedPricePerWeek SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
/// The formatted price per month using <code>StoreProduct/priceFormatter</code>.
/// <h3>Related Symbols</h3>
Expand Down Expand Up @@ -3787,6 +3806,30 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCDiscountType, "DiscountType", open) {
@property (nonatomic, readonly, strong) SKProductDiscount * _Nullable sk1Discount;
@end


@interface RCStoreProductDiscount (SWIFT_EXTENSION(RevenueCat))
/// Calculates the approximate price of this subscription product per day.
///
/// returns:
/// <code>nil</code> if the product is not a subscription.
@property (nonatomic, readonly, strong) NSDecimalNumber * _Nullable pricePerDay SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
/// Calculates the approximate price of this subscription product per week.
///
/// returns:
/// <code>nil</code> if the product is not a subscription.
@property (nonatomic, readonly, strong) NSDecimalNumber * _Nullable pricePerWeek SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
/// Calculates the approximate price of this subscription product per month.
///
/// returns:
/// <code>nil</code> if the product is not a subscription.
@property (nonatomic, readonly, strong) NSDecimalNumber * _Nullable pricePerMonth SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
/// Calculates the approximate price of this subscription product per year.
///
/// returns:
/// <code>nil</code> if the product is not a subscription.
@property (nonatomic, readonly, strong) NSDecimalNumber * _Nullable pricePerYear SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=11.2) SWIFT_AVAILABILITY(macos,introduced=10.13.2) SWIFT_AVAILABILITY(ios,introduced=11.2);
@end

@class RCStorefront;

/// Abstract class that provides access to properties of a transaction.
Expand Down Expand Up @@ -3952,6 +3995,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", open) {




@interface RCSubscriptionPeriod (SWIFT_EXTENSION(RevenueCat))
@property (nonatomic, readonly, copy) NSString * _Nonnull debugDescription;
@end
Expand Down

0 comments on commit d723de8

Please sign in to comment.