Skip to content

Commit

Permalink
Update RevenueCat-Swift.h for version 4.26.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Sep 12, 2023
1 parent c5b402c commit dbe6874
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
"version" : "9.1.0"
}
},
{
"identity" : "purchases-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/RevenueCat/purchases-ios",
"state" : {
"branch" : "main",
"revision" : "23821af79264a06b20c0fde42692d66f86c6004f"
}
},
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
Expand Down
114 changes: 68 additions & 46 deletions Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,11 @@ SWIFT_CLASS("_TtC10RevenueCat37GetProductEntitlementMappingOperation")



SWIFT_CLASS("_TtC10RevenueCat15HealthOperation")
@interface HealthOperation : CacheableNetworkOperation
@end




enum RCIntroEligibilityStatus : NSInteger;
Expand All @@ -1218,15 +1223,18 @@ SWIFT_CLASS_NAMED("IntroEligibility")
@property (nonatomic, readonly) enum RCIntroEligibilityStatus status;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly) NSUInteger hash;
@end




@interface RCIntroEligibility (SWIFT_EXTENSION(RevenueCat))
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic, readonly, copy) NSString * _Nonnull debugDescription;
@end


/// Enum of different possible states for intro price eligibility status.
/// <ul>
/// <li>
Expand Down Expand Up @@ -1354,6 +1362,8 @@ SWIFT_CLASS_NAMED("Offering")
/// <code>offering["custom_package_id"]</code>.
- (RCPackage * _Nullable)packageWithIdentifier:(NSString * _Nullable)identifier SWIFT_WARN_UNUSED_RESULT;
- (RCPackage * _Nullable)objectForKeyedSubscript:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
/// Initialize an <code>Offering</code> given a list of <code>Package</code>s.
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier serverDescription:(NSString * _Nonnull)serverDescription metadata:(NSDictionary<NSString *, id> * _Nonnull)metadata availablePackages:(NSArray<RCPackage *> * _Nonnull)availablePackages;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
Expand All @@ -1364,6 +1374,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
Expand Down Expand Up @@ -1404,6 +1415,7 @@ SWIFT_CLASS_NAMED("Offerings")
@end



enum RCPackageType : NSInteger;
@class RCStoreProduct;

Expand Down Expand Up @@ -1438,6 +1450,8 @@ SWIFT_CLASS_NAMED("Package")
/// returns:
/// <code>nil</code> if there is no <code>introductoryDiscount</code>.
@property (nonatomic, readonly, copy) NSString * _Nullable localizedIntroductoryPriceString;
/// Initialize a <code>Package</code>.
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier packageType:(enum RCPackageType)packageType storeProduct:(RCStoreProduct * _Nonnull)storeProduct offeringIdentifier:(NSString * _Nonnull)offeringIdentifier OBJC_DESIGNATED_INITIALIZER;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly) NSUInteger hash;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
Expand All @@ -1446,6 +1460,13 @@ SWIFT_CLASS_NAMED("Package")



@class SKProduct;

@interface RCPackage (SWIFT_EXTENSION(RevenueCat))
/// <code>SKProduct</code> assigned to this package. https://developer.apple.com/documentation/storekit/skproduct
@property (nonatomic, readonly, strong) SKProduct * _Nonnull product SWIFT_AVAILABILITY(maccatalyst,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(macos,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead");
@end


@interface RCPackage (SWIFT_EXTENSION(RevenueCat))
/// \param packageType A <code>PackageType</code>.
Expand All @@ -1462,13 +1483,6 @@ SWIFT_CLASS_NAMED("Package")
+ (enum RCPackageType)packageTypeFrom:(NSString * _Nonnull)string SWIFT_WARN_UNUSED_RESULT;
@end

@class SKProduct;

@interface RCPackage (SWIFT_EXTENSION(RevenueCat))
/// <code>SKProduct</code> assigned to this package. https://developer.apple.com/documentation/storekit/skproduct
@property (nonatomic, readonly, strong) SKProduct * _Nonnull product SWIFT_AVAILABILITY(maccatalyst,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(macos,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'product' has been renamed to 'storeProduct': Use StoreProduct instead");
@end


/// Enumeration of all possible <code>Package</code> types, as configured on the package.
/// <h4>Related Articles</h4>
Expand Down Expand Up @@ -1565,12 +1579,19 @@ SWIFT_CLASS("_TtC10RevenueCat28PostOfferForSigningOperation")



/// A <code>NetworkOperation</code> for posting <code>PaywallEvent</code>s.
SWIFT_CLASS("_TtC10RevenueCat26PostPaywallEventsOperation")
@interface PostPaywallEventsOperation : NetworkOperation
@end


SWIFT_CLASS("_TtC10RevenueCat24PostReceiptDataOperation")
@interface PostReceiptDataOperation : CacheableNetworkOperation
@end




SWIFT_CLASS("_TtC10RevenueCat33PostSubscriberAttributesOperation")
@interface PostSubscriberAttributesOperation : NetworkOperation
@end
Expand Down Expand Up @@ -2471,6 +2492,7 @@ 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;
Expand Down Expand Up @@ -2522,6 +2544,33 @@ SWIFT_CLASS_NAMED("PlatformInfo")
@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("Configure behavior through the RevenueCat dashboard 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 @@ -2614,33 +2663,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");)
+ (BOOL)debugLogsEnabled SWIFT_WARN_UNUSED_RESULT;
+ (void)setDebugLogsEnabled:(BOOL)newValue;
/// Deprecated
@property (nonatomic) BOOL allowSharingAppStoreAccount SWIFT_DEPRECATED_MSG("Configure behavior through the RevenueCat dashboard 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))
@property (nonatomic, readonly, copy) NSString * _Nonnull appUserID;
@property (nonatomic, readonly) BOOL isAnonymous;
Expand Down Expand Up @@ -3002,6 +3024,7 @@ SWIFT_CLASS("_TtC10RevenueCat22PurchasesReceiptParser")




@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 All @@ -3010,7 +3033,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau




SWIFT_CLASS("_TtC10RevenueCat21RCPurchasesErrorUtils") SWIFT_AVAILABILITY(maccatalyst,obsoleted=1) SWIFT_AVAILABILITY(macos,obsoleted=1) SWIFT_AVAILABILITY(watchos,obsoleted=1) SWIFT_AVAILABILITY(tvos,obsoleted=1) SWIFT_AVAILABILITY(ios,obsoleted=1)
@interface RCPurchasesErrorUtils : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
Expand Down Expand Up @@ -3179,13 +3201,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", open) {
@property (nonatomic, readonly, copy) NSLocale * _Nonnull priceLocale SWIFT_AVAILABILITY(macos,unavailable,message="Use localizedPriceString instead") SWIFT_AVAILABILITY(watchos,unavailable,message="Use localizedPriceString instead") SWIFT_AVAILABILITY(tvos,unavailable,message="Use localizedPriceString instead") SWIFT_AVAILABILITY(ios,unavailable,message="Use localizedPriceString instead");
@end


@interface RCStoreProduct (SWIFT_EXTENSION(RevenueCat))
- (nonnull instancetype)initWithSk1Product:(SKProduct * _Nonnull)sk1Product;
/// Returns the <code>SKProduct</code> if this <code>StoreProduct</code> represents a <code>StoreKit.SKProduct</code>.
@property (nonatomic, readonly, strong) SKProduct * _Nullable sk1Product;
@end

@class NSDecimalNumber;

@interface RCStoreProduct (SWIFT_EXTENSION(RevenueCat))
Expand Down Expand Up @@ -3220,6 +3235,13 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreProductType, "ProductType", open) {
@property (nonatomic, readonly, copy) NSString * _Nullable localizedIntroductoryPriceString;
@end


@interface RCStoreProduct (SWIFT_EXTENSION(RevenueCat))
- (nonnull instancetype)initWithSk1Product:(SKProduct * _Nonnull)sk1Product;
/// Returns the <code>SKProduct</code> if this <code>StoreProduct</code> represents a <code>StoreKit.SKProduct</code>.
@property (nonatomic, readonly, strong) SKProduct * _Nullable sk1Product;
@end

enum RCPaymentMode : NSInteger;
enum RCDiscountType : NSInteger;

Expand Down Expand Up @@ -3380,13 +3402,13 @@ 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


Expand Down

0 comments on commit dbe6874

Please sign in to comment.