Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Release v1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarbo committed Sep 29, 2021
1 parent 0d22b68 commit 4ec2f6a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Glassfy.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Glassfy"
s.version = "1.1.4"
s.version = "1.1.5"
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 }
Expand Down
4 changes: 2 additions & 2 deletions Glassfy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.4;
MARKETING_VERSION = 1.1.5;
PRODUCT_BUNDLE_IDENTIFIER = net.glassfy.sdk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -695,7 +695,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.4;
MARKETING_VERSION = 1.1.5;
PRODUCT_BUNDLE_IDENTIFIER = net.glassfy.sdk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 2 additions & 2 deletions Source/GYManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ - (void)handlePurchasedTransaction:(GYTransaction *)t
sku:nil
transaction:t.paymentTransaction
completion:^(GYAPIPermissionsResponse *res, NSError *err) {
t.permissions = res.permissions ?: @[];
t.permissions = [GYPermissions permissionsWithResponse:res];
t.receiptValidated = (err.code != GYErrorCodeAppleReceiptStatusError);
dispatch_async(dispatch_get_main_queue(), ^{
completion(t, err);
Expand All @@ -328,7 +328,7 @@ - (void)handlePurchasedTransaction:(GYTransaction *)t
sku:sku
transaction:t.paymentTransaction
completion:^(GYAPIPermissionsResponse *res, NSError *err) {
t.permissions = res.permissions ?: @[];
t.permissions = [GYPermissions permissionsWithResponse:res];
t.receiptValidated = (err.code != GYErrorCodeAppleReceiptStatusError);
dispatch_async(dispatch_get_main_queue(), ^{
completion(t, err);
Expand Down
9 changes: 9 additions & 0 deletions Source/GYPermissions.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ + (instancetype)permissionsWithResponse:(GYAPIPermissionsResponse *)response
return installation;
}

- (instancetype)init
{
self = [super init];
if (self) {
self.all = @[];
}
return self;
}

@end

@implementation GYPermissions
Expand Down
4 changes: 2 additions & 2 deletions Source/GYTransaction+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
//

#import "GYTransaction.h"

@class GYPermissions;

NS_ASSUME_NONNULL_BEGIN

@interface GYTransaction (Private)
@property(nonatomic, assign) BOOL receiptValidated;
@property(nonatomic, strong) NSArray<GYPermission*> *permissions;
@property(nonatomic, strong) GYPermissions *permissions;

+ (instancetype)transactionWithPaymentTransaction:(SKPaymentTransaction*)transaction;
@end
Expand Down
5 changes: 3 additions & 2 deletions Source/GYTransaction.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
//

#import <StoreKit/StoreKit.h>
#import "GYPermissions+Private.h"
#import "GYTransaction.h"
#import "GYTransaction+Private.h"


@interface GYTransaction()
@property(nonatomic, readwrite, strong) SKPaymentTransaction *paymentTransaction;
@property(nonatomic, readwrite, strong) NSArray<GYPermission*> *permissions;
@property(nonatomic, readwrite, strong) GYPermissions *permissions;
@property(nonatomic, assign) BOOL receiptValidated;
@end

Expand All @@ -22,7 +23,7 @@ + (instancetype)transactionWithPaymentTransaction:(SKPaymentTransaction*)t
{
GYTransaction *transaction = [[self alloc] init];
transaction.paymentTransaction = t;
transaction.permissions = @[];
transaction.permissions = [GYPermissions new];

return transaction;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Glassfy.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ + (Glassfy *)shared

+ (NSString *)sdkVersion
{
return @"1.1.4";
return @"1.1.5";
}

+ (void)initializeWithAPIKey:(NSString *)apiKey
Expand Down
4 changes: 2 additions & 2 deletions Source/Public/GYTransaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <Foundation/Foundation.h>
@class SKPaymentTransaction;
@class GYPermission;
@class GYPermissions;

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -16,7 +16,7 @@ NS_SWIFT_NAME(Glassfy.Transaction)
@property(nonatomic, readonly) SKPaymentTransaction *paymentTransaction;
@property(nonatomic, readonly) NSString *productIdentifier;
@property(nonatomic, readonly) BOOL receiptValidated;
@property(nonatomic, readonly) NSArray<GYPermission *> *permissions;
@property(nonatomic, readonly) GYPermissions *permissions;
@end

NS_ASSUME_NONNULL_END

0 comments on commit 4ec2f6a

Please sign in to comment.