Skip to content

Commit

Permalink
Update RevenueCat-Swift.h for version 4.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RCGitBot committed Oct 10, 2023
1 parent 7b75482 commit 3157150
Showing 1 changed file with 48 additions and 36 deletions.
84 changes: 48 additions & 36 deletions Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ SWIFT_CLASS_NAMED("EntitlementInfo")
@property (nonatomic, readonly) enum RCStore store;
/// The product identifier that unlocked this entitlement
@property (nonatomic, readonly, copy) NSString * _Nonnull productIdentifier;
/// The product plan identifier that unlocked this entitlement (usually for a Google Play purchase)
/// The product plan identifier that unlocked this entitlement (for a Google Play subscription purchase)
@property (nonatomic, readonly, copy) NSString * _Nullable productPlanIdentifier;
/// False if this entitlement is unlocked via a production purchase
@property (nonatomic, readonly) BOOL isSandbox;
Expand Down Expand Up @@ -1895,6 +1895,11 @@ SWIFT_PROTOCOL_NAMED("PurchasesType")
/// \param fetchPolicy The behavior for what to do regarding caching.
///
- (void)customerInfoWithFetchPolicy:(enum RCCacheFetchPolicy)fetchPolicy completionHandler:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, 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);
/// The currently cached <code>CustomerInfo</code> if one is available.
/// This is synchronous, and therefore useful for contexts where an app needs a <code>CustomerInfo</code>
/// right away without waiting for a callback, like a SwiftUI view.
/// This allows initializing state to ensure that UI can be loaded from the very first frame.
@property (nonatomic, readonly, strong) RCCustomerInfo * _Nullable cachedCustomerInfo;
/// Fetch the configured <code>Offerings</code> for this user.
/// <code>Offerings</code> allows you to configure your in-app products
/// via RevenueCat and greatly simplifies management.
Expand Down Expand Up @@ -1922,6 +1927,11 @@ SWIFT_PROTOCOL_NAMED("PurchasesType")
/// </li>
/// </ul>
- (void)offeringsWithCompletionHandler:(void (^ _Nonnull)(RCOfferings * _Nullable, 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);
/// The currently cached <code>Offerings</code> if available.
/// This is synchronous, and therefore useful for contexts where an app needs an instance of <code>Offerings</code>
/// right away without waiting for a callback, like a SwiftUI view.
/// This allows initializing state to ensure that UI can be loaded from the very first frame.
@property (nonatomic, readonly, strong) RCOfferings * _Nullable cachedOfferings;
/// Fetches the <code>StoreProduct</code>s for your IAPs for given <code>productIdentifiers</code>.
/// Use this method if you aren’t using <code>Purchases/getOfferings(completion:)</code>.
/// You should use <code>Purchases/getOfferings(completion:)</code> though.
Expand Down Expand Up @@ -2569,6 +2579,34 @@ 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 @@ -2663,31 +2701,14 @@ 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");
+ (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:)'");
+ (RCPurchases * _Nonnull)configureWithAPIKey:(NSString * _Nonnull)apiKey appUserID:(NSString * _Nullable)appUserID observerMode:(BOOL)observerMode userDefaults:(NSUserDefaults * _Nullable)userDefaults useStoreKit2IfAvailable:(BOOL)useStoreKit2IfAvailable dangerousSettings:(RCDangerousSettings * _Nullable)dangerousSettings 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:)'");
/// Enable automatic collection of Apple Search Ads attribution. Defaults to <code>false</code>.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL automaticAppleSearchAdsAttributionCollection SWIFT_DEPRECATED_MSG("Use Purchases.shared.attribution.enableAdServicesAttributionTokenCollection() instead");)
+ (BOOL)automaticAppleSearchAdsAttributionCollection SWIFT_WARN_UNUSED_RESULT;
+ (void)setAutomaticAppleSearchAdsAttributionCollection:(BOOL)value;
@end


Expand All @@ -2696,17 +2717,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE
@property (nonatomic, readonly) BOOL isAnonymous;
- (void)getOfferingsWithCompletion:(void (^ _Nonnull)(RCOfferings * _Nullable, NSError * _Nullable))completion;
- (void)offeringsWithCompletionHandler:(void (^ _Nonnull)(RCOfferings * _Nullable, 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);
@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:)'");
+ (RCPurchases * _Nonnull)configureWithAPIKey:(NSString * _Nonnull)apiKey appUserID:(NSString * _Nullable)appUserID observerMode:(BOOL)observerMode userDefaults:(NSUserDefaults * _Nullable)userDefaults useStoreKit2IfAvailable:(BOOL)useStoreKit2IfAvailable dangerousSettings:(RCDangerousSettings * _Nullable)dangerousSettings 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:)'");
/// Enable automatic collection of Apple Search Ads attribution. Defaults to <code>false</code>.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL automaticAppleSearchAdsAttributionCollection SWIFT_DEPRECATED_MSG("Use Purchases.shared.attribution.enableAdServicesAttributionTokenCollection() instead");)
+ (BOOL)automaticAppleSearchAdsAttributionCollection SWIFT_WARN_UNUSED_RESULT;
+ (void)setAutomaticAppleSearchAdsAttributionCollection:(BOOL)value;
@property (nonatomic, readonly, strong) RCOfferings * _Nullable cachedOfferings;
@end


Expand Down Expand Up @@ -2908,6 +2919,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL automaticAppleSearchAdsAt
- (void)getCustomerInfoWithFetchPolicy:(enum RCCacheFetchPolicy)fetchPolicy completion:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, NSError * _Nullable))completion;
- (void)customerInfoWithCompletionHandler:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, 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);
- (void)customerInfoWithFetchPolicy:(enum RCCacheFetchPolicy)fetchPolicy completionHandler:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, 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);
@property (nonatomic, readonly, strong) RCCustomerInfo * _Nullable cachedCustomerInfo;
- (void)getProductsWithIdentifiers:(NSArray<NSString *> * _Nonnull)productIdentifiers completion:(void (^ _Nonnull)(NSArray<RCStoreProduct *> * _Nonnull))completion;
- (void)products:(NSArray<NSString *> * _Nonnull)productIdentifiers completionHandler:(void (^ _Nonnull)(NSArray<RCStoreProduct *> * _Nonnull))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);
- (void)purchaseProduct:(RCStoreProduct * _Nonnull)product withCompletion:(void (^ _Nonnull)(RCStoreTransaction * _Nullable, RCCustomerInfo * _Nullable, NSError * _Nullable, BOOL))completion;
Expand Down

0 comments on commit 3157150

Please sign in to comment.