From 4faa726aa0ec62a3e0391682e2232a5176fef50e Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:16:51 +0400 Subject: [PATCH 01/47] Update Bundle+Extenstions.swift --- .../Utils/Extenstions/Bundle+Extenstions.swift | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index cd1f868..2ce290f 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -10,16 +10,22 @@ import Foundation import UIKit extension Bundle { - class var mainSdk: Bundle { - let bundle = Bundle.init(for: PaymentForm.self) - let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") - return Bundle.init(url: bundleUrl!)! + let bundle = Bundle(for: PaymentForm.self) + if let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), + let resourceBundle = Bundle(url: bundleUrl) { + return resourceBundle + } + if let resourceBundle = Bundle.main.url(forResource: "CloudpaymentsSDK", withExtension: "bundle").flatMap(Bundle.init(url:)) { + return resourceBundle + } + return Bundle.main } - class var cocoapods: Bundle? { + class var cocoapods: Bundle? { return Bundle(identifier: "org.cocoapods.Cloudpayments") } } + From f38727422ed8593ebbe52898bbdc1ee0dfecf36c Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:31:46 +0400 Subject: [PATCH 02/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 2ce290f..4365154 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -12,6 +12,11 @@ import UIKit extension Bundle { class var mainSdk: Bundle { let bundle = Bundle(for: PaymentForm.self) + if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments") { + let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") + // используйте bundleUrl, если он найден + } + if let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), let resourceBundle = Bundle(url: bundleUrl) { return resourceBundle From 91577dd8f8a7d9a84bf2b663968d4b4444d45260 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:48:57 +0400 Subject: [PATCH 03/47] Update Bundle+Extenstions.swift --- .../Extenstions/Bundle+Extenstions.swift | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 4365154..55623d5 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,25 +9,35 @@ import Foundation import UIKit +import Foundation +import UIKit + extension Bundle { - class var mainSdk: Bundle { + + class var mainSdk: Bundle? { + + if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments"), + let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), + let resourceBundle = Bundle(url: bundleUrl) { + return resourceBundle + } + let bundle = Bundle(for: PaymentForm.self) - if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments") { - let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") - // используйте bundleUrl, если он найден - } - if let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), let resourceBundle = Bundle(url: bundleUrl) { return resourceBundle } - if let resourceBundle = Bundle.main.url(forResource: "CloudpaymentsSDK", withExtension: "bundle").flatMap(Bundle.init(url:)) { + + if let bundleUrl = Bundle.main.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), + let resourceBundle = Bundle(url: bundleUrl) { return resourceBundle } - return Bundle.main + + print("CloudpaymentsSDK.bundle not found") + return nil } - class var cocoapods: Bundle? { + class var cocoapods: Bundle? { return Bundle(identifier: "org.cocoapods.Cloudpayments") } } From df0681b3d08dbfde199eef4343357a15fd73ff5d Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:09:53 +0400 Subject: [PATCH 04/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 55623d5..ee178f7 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -14,7 +14,7 @@ import UIKit extension Bundle { - class var mainSdk: Bundle? { + class var mainSdk: Bundle { if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments"), let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), @@ -34,7 +34,7 @@ extension Bundle { } print("CloudpaymentsSDK.bundle not found") - return nil + return Bundle.main } class var cocoapods: Bundle? { From 3fb8214273733c36c791dc41ca8c4d31d213e390 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:38:18 +0400 Subject: [PATCH 05/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 1b89c51..3199483 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources")]), + resources: [.process("../Resources"), .copy(sdk/Sources/PaymentForm/PaymentForm.storyboard)]), ] ) From a4fc7e48a691927764560ba729fe22d171736022 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:42:08 +0400 Subject: [PATCH 06/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 3199483..1b89c51 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources"), .copy(sdk/Sources/PaymentForm/PaymentForm.storyboard)]), + resources: [.process("../Resources")]), ] ) From a5e65dcaef74ee477a829a2a46e41ee8a0f656e6 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:53:52 +0400 Subject: [PATCH 07/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 1b89c51..cf1240e 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources")]), + resources: [.process("../Resources"), .process("PaymentForm.storyboard")]), ] ) From 867aaeee3536293fe8ced0ff6494b69ad3f97afe Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:59:42 +0400 Subject: [PATCH 08/47] Update Bundle+Extenstions.swift --- .../Extenstions/Bundle+Extenstions.swift | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index ee178f7..af0000e 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,36 +9,9 @@ import Foundation import UIKit -import Foundation -import UIKit - extension Bundle { - class var mainSdk: Bundle { - - if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments"), - let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), - let resourceBundle = Bundle(url: bundleUrl) { - return resourceBundle - } - - let bundle = Bundle(for: PaymentForm.self) - if let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), - let resourceBundle = Bundle(url: bundleUrl) { - return resourceBundle - } - - if let bundleUrl = Bundle.main.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), - let resourceBundle = Bundle(url: bundleUrl) { - return resourceBundle - } - - print("CloudpaymentsSDK.bundle not found") - return Bundle.main - } - - class var cocoapods: Bundle? { - return Bundle(identifier: "org.cocoapods.Cloudpayments") + return Bundle(for: PaymentForm.self) } } From e4fc6ca5ec1295947ab03c937cfdbc080ddf0db0 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:09:22 +0400 Subject: [PATCH 09/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index cf1240e..f7b4fc3 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources"), .process("PaymentForm.storyboard")]), + resources: [.process("../Resources"), .copy("PaymentForm.storyboard")]), ] ) From 46a09a0186c3d0da7afb9c671c58003f660ba434 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:13:37 +0400 Subject: [PATCH 10/47] Update Bundle+Extenstions.swift --- .../Extenstions/Bundle+Extenstions.swift | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index af0000e..8c2763b 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -5,15 +5,35 @@ // Created by Sergey Iskhakov on 16.09.2020. // Copyright © 2020 Cloudpayments. All rights reserved. // - import Foundation import UIKit extension Bundle { + class var mainSdk: Bundle { - return Bundle(for: PaymentForm.self) + + if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments"), + let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), + let resourceBundle = Bundle(url: bundleUrl) { + return resourceBundle + } + + let bundle = Bundle(for: PaymentForm.self) + if let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), + let resourceBundle = Bundle(url: bundleUrl) { + return resourceBundle + } + + if let bundleUrl = Bundle.main.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), + let resourceBundle = Bundle(url: bundleUrl) { + return resourceBundle + } + + print("CloudpaymentsSDK.bundle not found") + return Bundle.main + } + + class var cocoapods: Bundle? { + return Bundle(identifier: "org.cocoapods.Cloudpayments") } } - - - From ae382892164ee61d49be57e6364574110133bb6d Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:14:49 +0400 Subject: [PATCH 11/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 8c2763b..e13ecac 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -12,7 +12,7 @@ extension Bundle { class var mainSdk: Bundle { - if let sdkBundle = Bundle(identifier: "org.cocoapods.Cloudpayments"), + if let sdkBundle = Bundle(identifier: "cloudpayments.Cloudpayments.resources"), let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), let resourceBundle = Bundle(url: bundleUrl) { return resourceBundle @@ -34,6 +34,6 @@ extension Bundle { } class var cocoapods: Bundle? { - return Bundle(identifier: "org.cocoapods.Cloudpayments") + return Bundle(identifier: "cloudpayments.Cloudpayments.resources") } } From 93f04e874800b51e63e488f32dee5e1124285033 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:16:11 +0400 Subject: [PATCH 12/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f7b4fc3..16f3742 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources"), .copy("PaymentForm.storyboard")]), + resources: [.process("../Resources"), .copy("sdk/Sources/PaymentForm/PaymentForm.storyboard")]), ] ) From 18424011433d26239a08bd1f280be424fba6c7fe Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:03:49 +0400 Subject: [PATCH 13/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 16f3742..244390b 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources"), .copy("sdk/Sources/PaymentForm/PaymentForm.storyboard")]), + resources: [.process("../Resources"), .copy("Sources/PaymentForm/PaymentForm.storyboard")]), ] ) From 7806817b6dde02bcebaf8979c4e78806cde9f992 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:12:18 +0400 Subject: [PATCH 14/47] Update Bundle+Extenstions.swift --- .../Extenstions/Bundle+Extenstions.swift | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index e13ecac..976ce47 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -8,32 +8,16 @@ import Foundation import UIKit + extension Bundle { class var mainSdk: Bundle { - - if let sdkBundle = Bundle(identifier: "cloudpayments.Cloudpayments.resources"), - let bundleUrl = sdkBundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), - let resourceBundle = Bundle(url: bundleUrl) { - return resourceBundle - } - - let bundle = Bundle(for: PaymentForm.self) - if let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), - let resourceBundle = Bundle(url: bundleUrl) { - return resourceBundle - } - - if let bundleUrl = Bundle.main.url(forResource: "CloudpaymentsSDK", withExtension: "bundle"), - let resourceBundle = Bundle(url: bundleUrl) { - return resourceBundle - } - - print("CloudpaymentsSDK.bundle not found") - return Bundle.main + let bundle = Bundle.init(for: PaymentForm.self) + let bundleUrl = bundle.url(forResource: "cloudpaymentssdk.CloudpaymentsSDK.resources", withExtension: "bundle") + return Bundle.init(url: bundleUrl!)! } class var cocoapods: Bundle? { - return Bundle(identifier: "cloudpayments.Cloudpayments.resources") + return Bundle(identifier: "org.cocoapods.Cloudpayments") } } From 01965158c5e901d6062286c1bcb9253d6deecba1 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:19:52 +0400 Subject: [PATCH 15/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 976ce47..13de4a2 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -8,12 +8,11 @@ import Foundation import UIKit - extension Bundle { class var mainSdk: Bundle { let bundle = Bundle.init(for: PaymentForm.self) - let bundleUrl = bundle.url(forResource: "cloudpaymentssdk.CloudpaymentsSDK.resources", withExtension: "bundle") + let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") return Bundle.init(url: bundleUrl!)! } @@ -21,3 +20,4 @@ extension Bundle { return Bundle(identifier: "org.cocoapods.Cloudpayments") } } + From b821e2781fd008993fa3eecfd717b1e0962332d9 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:38:20 +0400 Subject: [PATCH 16/47] Update Bundle+Extenstions.swift --- .../Extenstions/Bundle+Extenstions.swift | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 13de4a2..e565594 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,15 +9,19 @@ import Foundation import UIKit extension Bundle { - - class var mainSdk: Bundle { - let bundle = Bundle.init(for: PaymentForm.self) - let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") - return Bundle.init(url: bundleUrl!)! - } - - class var cocoapods: Bundle? { - return Bundle(identifier: "org.cocoapods.Cloudpayments") + class var mainSdk: Bundle? { + let bundle = Bundle(for: PaymentForm.self) + if let resourceBundleURL = bundle.resourceURL? + .appendingPathComponent("CloudPayments_CloudPayments.bundle"), + let resourceBundle = Bundle(url: resourceBundleURL) { + return resourceBundle + } else if let resourceBundleURL = bundle.resourceURL? + .appendingPathComponent("CloudPayments.bundle"), + let resourceBundle = Bundle(url: resourceBundleURL) { + return resourceBundle + } + return nil } } + From 7b0fc6052531484ff815b3bbfed56876a910c247 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:39:58 +0400 Subject: [PATCH 17/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index e565594..2df839b 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -20,7 +20,7 @@ extension Bundle { let resourceBundle = Bundle(url: resourceBundleURL) { return resourceBundle } - return nil + return Bundle.main } } From b7def278e97cfeabbadbac937d758ae8c3c294e7 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:41:07 +0400 Subject: [PATCH 18/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 2df839b..f3fa91c 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,7 +9,7 @@ import Foundation import UIKit extension Bundle { - class var mainSdk: Bundle? { + class var mainSdk: Bundle { let bundle = Bundle(for: PaymentForm.self) if let resourceBundleURL = bundle.resourceURL? .appendingPathComponent("CloudPayments_CloudPayments.bundle"), From 8942e641aae68410133dcb3df81d1c9a60b02265 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:44:12 +0400 Subject: [PATCH 19/47] Update Package.swift --- Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 244390b..44deb7a 100644 --- a/Package.swift +++ b/Package.swift @@ -25,7 +25,6 @@ let package = Package( .target( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], - path: "sdk", - resources: [.process("../Resources"), .copy("Sources/PaymentForm/PaymentForm.storyboard")]), + resources: [.process("Resources")] ] ) From 0e30f2f38b4d4ec70d89766c912622072b6936b5 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:47:30 +0400 Subject: [PATCH 20/47] Update Package.swift --- Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Package.swift b/Package.swift index 44deb7a..f012635 100644 --- a/Package.swift +++ b/Package.swift @@ -25,6 +25,7 @@ let package = Package( .target( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], + path: "sdk", resources: [.process("Resources")] ] ) From c627dca46a1deadcc0b2f6387c3f0905194644de Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:49:03 +0400 Subject: [PATCH 21/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f012635..1b3ee1a 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("Resources")] + resources: [.process("Resources")]) ] ) From 9aecd63ed5cca7dfeb0c3020d003c2c719826573 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:52:07 +0400 Subject: [PATCH 22/47] Update Bundle+Extenstions.swift --- .../Utils/Extenstions/Bundle+Extenstions.swift | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index f3fa91c..78e5252 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -8,20 +8,13 @@ import Foundation import UIKit +import Foundation + extension Bundle { - class var mainSdk: Bundle { - let bundle = Bundle(for: PaymentForm.self) - if let resourceBundleURL = bundle.resourceURL? - .appendingPathComponent("CloudPayments_CloudPayments.bundle"), - let resourceBundle = Bundle(url: resourceBundleURL) { - return resourceBundle - } else if let resourceBundleURL = bundle.resourceURL? - .appendingPathComponent("CloudPayments.bundle"), - let resourceBundle = Bundle(url: resourceBundleURL) { - return resourceBundle - } - return Bundle.main + static var mainSdk: Bundle { + return Bundle.module } } + From 1d1fc51a91cc1a99faa12ca51805a4ecdffb3f9d Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:56:15 +0400 Subject: [PATCH 23/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 1b3ee1a..bb97139 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("Resources")]) + resources: [.process("Resources")], .process("Resources/PaymentModule/PaymentForm.storyboard")) ] ) From f12e0c442a87286071f39b907628ed3bd7f3865e Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:57:01 +0400 Subject: [PATCH 24/47] Update Package.swift --- Package.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Package.swift b/Package.swift index bb97139..f290254 100644 --- a/Package.swift +++ b/Package.swift @@ -25,7 +25,6 @@ let package = Package( .target( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], - path: "sdk", resources: [.process("Resources")], .process("Resources/PaymentModule/PaymentForm.storyboard")) ] ) From 6b0bc12c97dd662c44730ed1668aabe12a744465 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:59:01 +0400 Subject: [PATCH 25/47] Update Bundle+Extenstions.swift --- .../Utils/Extenstions/Bundle+Extenstions.swift | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 78e5252..31e9599 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -8,13 +8,19 @@ import Foundation import UIKit -import Foundation - extension Bundle { - static var mainSdk: Bundle { - return Bundle.module + + class var mainSdk: Bundle { + let bundle = Bundle.init(for: PaymentForm.self) + let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") + return Bundle.init(url: bundleUrl!)! + } + + class var cocoapods: Bundle? { + return Bundle(identifier: "org.cocoapods.Cloudpayments") } } + From 37448f07fb4bee29b8650d2386f7ab7b98d3a63e Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:02:42 +0400 Subject: [PATCH 26/47] Update Package.swift --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f290254..f668d82 100644 --- a/Package.swift +++ b/Package.swift @@ -25,6 +25,7 @@ let package = Package( .target( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], - resources: [.process("Resources")], .process("Resources/PaymentModule/PaymentForm.storyboard")) + path: "sdk", + resources: [.process("../Resources")], .process("../Resources/PaymentModule/PaymentForm.storyboard")) ] ) From 234a87ed5cce1137c9ba8ce4da6a6d128167629e Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:04:06 +0400 Subject: [PATCH 27/47] Update Package.swift From 9e12a0d3b6713903a1922e32b11e01f73c2e89a0 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:05:25 +0400 Subject: [PATCH 28/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f668d82..4e8e2b9 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources")], .process("../Resources/PaymentModule/PaymentForm.storyboard")) + resources: [.process("../Resources"), .process("../Resources/PaymentModule/PaymentForm.storyboard")]) ] ) From 351ff3514d119777e5552d5e88c43ae486a9d32c Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:10:11 +0400 Subject: [PATCH 29/47] Update PaymentOptionsForm.swift --- sdk/Sources/PaymentForm/PaymentOptionsForm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift index 4762271..0e1eea7 100644 --- a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift +++ b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift @@ -86,7 +86,7 @@ final class PaymentOptionsForm: PaymentForm, PKPaymentAuthorizationViewControlle @discardableResult public class func present(with configuration: PaymentConfiguration, from: UIViewController, completion: (() -> ())?) -> PaymentForm { - let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.mainSdk) + let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.module) let controller = storyboard.instantiateViewController(withIdentifier: "PaymentOptionsForm") as! PaymentOptionsForm From cfff871504058e532f9cead6bfa0abfc89a1566c Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:12:49 +0400 Subject: [PATCH 30/47] Update PaymentOptionsForm.swift --- sdk/Sources/PaymentForm/PaymentOptionsForm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift index 0e1eea7..4762271 100644 --- a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift +++ b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift @@ -86,7 +86,7 @@ final class PaymentOptionsForm: PaymentForm, PKPaymentAuthorizationViewControlle @discardableResult public class func present(with configuration: PaymentConfiguration, from: UIViewController, completion: (() -> ())?) -> PaymentForm { - let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.module) + let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.mainSdk) let controller = storyboard.instantiateViewController(withIdentifier: "PaymentOptionsForm") as! PaymentOptionsForm From 5fbafdd89cd473aba00d15b14e0a5daf9ab3d9d7 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:00:10 +0400 Subject: [PATCH 31/47] Update PaymentOptionsForm.swift --- sdk/Sources/PaymentForm/PaymentOptionsForm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift index 4762271..9058c0f 100644 --- a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift +++ b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift @@ -86,7 +86,7 @@ final class PaymentOptionsForm: PaymentForm, PKPaymentAuthorizationViewControlle @discardableResult public class func present(with configuration: PaymentConfiguration, from: UIViewController, completion: (() -> ())?) -> PaymentForm { - let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.mainSdk) + let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.main) let controller = storyboard.instantiateViewController(withIdentifier: "PaymentOptionsForm") as! PaymentOptionsForm From f7fc4b375242c108c4105c9eb0f40979c422a752 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:43:46 +0400 Subject: [PATCH 32/47] Update PaymentOptionsForm.swift --- sdk/Sources/PaymentForm/PaymentOptionsForm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift index 9058c0f..4762271 100644 --- a/sdk/Sources/PaymentForm/PaymentOptionsForm.swift +++ b/sdk/Sources/PaymentForm/PaymentOptionsForm.swift @@ -86,7 +86,7 @@ final class PaymentOptionsForm: PaymentForm, PKPaymentAuthorizationViewControlle @discardableResult public class func present(with configuration: PaymentConfiguration, from: UIViewController, completion: (() -> ())?) -> PaymentForm { - let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.main) + let storyboard = UIStoryboard.init(name: "PaymentForm", bundle: Bundle.mainSdk) let controller = storyboard.instantiateViewController(withIdentifier: "PaymentOptionsForm") as! PaymentOptionsForm From 5669858586a1a7fe531a8ae06d7ebeff249c0d6d Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:44:44 +0400 Subject: [PATCH 33/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 31e9599..8b88587 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -13,7 +13,7 @@ extension Bundle { class var mainSdk: Bundle { let bundle = Bundle.init(for: PaymentForm.self) let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") - return Bundle.init(url: bundleUrl!)! + return Bundle.main } class var cocoapods: Bundle? { From e342d44bbfed5b900c6a88b2368e0f095d3511c3 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:00:29 +0400 Subject: [PATCH 34/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 8b88587..31e9599 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -13,7 +13,7 @@ extension Bundle { class var mainSdk: Bundle { let bundle = Bundle.init(for: PaymentForm.self) let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") - return Bundle.main + return Bundle.init(url: bundleUrl!)! } class var cocoapods: Bundle? { From c1dc0a3c26fdd8f9cf4563487b503f1737ba112d Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:09:17 +0400 Subject: [PATCH 35/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 31e9599..904782b 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -8,6 +8,10 @@ import Foundation import UIKit +public class CloudPaymentsBundle { + public static let bundle = Bundle.module +} + extension Bundle { class var mainSdk: Bundle { From 349fedec0715732f5cc23cb6447a5840964adf2c Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:12:27 +0400 Subject: [PATCH 36/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 904782b..31e9599 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -8,10 +8,6 @@ import Foundation import UIKit -public class CloudPaymentsBundle { - public static let bundle = Bundle.module -} - extension Bundle { class var mainSdk: Bundle { From f9991251a7f9ac5683fc875340db1244ded28ac5 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:20:05 +0400 Subject: [PATCH 37/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 4e8e2b9..3b19440 100644 --- a/Package.swift +++ b/Package.swift @@ -26,6 +26,6 @@ let package = Package( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources"), .process("../Resources/PaymentModule/PaymentForm.storyboard")]) + resources: [.process("../Resources"), .copy("../Resources/PaymentModule/PaymentForm.storyboard")]) ] ) From 5f2ccfc1f4e7199738dbe0e0adf080d57b13520c Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:40:26 +0400 Subject: [PATCH 38/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 31e9599..44e935e 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,7 +9,6 @@ import Foundation import UIKit extension Bundle { - class var mainSdk: Bundle { let bundle = Bundle.init(for: PaymentForm.self) let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") @@ -23,4 +22,3 @@ extension Bundle { - From 3529e6fc8778b936545ac91d00c7aaa0686393bb Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:40:52 +0400 Subject: [PATCH 39/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 44e935e..9726316 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,14 +9,8 @@ import Foundation import UIKit extension Bundle { - class var mainSdk: Bundle { - let bundle = Bundle.init(for: PaymentForm.self) - let bundleUrl = bundle.url(forResource: "CloudpaymentsSDK", withExtension: "bundle") - return Bundle.init(url: bundleUrl!)! - } - - class var cocoapods: Bundle? { - return Bundle(identifier: "org.cocoapods.Cloudpayments") + class var mainSdk: Bundle? { + return Bundle(identifier: "cloudpayments.CloudPayments.resources") } } From f460dd280771bfbf343ca0051028d438fe116b41 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:45:26 +0400 Subject: [PATCH 40/47] Update Package.swift --- Package.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 3b19440..592b4cc 100644 --- a/Package.swift +++ b/Package.swift @@ -20,12 +20,20 @@ let package = Package( url: "git@github.com:intaro/CloudPaymentNetworking.git", from: "1.0.2") ], - + resources: [ + .process("../Resources"), + .copy("../Resources/PaymentModule/PaymentForm.storyboard") +] + targets: [ .target( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [.process("../Resources"), .copy("../Resources/PaymentModule/PaymentForm.storyboard")]) + resources: [ + .process("../Resources"), + .copy("../Resources/PaymentModule/PaymentForm.storyboard") +] + ) ] ) From f6fc1c223531af19f6f51cfd4efc60c36ded8ce0 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:55:55 +0400 Subject: [PATCH 41/47] Update Package.swift --- Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 592b4cc..3323268 100644 --- a/Package.swift +++ b/Package.swift @@ -31,8 +31,7 @@ let package = Package( dependencies: ["CloudpaymentsNetworking"], path: "sdk", resources: [ - .process("../Resources"), - .copy("../Resources/PaymentModule/PaymentForm.storyboard") + .copy("../Resources") ] ) ] From 249c4d47fd18839b3652692472c14daffa2f1ead Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:58:29 +0400 Subject: [PATCH 42/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 3323268..38b9be1 100644 --- a/Package.swift +++ b/Package.swift @@ -31,7 +31,7 @@ let package = Package( dependencies: ["CloudpaymentsNetworking"], path: "sdk", resources: [ - .copy("../Resources") + .process("Resources") ] ) ] From 004e8992859f285f43fb0d0200db1837c1857199 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:02:58 +0400 Subject: [PATCH 43/47] Update Package.swift --- Package.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 38b9be1..16db68c 100644 --- a/Package.swift +++ b/Package.swift @@ -19,10 +19,7 @@ let package = Package( name: "CloudpaymentsNetworking", url: "git@github.com:intaro/CloudPaymentNetworking.git", from: "1.0.2") - ], - resources: [ - .process("../Resources"), - .copy("../Resources/PaymentModule/PaymentForm.storyboard") + ] ] targets: [ @@ -31,7 +28,7 @@ let package = Package( dependencies: ["CloudpaymentsNetworking"], path: "sdk", resources: [ - .process("Resources") + .process("../Resources") ] ) ] From 06a894517fdadc871c3b74410a2c156ade4787c5 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:05:50 +0400 Subject: [PATCH 44/47] Update Package.swift --- Package.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Package.swift b/Package.swift index 16db68c..b431a2e 100644 --- a/Package.swift +++ b/Package.swift @@ -20,7 +20,6 @@ let package = Package( url: "git@github.com:intaro/CloudPaymentNetworking.git", from: "1.0.2") ] -] targets: [ .target( From 5e7ed3326fbdae613dca6568e129afe00d96c677 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:07:19 +0400 Subject: [PATCH 45/47] Update Package.swift --- Package.swift | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index b431a2e..990f5b5 100644 --- a/Package.swift +++ b/Package.swift @@ -1,6 +1,8 @@ // swift-tools-version:5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. +// swift-tools-version:5.5 + import PackageDescription let package = Package( @@ -19,16 +21,15 @@ let package = Package( name: "CloudpaymentsNetworking", url: "git@github.com:intaro/CloudPaymentNetworking.git", from: "1.0.2") - ] - + ], targets: [ .target( name: "CloudPayments", dependencies: ["CloudpaymentsNetworking"], path: "sdk", - resources: [ - .process("../Resources") -] + resources: [ + .process("Resources") + ] ) ] ) From 447660a68f1e69bcb0ad087459149def06c0b69a Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:08:51 +0400 Subject: [PATCH 46/47] Update Bundle+Extenstions.swift --- sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift index 9726316..3aa9b31 100644 --- a/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift +++ b/sdk/Sources/Utils/Extenstions/Bundle+Extenstions.swift @@ -9,8 +9,8 @@ import Foundation import UIKit extension Bundle { - class var mainSdk: Bundle? { - return Bundle(identifier: "cloudpayments.CloudPayments.resources") + class var mainSdk: Bundle { + return Bundle(identifier: "cloudpayments.CloudPayments.resources") ?? Bundle.main } } From 66d5047cc4f414e3272f6c4c201491a81616d683 Mon Sep 17 00:00:00 2001 From: Dmitrii <110171206+TheViLkiS@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:18:46 +0400 Subject: [PATCH 47/47] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 990f5b5..0a2812e 100644 --- a/Package.swift +++ b/Package.swift @@ -28,7 +28,7 @@ let package = Package( dependencies: ["CloudpaymentsNetworking"], path: "sdk", resources: [ - .process("Resources") + .process("../Resources") ] ) ]