From 3d5c2bcdfff34fe07ee0783f274d2412c76e0c91 Mon Sep 17 00:00:00 2001 From: RCGitBot Date: Wed, 27 Mar 2024 17:34:50 +0000 Subject: [PATCH] Update RevenueCat-Swift.h for version 4.40.0 --- .../CommonFiles/RevenueCat-Swift.h | 362 +++++++++++++++--- 1 file changed, 313 insertions(+), 49 deletions(-) diff --git a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h index d0f963af0c..3d3802afb0 100644 --- a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h +++ b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h @@ -1,4 +1,4 @@ -// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) +// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) #ifndef REVENUECAT_SWIFT_H #define REVENUECAT_SWIFT_H #pragma clang diagnostic push @@ -40,18 +40,12 @@ #include #endif #if defined(__cplusplus) -#if defined(__arm64e__) && __has_include() +#if __has_include() # include #else -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wreserved-macro-identifier" # ifndef __ptrauth_swift_value_witness_function_pointer # define __ptrauth_swift_value_witness_function_pointer(x) # endif -# ifndef __ptrauth_swift_class_method_pointer -# define __ptrauth_swift_class_method_pointer(x) -# endif -#pragma clang diagnostic pop #endif #endif @@ -250,17 +244,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #else # define SWIFT_NOEXCEPT #endif -#if !defined(SWIFT_C_INLINE_THUNK) -# if __has_attribute(always_inline) -# if __has_attribute(nodebug) -# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) -# else -# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) -# endif -# else -# define SWIFT_C_INLINE_THUNK inline -# endif -#endif #if defined(_WIN32) #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) @@ -277,6 +260,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif @import Foundation; @import ObjectiveC; +@import StoreKit; #endif #endif @@ -569,7 +553,7 @@ SWIFT_AVAILABILITY(watchos,unavailable) SWIFT_AVAILABILITY(tvos,unavailable) SWI @end /// Enum of supported attribution networks -typedef SWIFT_ENUM_NAMED(NSInteger, RCAttributionNetwork, "AttributionNetwork", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCAttributionNetwork, "AttributionNetwork", open) { /// Apple’s search ads RCAttributionNetworkAppleSearchAds = 0, /// Adjust https://www.adjust.com/ @@ -692,9 +676,8 @@ SWIFT_CLASS_NAMED("Builder") - (RCConfigurationBuilder * _Nonnull)withUsesStoreKit2IfAvailable:(BOOL)usesStoreKit2IfAvailable SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("\n RevenueCat currently uses StoreKit 1 for purchases, as its stability in production scenarios has\n proven to be more performant than StoreKit 2.\n\n We're collecting more data on the best approach, but StoreKit 1 vs StoreKit 2 is an implementation detail\n that you shouldn't need to care about.\n\n Simply remove this method call to let RevenueCat decide for you which StoreKit implementation to use.\n "); @end - /// Specifies the behavior for a caching API. -typedef SWIFT_ENUM_NAMED(NSInteger, RCCacheFetchPolicy, "CacheFetchPolicy", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCCacheFetchPolicy, "CacheFetchPolicy", open) { /// Returns values from the cache, or throws an error if not available. RCCacheFetchPolicyFromCacheOnly = 0, /// Always fetch the most up-to-date data. @@ -709,6 +692,24 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCCacheFetchPolicy, "CacheFetchPolicy", clos }; +SWIFT_CLASS("_TtC10RevenueCat16NetworkOperation") +@interface NetworkOperation : NSOperation +@property (nonatomic, readonly, getter=isExecuting) BOOL executing; +@property (nonatomic, readonly, getter=isFinished) BOOL finished; +@property (nonatomic, readonly, getter=isCancelled) BOOL cancelled; +- (void)main; +- (void)cancel; +@property (nonatomic, readonly, getter=isAsynchronous) BOOL asynchronous; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC10RevenueCat25CacheableNetworkOperation") +@interface CacheableNetworkOperation : NetworkOperation +@end + + /// Configuration can be used when configuring the Purchases instance. It is not required to be used, but /// highly recommended. This class follows a builder pattern. /// To configure your Purchases instance using this object, follow these steps. @@ -770,7 +771,7 @@ SWIFT_CLASS_NAMED("Configuration") /// EntitlementInfos/verification /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCEntitlementVerificationMode, "EntitlementVerificationMode", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCEntitlementVerificationMode, "EntitlementVerificationMode", open) { /// The SDK will not perform any entitlement verification. RCEntitlementVerificationModeDisabled = 0, /// Enable entitlement verification. @@ -898,11 +899,11 @@ SWIFT_CLASS_NAMED("CustomerInfo") - @interface RCCustomerInfo (SWIFT_EXTENSION(RevenueCat)) @property (nonatomic, readonly, copy) NSDictionary * _Nonnull rawData; @end + @class RCStoreTransaction; @interface RCCustomerInfo (SWIFT_EXTENSION(RevenueCat)) @@ -954,6 +955,10 @@ SWIFT_CLASS_NAMED("DangerousSettings") /// automatically. /// - (nonnull instancetype)initWithAutoSyncPurchases:(BOOL)autoSyncPurchases; +/// note: +/// this is internal only so the only public way to enable customEntitlementComputation +/// is through Purchases/configureInCustomEntitlementsComputationMode(apiKey:appUserID:). +- (nonnull instancetype)initWithAutoSyncPurchases:(BOOL)autoSyncPurchases customEntitlementComputation:(BOOL)customEntitlementComputation; @end @@ -1131,7 +1136,7 @@ SWIFT_CLASS_NAMED("EntitlementInfos") @end /// Error codes used by the Purchases SDK -typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", open) { RCUnknownError SWIFT_COMPILE_NAME("unknownError") = 0, RCPurchaseCancelledError SWIFT_COMPILE_NAME("purchaseCancelledError") = 1, RCStoreProblemError SWIFT_COMPILE_NAME("storeProblemError") = 2, @@ -1173,6 +1178,65 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", closed) { static NSString * _Nonnull const RCPurchasesErrorCodeDomain = @"RevenueCat.ErrorCode"; +SWIFT_CLASS("_TtC10RevenueCat15FakeASIdManager") +@interface FakeASIdManager : NSObject ++ (FakeASIdManager * _Nonnull)sharedManager SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +SWIFT_CLASS("_TtC10RevenueCat17FakeAfficheClient") +@interface FakeAfficheClient : NSObject ++ (FakeAfficheClient * _Nonnull)sharedClient SWIFT_WARN_UNUSED_RESULT; +- (void)requestAttributionDetailsWithBlock:(void (^ _Nonnull)(NSDictionary * _Nullable, NSError * _Nullable))completionHandler; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +SWIFT_CLASS("_TtC10RevenueCat19FakeTrackingManager") +@interface FakeTrackingManager : NSObject ++ (NSInteger)trackingAuthorizationStatus SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +typedef SWIFT_ENUM(NSInteger, FakeTrackingManagerAuthorizationStatus, closed) { + FakeTrackingManagerAuthorizationStatusNotDetermined = 0, + FakeTrackingManagerAuthorizationStatusRestricted = 1, + FakeTrackingManagerAuthorizationStatusDenied = 2, + FakeTrackingManagerAuthorizationStatusAuthorized = 3, +}; + + + +SWIFT_CLASS("_TtC10RevenueCat24GetCustomerInfoOperation") +@interface GetCustomerInfoOperation : CacheableNetworkOperation +@end + + + +SWIFT_CLASS("_TtC10RevenueCat28GetIntroEligibilityOperation") +@interface GetIntroEligibilityOperation : NetworkOperation +@end + + + + +SWIFT_CLASS("_TtC10RevenueCat21GetOfferingsOperation") +@interface GetOfferingsOperation : CacheableNetworkOperation +@end + + + +SWIFT_CLASS("_TtC10RevenueCat37GetProductEntitlementMappingOperation") +@interface GetProductEntitlementMappingOperation : CacheableNetworkOperation +@end + + + + +SWIFT_CLASS("_TtC10RevenueCat15HealthOperation") +@interface HealthOperation : CacheableNetworkOperation +@end @@ -1211,7 +1275,7 @@ SWIFT_CLASS_NAMED("IntroEligibility") /// IntroEligibilityStatus/eligible The user is eligible for a free trial or intro pricing for this product. /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCIntroEligibilityStatus, "IntroEligibilityStatus", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCIntroEligibilityStatus, "IntroEligibilityStatus", open) { /// RevenueCat doesn’t have enough information to determine eligibility. RCIntroEligibilityStatusUnknown = 0, /// The user is not eligible for a free trial or intro pricing for this product. @@ -1222,6 +1286,13 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCIntroEligibilityStatus, "IntroEligibilityS RCIntroEligibilityStatusNoIntroOfferExists = 3, }; + +SWIFT_CLASS("_TtC10RevenueCat14LogInOperation") +@interface LogInOperation : CacheableNetworkOperation +@end + + + /// Enumeration of the different verbosity levels. ///

Related Symbols

///
    @@ -1229,7 +1300,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCIntroEligibilityStatus, "IntroEligibilityS /// Purchases/logLevel /// ///
-typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", open) { RCLogLevelVerbose = 4, RCLogLevelDebug = 0, RCLogLevelInfo = 1, @@ -1241,6 +1312,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", closed) { + /// Information that represents a non-subscription purchase made by a user. /// This can be one of these types of product: ///
    @@ -1332,7 +1404,6 @@ SWIFT_CLASS_NAMED("Offering") - /// This class contains all the offerings configured in RevenueCat dashboard. /// Offerings let you control which products are shown to users without requiring an app update. /// Building paywalls that are dynamic and can react to different product @@ -1463,7 +1534,7 @@ SWIFT_CLASS_NAMED("Package") /// Displaying Products /// ///
-typedef SWIFT_ENUM_NAMED(NSInteger, RCPackageType, "PackageType", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPackageType, "PackageType", open) { /// A package that was defined with an unknown identifier. RCPackageTypeUnknown = -2, /// A package that was defined with an unknown identifier. @@ -1484,8 +1555,43 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPackageType, "PackageType", closed) { RCPackageTypeWeekly = 6, }; +@class SKPaymentTransaction; +@class RCStorefront; + +/// A wrapper for SKPaymentQueue +SWIFT_PROTOCOL("_TtP10RevenueCat23PaymentQueueWrapperType_") +@protocol PaymentQueueWrapperType +- (void)finishTransaction:(SKPaymentTransaction * _Nonnull)transaction completion:(void (^ _Nonnull)(void))completion; +- (void)presentCodeRedemptionSheet SWIFT_AVAILABILITY(maccatalyst,unavailable) SWIFT_AVAILABILITY(watchos,unavailable) SWIFT_AVAILABILITY(tvos,unavailable) SWIFT_AVAILABILITY(macos,unavailable) SWIFT_AVAILABILITY(ios,introduced=14.0); +@property (nonatomic, readonly, strong) RCStorefront * _Nullable currentStorefront; +@end + + +/// Implementation of PaymentQueueWrapperType used when SK1 is not enabled. +SWIFT_CLASS("_TtC10RevenueCat19PaymentQueueWrapper") +@interface PaymentQueueWrapper : NSObject +- (void)finishTransaction:(SKPaymentTransaction * _Nonnull)transaction completion:(void (^ _Nonnull)(void))completion; +@property (nonatomic, readonly, strong) RCStorefront * _Nullable currentStorefront; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + +@interface PaymentQueueWrapper (SWIFT_EXTENSION(RevenueCat)) +@end + +@class SKPaymentQueue; +@class SKPayment; + +@interface PaymentQueueWrapper (SWIFT_EXTENSION(RevenueCat)) +- (void)paymentQueue:(SKPaymentQueue * _Nonnull)queue updatedTransactions:(NSArray * _Nonnull)transactions; +- (BOOL)paymentQueue:(SKPaymentQueue * _Nonnull)queue shouldAddStorePayment:(SKPayment * _Nonnull)payment forProduct:(SKProduct * _Nonnull)product SWIFT_WARN_UNUSED_RESULT; +@end + + /// Enum of supported period types for an entitlement. -typedef SWIFT_ENUM_NAMED(NSInteger, RCPeriodType, "PeriodType", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPeriodType, "PeriodType", open) { /// If the entitlement is not under an introductory or trial period. RCNormal SWIFT_COMPILE_NAME("normal") = 0, /// If the entitlement is under a introductory price period. @@ -1494,6 +1600,43 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPeriodType, "PeriodType", closed) { RCTrial SWIFT_COMPILE_NAME("trial") = 2, }; + +SWIFT_CLASS("_TtC10RevenueCat28PostAdServicesTokenOperation") +@interface PostAdServicesTokenOperation : NetworkOperation +@end + + + +SWIFT_CLASS("_TtC10RevenueCat28PostAttributionDataOperation") +@interface PostAttributionDataOperation : NetworkOperation +@end + + + +SWIFT_CLASS("_TtC10RevenueCat28PostOfferForSigningOperation") +@interface PostOfferForSigningOperation : NetworkOperation +@end + + + +/// A NetworkOperation for posting PaywallEvents. +SWIFT_CLASS("_TtC10RevenueCat26PostPaywallEventsOperation") +@interface PostPaywallEventsOperation : NetworkOperation +@end + + +SWIFT_CLASS("_TtC10RevenueCat24PostReceiptDataOperation") +@interface PostReceiptDataOperation : CacheableNetworkOperation +@end + + + + +SWIFT_CLASS("_TtC10RevenueCat33PostSubscriberAttributesOperation") +@interface PostSubscriberAttributesOperation : NetworkOperation +@end + + @class RCTargetingContext; /// Stores information about how a Package was presented. @@ -1530,6 +1673,36 @@ SWIFT_CLASS_NAMED("TargetingContext") @end + +SWIFT_CLASS("_TtC10RevenueCat18ProductsFetcherSK1") +@interface ProductsFetcherSK1 : NSObject +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + + +@class SKProductsRequest; +@class SKProductsResponse; +@class SKRequest; + +@interface ProductsFetcherSK1 (SWIFT_EXTENSION(RevenueCat)) +- (void)productsRequest:(SKProductsRequest * _Nonnull)request didReceiveResponse:(SKProductsResponse * _Nonnull)response; +- (void)requestDidFinish:(SKRequest * _Nonnull)request; +- (void)request:(SKRequest * _Nonnull)request didFailWithError:(NSError * _Nonnull)error; +@end + + +/// Basic implemenation of a ProductsManagerType +SWIFT_CLASS("_TtC10RevenueCat15ProductsManager") +@interface ProductsManager : NSObject +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + @class RCStoreProductDiscount; @class RCPromotionalOfferSignedData; @@ -1605,7 +1778,7 @@ SWIFT_CLASS_NAMED("PromotionalOfferEligibility") SWIFT_AVAILABILITY(maccatalyst, /// The types used to describe whether a transaction was purchased by the user, /// or is available to them through Family Sharing. -typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchaseOwnershipType, "PurchaseOwnershipType", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchaseOwnershipType, "PurchaseOwnershipType", open) { /// The purchase was made directly by this user. RCPurchaseOwnershipTypePurchased = 0, /// The purchase has been shared to this user by a family member. @@ -2419,6 +2592,32 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _No +SWIFT_PROTOCOL("_TtP10RevenueCat29PurchasesOrchestratorDelegate_") +@protocol PurchasesOrchestratorDelegate +- (void)readyForPromotedProduct:(RCStoreProduct * _Nonnull)product purchase:(void (^ _Nonnull)(void (^ _Nonnull)(RCStoreTransaction * _Nullable, RCCustomerInfo * _Nullable, NSError * _Nullable, BOOL)))startPurchase; +@property (nonatomic, readonly) BOOL shouldShowPriceConsent SWIFT_AVAILABILITY(watchos,unavailable) SWIFT_AVAILABILITY(tvos,unavailable) SWIFT_AVAILABILITY(macos,unavailable) SWIFT_AVAILABILITY(maccatalyst,introduced=13.4) SWIFT_AVAILABILITY(ios,introduced=13.4); +@end + + +@interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) +/// Called when a user initiates a promoted in-app purchase from the App Store. +/// If your app is able to handle a purchase at the current time, run the startPurchase block. +/// If the app is not in a state to make a purchase: cache the startPurchase block, then call it +/// when the app is ready to make the promoted purchase. +/// If the purchase should never be made, you don’t need to ever call the startPurchase block +/// and Purchases will not proceed with promoted purchases. +/// \param product StoreProduct the product that was selected from the app store. +/// +/// \param startPurchase Method that begins the purchase flow for the promoted purchase. +/// If the app is ready to start the purchase flow when this delegate method is called, then this method +/// should be called right away. Otherwise, the method should be stored as a property in memory, and then called +/// once the app is ready to start the purchase flow. +/// When the purchase completes, the result will be part of the callback parameters. +/// +- (void)readyForPromotedProduct:(RCStoreProduct * _Nonnull)product purchase:(void (^ _Nonnull)(void (^ _Nonnull)(RCStoreTransaction * _Nullable, RCCustomerInfo * _Nullable, NSError * _Nullable, BOOL)))startPurchase; +@end + + @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) RCPlatformInfo * _Nullable platformInfo;) @@ -2437,7 +2636,6 @@ SWIFT_CLASS_NAMED("PlatformInfo") - @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");) @@ -2465,7 +2663,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE @end - @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) - (void)logIn:(NSString * _Nonnull)appUserID completion:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, BOOL, NSError * _Nullable))completion; - (void)logIn:(NSString * _Nonnull)appUserID completionHandler:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, BOOL, NSError * _Nullable))completionHandler SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15) SWIFT_AVAILABILITY(ios,introduced=13.0); @@ -2475,6 +2672,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE @end + @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) + (RCPurchases * _Nonnull)configureWithAPIKey:(NSString * _Nonnull)apiKey appUserID:(NSString * _Nullable)appUserID observerMode:(BOOL)observerMode userDefaults:(NSUserDefaults * _Nullable)userDefaults SWIFT_AVAILABILITY(maccatalyst,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(macos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(watchos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(tvos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(ios,deprecated=1,message="'configure' has been renamed to 'configure(with:)'"); + (RCPurchases * _Nonnull)configureWithAPIKey:(NSString * _Nonnull)apiKey appUserID:(NSString * _Nullable)appUserID observerMode:(BOOL)observerMode userDefaults:(NSUserDefaults * _Nullable)userDefaults useStoreKit2IfAvailable:(BOOL)useStoreKit2IfAvailable SWIFT_AVAILABILITY(maccatalyst,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(macos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(watchos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(tvos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(ios,deprecated=1,message="'configure' has been renamed to 'configure(with:)'"); @@ -2908,6 +3106,7 @@ SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=13 + /// A type that can parse Apple receipts from a device. /// This implements parsing based on Apple’s documentation. /// To use this class you must access PurchasesReceiptParser/default: @@ -2926,6 +3125,10 @@ 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 PurchasesReceiptParser @@ -2941,8 +3144,20 @@ SWIFT_CLASS("_TtC10RevenueCat21RCPurchasesErrorUtils") SWIFT_AVAILABILITY(maccat - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end +@class NSURLSession; +@class NSURLSessionTask; +@class NSHTTPURLResponse; +@class NSURLRequest; + +/// Implementation of URLSessionTaskDelegate that logs when the task will perform a redirection. +SWIFT_CLASS("_TtC10RevenueCat29RedirectLoggerSessionDelegate") +@interface RedirectLoggerSessionDelegate : NSObject +- (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task willPerformHTTPRedirection:(NSHTTPURLResponse * _Nonnull)response newRequest:(NSURLRequest * _Nonnull)request completionHandler:(void (^ _Nonnull)(NSURLRequest * _Nullable))completionHandler; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + /// Status codes for refund requests. -typedef SWIFT_ENUM_NAMED(NSInteger, RCRefundRequestStatus, "RefundRequestStatus", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCRefundRequestStatus, "RefundRequestStatus", open) { /// User canceled submission of the refund request. RCRefundRequestUserCancelled SWIFT_COMPILE_NAME("userCancelled") = 0, /// Apple has received the refund request. @@ -2959,7 +3174,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCRefundRequestStatus, "RefundRequestStatus" /// Enum of supported stores -typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", open) { /// For entitlements granted via Apple App Store. RCAppStore SWIFT_COMPILE_NAME("appStore") = 0, /// For entitlements granted via Apple Mac App Store. @@ -2978,6 +3193,48 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", closed) { RCBilling SWIFT_COMPILE_NAME("rcBilling") = 7, }; + +SWIFT_CLASS("_TtC10RevenueCat16StoreKit1Wrapper") +@interface StoreKit1Wrapper : NSObject +@property (nonatomic, readonly, strong) RCStorefront * _Nullable currentStorefront; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + +@interface StoreKit1Wrapper (SWIFT_EXTENSION(RevenueCat)) +@end + + +@interface StoreKit1Wrapper (SWIFT_EXTENSION(RevenueCat)) +- (void)finishTransaction:(SKPaymentTransaction * _Nonnull)transaction completion:(void (^ _Nonnull)(void))completion; +@end + + +@interface StoreKit1Wrapper (SWIFT_EXTENSION(RevenueCat)) +- (void)paymentQueue:(SKPaymentQueue * _Nonnull)queue updatedTransactions:(NSArray * _Nonnull)transactions; +- (void)paymentQueue:(SKPaymentQueue * _Nonnull)queue removedTransactions:(NSArray * _Nonnull)transactions; +- (BOOL)paymentQueue:(SKPaymentQueue * _Nonnull)queue shouldAddStorePayment:(SKPayment * _Nonnull)payment forProduct:(SKProduct * _Nonnull)product SWIFT_WARN_UNUSED_RESULT; +- (void)paymentQueue:(SKPaymentQueue * _Nonnull)queue didRevokeEntitlementsForProductIdentifiers:(NSArray * _Nonnull)productIdentifiers SWIFT_AVAILABILITY(watchos,introduced=7.0) SWIFT_AVAILABILITY(tvos,introduced=14.0) SWIFT_AVAILABILITY(macos,introduced=11.0) SWIFT_AVAILABILITY(ios,introduced=14.0); +- (void)paymentQueueDidChangeStorefront:(SKPaymentQueue * _Nonnull)queue; +@end + + +SWIFT_CLASS("_TtC10RevenueCat22StoreKitRequestFetcher") +@interface StoreKitRequestFetcher : NSObject +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + + +@interface StoreKitRequestFetcher (SWIFT_EXTENSION(RevenueCat)) +- (void)requestDidFinish:(SKRequest * _Nonnull)request; +- (void)request:(SKRequest * _Nonnull)request didFailWithError:(NSError * _Nonnull)error; +@end + /// Type of messages available in StoreKit ///

Related Symbols

///
    @@ -2985,7 +3242,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", closed) { /// Purchases/showStoreMessages(for:) /// ///
-typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreMessageType, "StoreMessageType", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreMessageType, "StoreMessageType", open) { /// Message shown when there are billing issues in a subscription RCStoreMessageTypeBillingIssue = 0, /// Message shown when there is a price increase in a subscription that requires consent @@ -3035,7 +3292,7 @@ SWIFT_CLASS_NAMED("StoreProduct") /// StoreProduct/ProductType-swift.enum /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductCategory, "ProductCategory", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductCategory, "ProductCategory", open) { /// A non-renewable or auto-renewable subscription. RCStoreProductCategorySubscription = 0, /// A consumable or non-consumable in-app purchase. @@ -3049,7 +3306,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductCategory, "ProductCategory", c /// StoreProduct/ProductCategory-swift.enum /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", open) { /// A consumable in-app purchase. RCStoreProductTypeConsumable = 0, /// A non-consumable in-app purchase. @@ -3184,7 +3441,7 @@ SWIFT_CLASS_NAMED("StoreProductDiscount") /// The payment mode for a StoreProductDiscount /// Indicates how the product discount price is charged. -typedef SWIFT_ENUM_NAMED(NSInteger, RCPaymentMode, "PaymentMode", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPaymentMode, "PaymentMode", open) { /// Price is charged one or more times RCPaymentModePayAsYouGo = 0, /// Price is charged once in advance @@ -3197,7 +3454,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPaymentMode, "PaymentMode", closed) { /// Wraps SKProductDiscount.Type if this StoreProductDiscount represents a SKProductDiscount. /// Wraps Product.SubscriptionOffer.OfferType if this StoreProductDiscount represents /// a Product.SubscriptionOffer. -typedef SWIFT_ENUM_NAMED(NSInteger, RCDiscountType, "DiscountType", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCDiscountType, "DiscountType", open) { /// Introductory offer RCDiscountTypeIntroductory = 0, /// Promotional offer for subscriptions @@ -3222,7 +3479,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCDiscountType, "DiscountType", closed) { @property (nonatomic, readonly, strong) SKProductDiscount * _Nullable sk1Discount SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=12.2) SWIFT_AVAILABILITY(macos,introduced=10.14.4) SWIFT_AVAILABILITY(ios,introduced=12.2); @end -@class RCStorefront; /// Abstract class that provides access to properties of a transaction. /// StoreTransactions can represent transactions from StoreKit 1, StoreKit 2 or @@ -3234,6 +3490,7 @@ SWIFT_CLASS_NAMED("StoreTransaction") @property (nonatomic, readonly, copy) NSString * _Nonnull transactionIdentifier; @property (nonatomic, readonly) NSInteger quantity; @property (nonatomic, readonly, strong) RCStorefront * _Nullable storefront; +@property (nonatomic, readonly, copy) NSString * _Nullable jwsRepresentation; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; @property (nonatomic, readonly, copy) NSString * _Nonnull description; @@ -3248,7 +3505,6 @@ SWIFT_CLASS_NAMED("StoreTransaction") @property (nonatomic, readonly, copy) NSString * _Nonnull revenueCatId SWIFT_AVAILABILITY(macos,obsoleted=1,message="'revenueCatId' has been renamed to 'transactionIdentifier'") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'revenueCatId' has been renamed to 'transactionIdentifier'") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'revenueCatId' has been renamed to 'transactionIdentifier'") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'revenueCatId' has been renamed to 'transactionIdentifier'"); @end -@class SKPaymentTransaction; @interface RCStoreTransaction (SWIFT_EXTENSION(RevenueCat)) /// Returns the SKPaymentTransaction if this StoreTransaction represents a SKPaymentTransaction. @@ -3306,7 +3562,7 @@ SWIFT_CLASS_NAMED("SubscriptionPeriod") @end /// Units of time used to describe subscription periods. -typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", open) { /// A subscription period unit of a day. RCSubscriptionPeriodUnitDay = 0, /// A subscription period unit of a week. @@ -3323,18 +3579,26 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", closed) { @interface RCSubscriptionPeriod (SWIFT_EXTENSION(RevenueCat)) -@property (nonatomic, readonly, copy) NSString * _Nonnull debugDescription; +/// The number of units per subscription period +@property (nonatomic, readonly) NSInteger numberOfUnits SWIFT_AVAILABILITY(macos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(watchos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(tvos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(ios,unavailable,message="'numberOfUnits' has been renamed to 'value'"); @end @interface RCSubscriptionPeriod (SWIFT_EXTENSION(RevenueCat)) -/// The number of units per subscription period -@property (nonatomic, readonly) NSInteger numberOfUnits SWIFT_AVAILABILITY(macos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(watchos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(tvos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(ios,unavailable,message="'numberOfUnits' has been renamed to 'value'"); +@property (nonatomic, readonly, copy) NSString * _Nonnull debugDescription; @end +SWIFT_CLASS("_TtC10RevenueCat20TrackingManagerProxy") +@interface TrackingManagerProxy : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull authorizationStatusPropertyName; +- (NSInteger)trackingAuthorizationStatus SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + SWIFT_CLASS_NAMED("Transaction") SWIFT_AVAILABILITY(macos,obsoleted=1,message="'Transaction' has been renamed to 'RCStoreTransaction'") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'Transaction' has been renamed to 'RCStoreTransaction'") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'Transaction' has been renamed to 'RCStoreTransaction'") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'Transaction' has been renamed to 'RCStoreTransaction'") @interface RCTransaction : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @@ -3381,7 +3645,7 @@ SWIFT_CLASS_NAMED("Transaction") SWIFT_AVAILABILITY(macos,obsoleted=1,message="' /// EntitlementInfos/verification /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCVerificationResult, "VerificationResult", closed) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCVerificationResult, "VerificationResult", open) { /// No verification was done. /// This can happen for multiple reasons: ///
    @@ -3407,11 +3671,11 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCVerificationResult, "VerificationResult", RCVerificationResultFailed = 2, }; +#endif +#if defined(__cplusplus) #endif #if __has_attribute(external_source_symbol) # pragma clang attribute pop #endif -#if defined(__cplusplus) -#endif #pragma clang diagnostic pop #endif