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

Commit

Permalink
Release v1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarbo committed Feb 23, 2024
1 parent fff9209 commit f7316a0
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 15 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.4.0"
s.version = "1.4.1"
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
12 changes: 10 additions & 2 deletions Glassfy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
816EF28D26611C5900513FB1 /* GYAPIPropertiesResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 816EF28B26611C5900513FB1 /* GYAPIPropertiesResponse.h */; settings = {ATTRIBUTES = (Private, ); }; };
816EF28E26611C5900513FB1 /* GYAPIPropertiesResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 816EF28C26611C5900513FB1 /* GYAPIPropertiesResponse.m */; };
816EF29026611CF700513FB1 /* GYUserProperties+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 816EF28F26611CF100513FB1 /* GYUserProperties+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
817876862B8658DC00E3FC58 /* GYStoreInfoStripe.m in Sources */ = {isa = PBXBuildFile; fileRef = 817876852B8658DC00E3FC58 /* GYStoreInfoStripe.m */; };
817876882B8658E600E3FC58 /* GYStoreInfoStripe.h in Headers */ = {isa = PBXBuildFile; fileRef = 817876872B8658E600E3FC58 /* GYStoreInfoStripe.h */; settings = {ATTRIBUTES = (Public, ); }; };
8179459026565E32000EAA47 /* GYUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8179458E26565E32000EAA47 /* GYUtils.h */; settings = {ATTRIBUTES = (Private, ); }; };
8179459126565E32000EAA47 /* GYUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8179458F26565E32000EAA47 /* GYUtils.m */; };
817A1C3E258CC9EA00D1BA10 /* GYOffering.m in Sources */ = {isa = PBXBuildFile; fileRef = 817A1C3C258CC9EA00D1BA10 /* GYOffering.m */; };
Expand Down Expand Up @@ -199,6 +201,8 @@
816EF28B26611C5900513FB1 /* GYAPIPropertiesResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GYAPIPropertiesResponse.h; sourceTree = "<group>"; };
816EF28C26611C5900513FB1 /* GYAPIPropertiesResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GYAPIPropertiesResponse.m; sourceTree = "<group>"; };
816EF28F26611CF100513FB1 /* GYUserProperties+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GYUserProperties+Private.h"; sourceTree = "<group>"; };
817876852B8658DC00E3FC58 /* GYStoreInfoStripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GYStoreInfoStripe.m; sourceTree = "<group>"; };
817876872B8658E600E3FC58 /* GYStoreInfoStripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GYStoreInfoStripe.h; path = Public/GYStoreInfoStripe.h; sourceTree = "<group>"; };
8179458E26565E32000EAA47 /* GYUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GYUtils.h; sourceTree = "<group>"; };
8179458F26565E32000EAA47 /* GYUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GYUtils.m; sourceTree = "<group>"; };
817A1C3C258CC9EA00D1BA10 /* GYOffering.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GYOffering.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -389,6 +393,8 @@
81C9AF562805BAB1004A36A1 /* GYStoreInfo.m */,
81C9AF652805C386004A36A1 /* GYStoreInfoPaddle.h */,
81C9AF622805C36B004A36A1 /* GYStoreInfoPaddle.m */,
817876872B8658E600E3FC58 /* GYStoreInfoStripe.h */,
817876852B8658DC00E3FC58 /* GYStoreInfoStripe.m */,
81C9AF5D2805BB82004A36A1 /* GYStoresInfo.h */,
81C9AF5A2805BB5B004A36A1 /* GYStoresInfo.m */,
81951CD826443FAA003901F1 /* GYTransaction.h */,
Expand Down Expand Up @@ -524,6 +530,7 @@
812C842929B5FAD400A3F736 /* GYAPIPurchaseHistoryResponse.h in Headers */,
811F322E2631CC6C00777020 /* Glassfy+Private.h in Headers */,
81951CD626443F94003901F1 /* GYOffering.h in Headers */,
817876882B8658E600E3FC58 /* GYStoreInfoStripe.h in Headers */,
8166504228DB6B2700E5B985 /* GYAccountableSku.h in Headers */,
811F31C126317ED800777020 /* GYSku+Private.h in Headers */,
81EFB54425A772D900706FCB /* GYAPIPermissionsResponse.h in Headers */,
Expand Down Expand Up @@ -666,6 +673,7 @@
811BCDE12608DA90007742D9 /* GYSysInfo.m in Sources */,
81C9AF532805B665004A36A1 /* GYAPIStoreInfoResponse.m in Sources */,
81D18D792812AF5700C68558 /* GYSkuPaddle.m in Sources */,
817876862B8658DC00E3FC58 /* GYStoreInfoStripe.m in Sources */,
8161C4992594DD2F009CA563 /* GYTransaction.m in Sources */,
8138BA8A25924B42005CB44E /* SKProduct+GYEncode.m in Sources */,
6478E63C2A0B80AB006FE38E /* GYPaywallNoCodeJsonProvider.m in Sources */,
Expand Down Expand Up @@ -865,7 +873,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 1.4.1;
PRODUCT_BUNDLE_IDENTIFIER = net.glassfy.sdk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -893,7 +901,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 1.4.1;
PRODUCT_BUNDLE_IDENTIFIER = net.glassfy.sdk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.0'```
```pod 'Glassfy', '~> 1.4.1'```

Then, run the following command:

Expand Down
4 changes: 4 additions & 0 deletions Source/GYStoreInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#import "GYStoreInfo.h"
#import "GYStoreInfoPaddle.h"
#import "GYStoreInfoStripe.h"
#import "GYLogger.h"

@interface GYStoreInfo()
Expand All @@ -27,6 +28,9 @@ - (instancetype)initWithObject:(NSDictionary *)obj error:(NSError ** _Nullable)e
case GYStorePaddle:
self = [GYStoreInfoPaddle new];
break;
case GYStoreStripe:
self = [GYStoreInfoStripe new];
break;
case GYStoreAppStore || GYStorePlayStore:
self = [super init];
break;
Expand Down
26 changes: 16 additions & 10 deletions Source/GYStoreInfoPaddle.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,55 @@

#import "GYStoreInfoPaddle.h"

#define kUserId @"userid"
#define kPlanId @"planid"
#define kSubscriptionId @"subscriptionid"
#define kUpdateURL @"updateurl"
#define kCancelURL @"cancelurl"

@implementation GYStoreInfoPaddle

- (NSString *)userId
{
NSString *userId = nil;
if ([self.rawInfo[@"userid"] isKindOfClass:NSString.class]) {
userId = self.rawInfo[@"userid"];
if ([self.rawInfo[kUserId] isKindOfClass:NSString.class]) {
userId = self.rawInfo[kUserId];
}
return userId;
}

- (NSString *)planId
{
NSString *planId = nil;
if ([self.rawInfo[@"planid"] isKindOfClass:NSString.class]) {
planId = self.rawInfo[@"planid"];
if ([self.rawInfo[kPlanId] isKindOfClass:NSString.class]) {
planId = self.rawInfo[kPlanId];
}
return planId;
}

- (NSString *)subscriptionId
{
NSString *subscriptionId = nil;
if ([self.rawInfo[@"subscriptionid"] isKindOfClass:NSString.class]) {
subscriptionId = self.rawInfo[@"subscriptionid"];
if ([self.rawInfo[kSubscriptionId] isKindOfClass:NSString.class]) {
subscriptionId = self.rawInfo[kSubscriptionId];
}
return subscriptionId;
}

- (NSURL *)updateURL
{
NSURL *updateURL = nil;
if ([self.rawInfo[@"updateurl"] isKindOfClass:NSString.class]) {
updateURL = [NSURL URLWithString:self.rawInfo[@"updateurl"]];
if ([self.rawInfo[kUpdateURL] isKindOfClass:NSString.class]) {
updateURL = [NSURL URLWithString:self.rawInfo[kUpdateURL]];
}
return updateURL;
}

- (NSURL *)cancelURL
{
NSURL *cancelURL = nil;
if ([self.rawInfo[@"cancelurl"] isKindOfClass:NSString.class]) {
cancelURL = [NSURL URLWithString:self.rawInfo[@"cancelurl"]];
if ([self.rawInfo[kCancelURL] isKindOfClass:NSString.class]) {
cancelURL = [NSURL URLWithString:self.rawInfo[kCancelURL]];
}
return cancelURL;
}
Expand Down
43 changes: 43 additions & 0 deletions Source/GYStoreInfoStripe.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// GYStoreInfoStripe.m
// Glassfy
//
// Created by Luca Garbolino on 21/02/24.
//

#import "GYStoreInfoStripe.h"

#define kProductId @"productid"
#define kSubscriptionId @"subscriptionid"
#define kCustomerId @"customerid"

@implementation GYStoreInfoStripe

- (NSString *)customerId
{
NSString *customerId = nil;
if ([self.rawInfo[kCustomerId] isKindOfClass:NSString.class]) {
customerId = self.rawInfo[kCustomerId];
}
return customerId;
}

- (NSString *)subscriptionId
{
NSString *subscriptionId = nil;
if ([self.rawInfo[kSubscriptionId] isKindOfClass:NSString.class]) {
subscriptionId = self.rawInfo[kSubscriptionId];
}
return subscriptionId;
}

- (NSString *)producId
{
NSString *producId = nil;
if ([self.rawInfo[kProductId] isKindOfClass:NSString.class]) {
producId = self.rawInfo[kProductId];
}
return producId;
}

@end
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.4.0";
return @"1.4.1";
}

+ (void)initializeWithAPIKey:(NSString *)apiKey
Expand Down
25 changes: 25 additions & 0 deletions Source/Public/GYStoreInfoStripe.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// GYStoreInfoStripe.h
// Glassfy
//
// Created by Luca Garbolino on 21/02/24.
//

#import <Foundation/Foundation.h>
#if __has_include(<Glassfy/GYStoreInfo.h>)
#import <Glassfy/GYStoreInfo.h>
#else
#import "GYStoreInfo.h"
#endif


NS_ASSUME_NONNULL_BEGIN

NS_SWIFT_NAME(Glassfy.StoreInfoStripe)
@interface GYStoreInfoStripe : GYStoreInfo
@property(nonatomic, nullable, readonly) NSString *customerId;
@property(nonatomic, nullable, readonly) NSString *subscriptionId;
@property(nonatomic, nullable, readonly) NSString *producId;
@end

NS_ASSUME_NONNULL_END
2 changes: 2 additions & 0 deletions Source/Public/Glassfy.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#import <Glassfy/GYPurchaseDelegate.h>
#import <Glassfy/GYStoresInfo.h>
#import <Glassfy/GYStoreInfoPaddle.h>
#import <Glassfy/GYStoreInfoStripe.h>
#import <Glassfy/GYAttributionItem.h>
#import <Glassfy/GYInitializeOptions.h>
#else
Expand All @@ -50,6 +51,7 @@
#import "GYPurchaseDelegate.h"
#import "GYStoresInfo.h"
#import "GYStoreInfoPaddle.h"
#import "GYStoreInfoStripe.h"
#import "GYAttributionItem.h"
#import "GYInitializeOptions.h"
#endif
Expand Down

0 comments on commit f7316a0

Please sign in to comment.