From 021aec95812107d155bac96b001506078fc127f8 Mon Sep 17 00:00:00 2001 From: Luca Garbolino <387293+lgarbo@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:34:56 +0200 Subject: [PATCH] Release v1.4.2 --- Glassfy.podspec | 2 +- Glassfy.xcodeproj/project.pbxproj | 4 ++-- README.md | 2 +- Source/GYPurchaseHistory.m | 5 +++++ Source/Glassfy.m | 2 +- Source/Public/GYPurchaseHistory.h | 1 + 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Glassfy.podspec b/Glassfy.podspec index abfee76..6acc465 100644 --- a/Glassfy.podspec +++ b/Glassfy.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Glassfy" - s.version = "1.4.1" + s.version = "1.4.2" s.summary = "Subscription and in-app-purchase service." s.license = { :type => 'MIT', :file => 'LICENSE' } s.source = { :git => "https://github.com/glassfy/ios-sdk.git", :tag => s.version.to_s } diff --git a/Glassfy.xcodeproj/project.pbxproj b/Glassfy.xcodeproj/project.pbxproj index 7cd5ecb..820664d 100644 --- a/Glassfy.xcodeproj/project.pbxproj +++ b/Glassfy.xcodeproj/project.pbxproj @@ -873,7 +873,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.4.2; PRODUCT_BUNDLE_IDENTIFIER = net.glassfy.sdk; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -901,7 +901,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.4.2; PRODUCT_BUNDLE_IDENTIFIER = net.glassfy.sdk; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/README.md b/README.md index 73866d7..bf71168 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Our SDK can be easly integrated through Cocoapods or Swift Package Manager #### Integrate using Cocoapods Add the pod to your Podfile: -```pod 'Glassfy', '~> 1.4.1'``` +```pod 'Glassfy', '~> 1.4.2'``` Then, run the following command: diff --git a/Source/GYPurchaseHistory.m b/Source/GYPurchaseHistory.m index 0f1da1e..21a4b52 100644 --- a/Source/GYPurchaseHistory.m +++ b/Source/GYPurchaseHistory.m @@ -23,6 +23,7 @@ @interface GYPurchaseHistory() @property(nonatomic, readwrite, strong, nullable) NSString *currencyCode; @property(nonatomic, readwrite, strong, nullable) NSString *countryCode; +@property(nonatomic, readwrite, assign) BOOL isInTrialPeriod; @property(nonatomic, readwrite, assign) BOOL isInIntroOfferPeriod; @property(nonatomic, readwrite, strong, nullable) NSString *promotionalOfferId; @property(nonatomic, readwrite, strong, nullable) NSString *offerCodeRefName; @@ -80,6 +81,10 @@ - (instancetype)initWithObject:(NSDictionary *)purchaseJSON error:(NSError ** _N self.countryCode = country_code; } + NSNumber *is_trial = purchaseJSON[@"is_trial"]; + if ([is_trial isKindOfClass:NSNumber.class]) { + self.isInTrialPeriod = is_trial.boolValue; + } NSNumber *is_in_intro_offer_period = purchaseJSON[@"is_in_intro_offer_period"]; if ([is_in_intro_offer_period isKindOfClass:NSNumber.class]) { self.isInIntroOfferPeriod = is_in_intro_offer_period.boolValue; diff --git a/Source/Glassfy.m b/Source/Glassfy.m index 281759a..abb2c10 100644 --- a/Source/Glassfy.m +++ b/Source/Glassfy.m @@ -40,7 +40,7 @@ + (Glassfy *)shared + (NSString *)sdkVersion { - return @"1.4.1"; + return @"1.4.2"; } + (void)initializeWithAPIKey:(NSString *)apiKey diff --git a/Source/Public/GYPurchaseHistory.h b/Source/Public/GYPurchaseHistory.h index 3bc8429..2e0129a 100644 --- a/Source/Public/GYPurchaseHistory.h +++ b/Source/Public/GYPurchaseHistory.h @@ -31,6 +31,7 @@ NS_SWIFT_NAME(Glassfy.PurchaseHistory) @property(nonatomic, readonly, strong, nullable) NSString *currencyCode; @property(nonatomic, readonly, strong, nullable) NSString *countryCode; +@property(nonatomic, readonly, assign) BOOL isInTrialPeriod; @property(nonatomic, readonly, assign) BOOL isInIntroOfferPeriod; @property(nonatomic, readonly, strong, nullable) NSString *promotionalOfferId; @property(nonatomic, readonly, strong, nullable) NSString *offerCodeRefName;