Skip to content

Commit

Permalink
Release 5.8.3
Browse files Browse the repository at this point in the history
Release 5.8.3
  • Loading branch information
SpertsyanKM authored Apr 2, 2024
2 parents c6f63c0 + 800295b commit 050c398
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Framework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.8.2</string>
<string>5.8.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 578415250db59f137d92c9b1ce32646ae18974ba

COCOAPODS: 1.11.3
COCOAPODS: 1.13.0
2 changes: 1 addition & 1 deletion Qonversion.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|
idfa_exclude_files = ['Sources/Qonversion/IDFA']
s.name = 'Qonversion'
s.swift_version = '5.5'
s.version = '5.8.2'
s.version = '5.8.3'
s.summary = 'qonversion.io'
s.description = <<-DESC
Deep Analytics for iOS Subscriptions
Expand Down
8 changes: 8 additions & 0 deletions Qonversion.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
4CADC5602759181A004FDC10 /* AuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CADC55F2759181A004FDC10 /* AuthViewController.swift */; };
6A121DAC2BB445AE0073B330 /* QONRemoteConfigList.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A121DAB2BB445AE0073B330 /* QONRemoteConfigList.m */; };
6A121DAE2BB446740073B330 /* QONRemoteConfigList.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A121DAD2BB446740073B330 /* QONRemoteConfigList.h */; settings = {ATTRIBUTES = (Public, ); }; };
6A121DB12BBB10370073B330 /* QONRemoteConfigListRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A121DB02BBB10370073B330 /* QONRemoteConfigListRequestData.h */; };
6A121DB32BBB10AA0073B330 /* QONRemoteConfigListRequestData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A121DB22BBB10AA0073B330 /* QONRemoteConfigListRequestData.m */; };
6A21BF4C2AB201A7005BDA7C /* QONRateLimiter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A21BF4B2AB201A7005BDA7C /* QONRateLimiter.h */; };
6A21BF4E2AB20483005BDA7C /* QONRateLimiter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A21BF4D2AB20483005BDA7C /* QONRateLimiter.m */; };
6A21BF532AB2059F005BDA7C /* QONRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A21BF522AB2059F005BDA7C /* QONRequest.h */; };
Expand Down Expand Up @@ -348,6 +350,8 @@
6A121DAB2BB445AE0073B330 /* QONRemoteConfigList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QONRemoteConfigList.m; sourceTree = "<group>"; };
6A121DAD2BB446740073B330 /* QONRemoteConfigList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QONRemoteConfigList.h; sourceTree = "<group>"; };
6A121DAF2BB44D7B0073B330 /* QONRemoteConfigList+protected.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "QONRemoteConfigList+protected.h"; sourceTree = "<group>"; };
6A121DB02BBB10370073B330 /* QONRemoteConfigListRequestData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QONRemoteConfigListRequestData.h; sourceTree = "<group>"; };
6A121DB22BBB10AA0073B330 /* QONRemoteConfigListRequestData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QONRemoteConfigListRequestData.m; sourceTree = "<group>"; };
6A21BF4B2AB201A7005BDA7C /* QONRateLimiter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QONRateLimiter.h; sourceTree = "<group>"; };
6A21BF4D2AB20483005BDA7C /* QONRateLimiter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QONRateLimiter.m; sourceTree = "<group>"; };
6A21BF522AB2059F005BDA7C /* QONRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QONRequest.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -907,6 +911,8 @@
70D05A8D29C9FC1600EA5DDF /* QONRemoteConfigManager.m */,
6ABCBE162B99A79E003DB107 /* QONRemoteConfigLoadingState.h */,
6ABCBE172B99A79E003DB107 /* QONRemoteConfigLoadingState.m */,
6A121DB02BBB10370073B330 /* QONRemoteConfigListRequestData.h */,
6A121DB22BBB10AA0073B330 /* QONRemoteConfigListRequestData.m */,
);
path = QONRemoteConfigManager;
sourceTree = "<group>";
Expand Down Expand Up @@ -1639,6 +1645,7 @@
8957329326DD03A3009507A6 /* QONExperimentGroup.h in Headers */,
895732A126DD03A3009507A6 /* QONMacrosProcess.h in Headers */,
7098564D2A370F270023DFAB /* QONRemoteConfigMapper.h in Headers */,
6A121DB12BBB10370073B330 /* QONRemoteConfigListRequestData.h in Headers */,
7094501A29CD994200F55E68 /* QONRemoteConfig.h in Headers */,
8957327B26DD03A3009507A6 /* QONUser.h in Headers */,
8957327926DD03A3009507A6 /* QNDevice+Advertising.h in Headers */,
Expand Down Expand Up @@ -2027,6 +2034,7 @@
895732BD26DD03A3009507A6 /* QNRequestSerializer.m in Sources */,
895732F526DD03A3009507A6 /* QNAttributionManager.m in Sources */,
895732EF26DD03A3009507A6 /* QNErrorsMapper.m in Sources */,
6A121DB32BBB10AA0073B330 /* QONRemoteConfigListRequestData.m in Sources */,
895732A426DD03A3009507A6 /* QONUserActionPoint.m in Sources */,
8957330A26DE5532009507A6 /* QNKeyedArchiver.m in Sources */,
895732FC26DD03A3009507A6 /* QNStoreKitService.m in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion Sources/Qonversion/Public/QONConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "QONConfiguration.h"
#import "QNAPIConstants.h"

static NSString *const kSDKVersion = @"5.8.2";
static NSString *const kSDKVersion = @"5.8.3";

@interface QONConfiguration ()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// QONRemoteConfigListRequestData.h
// Qonversion
//
// Created by Kamo Spertsyan on 01.04.2024.
// Copyright © 2024 Qonversion Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QONLaunchResult.h"

NS_ASSUME_NONNULL_BEGIN

@interface QONRemoteConfigListRequestData : NSObject

@property (nonatomic, copy, nullable) NSArray<NSString *> *contextKeys;
@property (nonatomic, assign) BOOL includeEmptyContextKey;
@property (nonatomic, copy, nonnull) QONRemoteConfigListCompletionHandler completion;

- (instancetype)initWithCompletion:(QONRemoteConfigListCompletionHandler)completion;

- (instancetype)initWithContextKeys:(NSArray<NSString *> *)contextKeys includeEmptyContextKey:(BOOL)includeEmptyContextKey completion:(QONRemoteConfigListCompletionHandler)completion;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// QONRemoteConfigListRequestData.m
// Qonversion
//
// Created by Kamo Spertsyan on 01.04.2024.
// Copyright © 2024 Qonversion Inc. All rights reserved.
//

#import "QONRemoteConfigListRequestData.h"

@implementation QONRemoteConfigListRequestData

- (instancetype)initWithCompletion:(QONRemoteConfigListCompletionHandler)completion {
self = [super init];
if (self) {
_completion = completion;
}
return self;
}

- (instancetype)initWithContextKeys:(NSArray<NSString *> *)contextKeys includeEmptyContextKey:(BOOL)includeEmptyContextKey completion:(QONRemoteConfigListCompletionHandler)completion {
self = [super init];
if (self) {
_contextKeys = [contextKeys copy];
_includeEmptyContextKey = includeEmptyContextKey;
_completion = completion;
}
return self;
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

#import <Foundation/Foundation.h>
#import "QONLaunchResult.h"
#import "QONExperiment.h"

@interface QONRemoteConfigLoadingState : NSObject

@property (nonatomic, strong, nullable) QONRemoteConfig * loadedConfig;
@property (nonatomic, strong, nonnull) NSMutableArray<QONRemoteConfigCompletionHandler> * completions;
@property (nonatomic, strong, nullable) QONRemoteConfig *loadedConfig;
@property (nonatomic, strong, nonnull) NSMutableArray<QONRemoteConfigCompletionHandler> *completions;
@property (nonatomic, assign) BOOL isInProgress;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
#import "QONExperiment.h"
#import "QNProductCenterManager.h"
#import "QONRemoteConfigLoadingState.h"
#import "QONRemoteConfigListRequestData.h"

static NSString *const kEmptyContextKey = @"";

@interface QONRemoteConfigManager ()

@property (nonatomic, strong) NSMutableDictionary<NSString *, QONRemoteConfigLoadingState *> *loadingStates;
@property (nonatomic, strong) NSMutableArray<QONRemoteConfigListRequestData *> *listRequests;

@end

Expand All @@ -30,6 +32,7 @@ - (instancetype)init {
if (self) {
_remoteConfigService = [QONRemoteConfigService new];
_loadingStates = [NSMutableDictionary new];
_listRequests = [NSMutableArray new];
}

return self;
Expand All @@ -43,6 +46,17 @@ - (void)handlePendingRequests {
completion:^(QONRemoteConfig * _Nullable remoteConfig, NSError * _Nullable error) {}];
}
}

NSArray<QONRemoteConfigListRequestData *> *requestsToSend = [self.listRequests copy];
[self.listRequests removeAllObjects];

for (QONRemoteConfigListRequestData *listRequest in requestsToSend) {
if (listRequest.contextKeys) {
[self obtainRemoteConfigListWithContextKeys:listRequest.contextKeys includeEmptyContextKey:listRequest.includeEmptyContextKey completion:listRequest.completion];
} else {
[self obtainRemoteConfigList:listRequest.completion];
}
}
}

- (void)userChangingRequestFailedWithError:(NSError *)error {
Expand All @@ -59,13 +73,13 @@ - (void)userHasBeenChanged {
}

- (void)obtainRemoteConfigWithContextKey:(NSString * _Nullable)contextKey completion:(QONRemoteConfigCompletionHandler)completion {
BOOL isUserStable = [self.productCenterManager isUserStable];
QONRemoteConfigLoadingState *loadingState = [self loadingStateForContextKey:contextKey];
if (loadingState == nil) {
loadingState = [QONRemoteConfigLoadingState new];
self.loadingStates[contextKey ?: kEmptyContextKey] = loadingState;
}

BOOL isUserStable = [self.productCenterManager isUserStable];
if (!isUserStable || loadingState.isInProgress) {
[loadingState.completions addObject:completion];

Expand Down Expand Up @@ -112,11 +126,27 @@ - (void)obtainRemoteConfigListWithContextKeys:(NSArray<NSString *> *)contextKeys
return completion(remoteConfigList, nil);
}

BOOL isUserStable = [self.productCenterManager isUserStable];
if (!isUserStable) {
QONRemoteConfigListRequestData *requestData = [[QONRemoteConfigListRequestData alloc] initWithContextKeys:contextKeys includeEmptyContextKey:includeEmptyContextKey completion:completion];
[self.listRequests addObject:requestData];

return;
}

QONRemoteConfigListCompletionHandler completionWrapper = [self remoteConfigListCompletionWrapper:completion];
[self.remoteConfigService loadRemoteConfigList:contextKeys includeEmptyContextKey:includeEmptyContextKey completion:completionWrapper];
}

- (void)obtainRemoteConfigList:(QONRemoteConfigListCompletionHandler)completion {
BOOL isUserStable = [self.productCenterManager isUserStable];
if (!isUserStable) {
QONRemoteConfigListRequestData *requestData = [[QONRemoteConfigListRequestData alloc] initWithCompletion:completion];
[self.listRequests addObject:requestData];

return;
}

QONRemoteConfigListCompletionHandler completionWrapper = [self remoteConfigListCompletionWrapper:completion];
[self.remoteConfigService loadRemoteConfigList:completionWrapper];
}
Expand Down
4 changes: 2 additions & 2 deletions fastlane/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@



<testcase classname="fastlane.lanes" name="0: update_plist" time="0.017463">
<testcase classname="fastlane.lanes" name="0: update_plist" time="0.016443">

</testcase>


<testcase classname="fastlane.lanes" name="1: version_bump_podspec" time="0.001418">
<testcase classname="fastlane.lanes" name="1: version_bump_podspec" time="0.001509">

</testcase>

Expand Down

0 comments on commit 050c398

Please sign in to comment.