diff --git a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h index c403a32e0f..d0f963af0c 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.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) +// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) #ifndef REVENUECAT_SWIFT_H #define REVENUECAT_SWIFT_H #pragma clang diagnostic push @@ -40,12 +40,18 @@ #include #endif #if defined(__cplusplus) -#if __has_include() +#if defined(__arm64e__) && __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 @@ -244,6 +250,17 @@ 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) @@ -260,7 +277,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif @import Foundation; @import ObjectiveC; -@import StoreKit; #endif #endif @@ -553,7 +569,7 @@ SWIFT_AVAILABILITY(watchos,unavailable) SWIFT_AVAILABILITY(tvos,unavailable) SWI @end /// Enum of supported attribution networks -typedef SWIFT_ENUM_NAMED(NSInteger, RCAttributionNetwork, "AttributionNetwork", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCAttributionNetwork, "AttributionNetwork", closed) { /// Apple’s search ads RCAttributionNetworkAppleSearchAds = 0, /// Adjust https://www.adjust.com/ @@ -676,8 +692,9 @@ 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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCCacheFetchPolicy, "CacheFetchPolicy", closed) { /// Returns values from the cache, or throws an error if not available. RCCacheFetchPolicyFromCacheOnly = 0, /// Always fetch the most up-to-date data. @@ -692,24 +709,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCCacheFetchPolicy, "CacheFetchPolicy", open }; -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. @@ -771,7 +770,7 @@ SWIFT_CLASS_NAMED("Configuration") /// EntitlementInfos/verification /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCEntitlementVerificationMode, "EntitlementVerificationMode", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCEntitlementVerificationMode, "EntitlementVerificationMode", closed) { /// The SDK will not perform any entitlement verification. RCEntitlementVerificationModeDisabled = 0, /// Enable entitlement verification. @@ -899,11 +898,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)) @@ -955,10 +954,6 @@ 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 @@ -1136,7 +1131,7 @@ SWIFT_CLASS_NAMED("EntitlementInfos") @end /// Error codes used by the Purchases SDK -typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", closed) { RCUnknownError SWIFT_COMPILE_NAME("unknownError") = 0, RCPurchaseCancelledError SWIFT_COMPILE_NAME("purchaseCancelledError") = 1, RCStoreProblemError SWIFT_COMPILE_NAME("storeProblemError") = 2, @@ -1178,65 +1173,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", open) { 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 @@ -1275,7 +1211,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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCIntroEligibilityStatus, "IntroEligibilityStatus", closed) { /// 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. @@ -1286,13 +1222,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCIntroEligibilityStatus, "IntroEligibilityS RCIntroEligibilityStatusNoIntroOfferExists = 3, }; - -SWIFT_CLASS("_TtC10RevenueCat14LogInOperation") -@interface LogInOperation : CacheableNetworkOperation -@end - - - /// Enumeration of the different verbosity levels. ///

Related Symbols

///
    @@ -1300,7 +1229,7 @@ SWIFT_CLASS("_TtC10RevenueCat14LogInOperation") /// Purchases/logLevel /// ///
-typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", closed) { RCLogLevelVerbose = 4, RCLogLevelDebug = 0, RCLogLevelInfo = 1, @@ -1312,7 +1241,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", open) { - /// Information that represents a non-subscription purchase made by a user. /// This can be one of these types of product: ///
    @@ -1404,6 +1332,7 @@ 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 @@ -1534,7 +1463,7 @@ SWIFT_CLASS_NAMED("Package") /// Displaying Products /// ///
-typedef SWIFT_ENUM_NAMED(NSInteger, RCPackageType, "PackageType", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPackageType, "PackageType", closed) { /// A package that was defined with an unknown identifier. RCPackageTypeUnknown = -2, /// A package that was defined with an unknown identifier. @@ -1555,43 +1484,8 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPackageType, "PackageType", open) { 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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPeriodType, "PeriodType", closed) { /// 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. @@ -1600,43 +1494,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPeriodType, "PeriodType", open) { 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. @@ -1673,36 +1530,6 @@ 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; @@ -1778,7 +1605,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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchaseOwnershipType, "PurchaseOwnershipType", closed) { /// The purchase was made directly by this user. RCPurchaseOwnershipTypePurchased = 0, /// The purchase has been shared to this user by a family member. @@ -2592,32 +2419,6 @@ 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;) @@ -2636,6 +2437,7 @@ 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");) @@ -2663,6 +2465,7 @@ 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); @@ -2672,7 +2475,6 @@ 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:)'"); @@ -3106,7 +2908,6 @@ 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: @@ -3125,10 +2926,6 @@ 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 @@ -3144,20 +2941,8 @@ 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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCRefundRequestStatus, "RefundRequestStatus", closed) { /// User canceled submission of the refund request. RCRefundRequestUserCancelled SWIFT_COMPILE_NAME("userCancelled") = 0, /// Apple has received the refund request. @@ -3174,7 +2959,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCRefundRequestStatus, "RefundRequestStatus" /// Enum of supported stores -typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", closed) { /// For entitlements granted via Apple App Store. RCAppStore SWIFT_COMPILE_NAME("appStore") = 0, /// For entitlements granted via Apple Mac App Store. @@ -3189,50 +2974,10 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", open) { RCUnknownStore SWIFT_COMPILE_NAME("unknownStore") = 5, /// For entitlements granted via the Amazon Store. RCAmazon SWIFT_COMPILE_NAME("amazon") = 6, +/// For entitlements granted via RC Billing + 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

///
    @@ -3240,7 +2985,7 @@ SWIFT_CLASS("_TtC10RevenueCat22StoreKitRequestFetcher") /// Purchases/showStoreMessages(for:) /// ///
-typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreMessageType, "StoreMessageType", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreMessageType, "StoreMessageType", closed) { /// 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 @@ -3290,7 +3035,7 @@ SWIFT_CLASS_NAMED("StoreProduct") /// StoreProduct/ProductType-swift.enum /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductCategory, "ProductCategory", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductCategory, "ProductCategory", closed) { /// A non-renewable or auto-renewable subscription. RCStoreProductCategorySubscription = 0, /// A consumable or non-consumable in-app purchase. @@ -3304,7 +3049,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductCategory, "ProductCategory", o /// StoreProduct/ProductCategory-swift.enum /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", closed) { /// A consumable in-app purchase. RCStoreProductTypeConsumable = 0, /// A non-consumable in-app purchase. @@ -3439,7 +3184,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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCPaymentMode, "PaymentMode", closed) { /// Price is charged one or more times RCPaymentModePayAsYouGo = 0, /// Price is charged once in advance @@ -3452,7 +3197,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPaymentMode, "PaymentMode", open) { /// 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", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCDiscountType, "DiscountType", closed) { /// Introductory offer RCDiscountTypeIntroductory = 0, /// Promotional offer for subscriptions @@ -3477,6 +3222,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCDiscountType, "DiscountType", open) { @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 @@ -3488,7 +3234,6 @@ 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; @@ -3503,6 +3248,7 @@ 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. @@ -3560,7 +3306,7 @@ SWIFT_CLASS_NAMED("SubscriptionPeriod") @end /// Units of time used to describe subscription periods. -typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", closed) { /// A subscription period unit of a day. RCSubscriptionPeriodUnitDay = 0, /// A subscription period unit of a week. @@ -3577,26 +3323,18 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", open) { @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 @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 -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; @@ -3643,7 +3381,7 @@ SWIFT_CLASS_NAMED("Transaction") SWIFT_AVAILABILITY(macos,obsoleted=1,message="' /// EntitlementInfos/verification /// /// -typedef SWIFT_ENUM_NAMED(NSInteger, RCVerificationResult, "VerificationResult", open) { +typedef SWIFT_ENUM_NAMED(NSInteger, RCVerificationResult, "VerificationResult", closed) { /// No verification was done. /// This can happen for multiple reasons: ///
    @@ -3669,11 +3407,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