From 1d880c861c0cc062370b397d93f71db97a027be3 Mon Sep 17 00:00:00 2001 From: Surik Date: Mon, 15 Jul 2024 19:51:24 +0400 Subject: [PATCH 1/2] Updated fallbacks fetching logic --- .../QONFallbackService/QONFallbackService.m | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Sources/Qonversion/Qonversion/Services/QONFallbackService/QONFallbackService.m b/Sources/Qonversion/Qonversion/Services/QONFallbackService/QONFallbackService.m index 99efa822..5f58b1e5 100644 --- a/Sources/Qonversion/Qonversion/Services/QONFallbackService/QONFallbackService.m +++ b/Sources/Qonversion/Qonversion/Services/QONFallbackService/QONFallbackService.m @@ -38,7 +38,20 @@ - (QONFallbackObject * _Nullable)obtainFallbackData { NSData *fileData = [NSData dataWithContentsOfFile:pathToFile]; if (!fileData) { - return nil; + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *documentsPath = paths.firstObject; + + if (documentsPath) { + NSString *filePath = [documentsPath stringByAppendingPathComponent:kFallbacksFileName]; + + if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { + fileData = [NSData dataWithContentsOfFile:filePath]; + } else { + return nil; + } + } else { + return nil; + } } NSDictionary *resultMap = [NSJSONSerialization JSONObjectWithData:fileData options:kNilOptions error:nil]; From 59d44c39efee98b62b35bbacd25921ef2dc6b82c Mon Sep 17 00:00:00 2001 From: suriksarkisyan Date: Mon, 15 Jul 2024 18:14:45 +0000 Subject: [PATCH 2/2] [create-pull-request] automated change --- Framework/Info.plist | 2 +- Qonversion.podspec | 2 +- Sources/Qonversion/Public/QONConfiguration.m | 2 +- fastlane/report.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Framework/Info.plist b/Framework/Info.plist index 3b73fb1b..e2e7f910 100644 --- a/Framework/Info.plist +++ b/Framework/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.11.0 + 5.11.1 CFBundleSignature ???? CFBundleVersion diff --git a/Qonversion.podspec b/Qonversion.podspec index 9041f8b9..e2f5f324 100644 --- a/Qonversion.podspec +++ b/Qonversion.podspec @@ -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.11.0' + s.version = '5.11.1' s.summary = 'qonversion.io' s.description = <<-DESC Deep Analytics for iOS Subscriptions diff --git a/Sources/Qonversion/Public/QONConfiguration.m b/Sources/Qonversion/Public/QONConfiguration.m index c05046bd..54240cda 100644 --- a/Sources/Qonversion/Public/QONConfiguration.m +++ b/Sources/Qonversion/Public/QONConfiguration.m @@ -9,7 +9,7 @@ #import "QONConfiguration.h" #import "QNAPIConstants.h" -static NSString *const kSDKVersion = @"5.11.0"; +static NSString *const kSDKVersion = @"5.11.1"; @interface QONConfiguration () diff --git a/fastlane/report.xml b/fastlane/report.xml index 58bcc58e..378994a8 100644 --- a/fastlane/report.xml +++ b/fastlane/report.xml @@ -5,12 +5,12 @@ - + - +