Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/linter_and_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ jobs:
run: gem install bundler
- name: Install bundler dependencies
run: bundle install
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout kmp-common-sdk (local path dependency)
run: |
git clone --depth 1 https://github.com/mindbox-cloud/kmp-common-sdk.git ../kmp-common-sdk
- name: Build MindboxCommon XCFramework from kmp-common-sdk
working-directory: ../kmp-common-sdk
run: |
chmod +x make-ios-framework.sh
./make-ios-framework.sh
- name: Install yeetd
run: |
wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/publish-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout kmp-common-sdk (local path dependency)
run: |
git clone --depth 1 https://github.com/mindbox-cloud/kmp-common-sdk.git ../kmp-common-sdk
- name: Build MindboxCommon XCFramework from kmp-common-sdk
working-directory: ../kmp-common-sdk
run: |
chmod +x make-ios-framework.sh
./make-ios-framework.sh
- name: Update bundler
run: gem install bundler
- name: Install bundler dependencies
Expand Down
21 changes: 17 additions & 4 deletions Mindbox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
B4E438702D8AFA5700603F3A /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E4386E2D8AFA5700603F3A /* WebViewController.swift */; };
B4E438722D8AFA6700603F3A /* WebViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E438712D8AFA6700603F3A /* WebViewFactory.swift */; };
B4E438742D8AFAA700603F3A /* WebviewPresentationStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E438732D8AFAA700603F3A /* WebviewPresentationStrategy.swift */; };
B4F2BA192E8BE7E100A89C73 /* MindboxCommon in Frameworks */ = {isa = PBXBuildFile; productRef = B4F2BA182E8BE7E100A89C73 /* MindboxCommon */; };
BB4D7CC72BDEC51D008E3AB8 /* Notification+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4D7CC62BDEC51D008E3AB8 /* Notification+Extensions.swift */; };
BB6563102BE3BA430090C473 /* UIApplication+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65630F2BE3BA430090C473 /* UIApplication+Extensions.swift */; };
BBAAC17C2BB2FC9100E1E25E /* MockEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBAAC17B2BB2FC9100E1E25E /* MockEvent.swift */; };
Expand Down Expand Up @@ -1231,6 +1232,7 @@
files = (
A170EDDC29B0883800CE547F /* MindboxLogger.framework in Frameworks */,
B4AD28942E66EC5D008AEFCD /* MindboxCommon in Frameworks */,
B4F2BA192E8BE7E100A89C73 /* MindboxCommon in Frameworks */,
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be a duplicate MindboxCommon framework reference in the Frameworks section (lines 1234 and 1235). This could cause build issues or confusion.

Suggested change
B4F2BA192E8BE7E100A89C73 /* MindboxCommon in Frameworks */,

Copilot uses AI. Check for mistakes.
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -3431,7 +3433,7 @@
);
mainGroup = 313B232625ADEA0F00A1CB72;
packageReferences = (
B4AD28922E66EC5D008AEFCD /* XCRemoteSwiftPackageReference "kmp-common-sdk-spm" */,
B4F2BA172E8BE7E100A89C73 /* XCLocalSwiftPackageReference "../kmp-common-sdk" */,
);
productRefGroup = 313B233125ADEA0F00A1CB72 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -4692,10 +4694,17 @@
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
B4F2BA172E8BE7E100A89C73 /* XCLocalSwiftPackageReference "../kmp-common-sdk" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = "../kmp-common-sdk";
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
B4AD28922E66EC5D008AEFCD /* XCRemoteSwiftPackageReference "kmp-common-sdk-spm" */ = {
B4AD28922E66EC5D008AEFCD /* XCRemoteSwiftPackageReference "kmp-common-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mindbox-cloud/kmp-common-sdk-spm";
repositoryURL = "./kmp-common-sdk";
requirement = {
kind = exactVersion;
version = 1.0.4;
Expand All @@ -4706,7 +4715,11 @@
/* Begin XCSwiftPackageProductDependency section */
B4AD28932E66EC5D008AEFCD /* MindboxCommon */ = {
isa = XCSwiftPackageProductDependency;
package = B4AD28922E66EC5D008AEFCD /* XCRemoteSwiftPackageReference "kmp-common-sdk-spm" */;
package = B4AD28922E66EC5D008AEFCD /* XCRemoteSwiftPackageReference "kmp-common-sdk" */;
productName = MindboxCommon;
};
B4F2BA182E8BE7E100A89C73 /* MindboxCommon */ = {
isa = XCSwiftPackageProductDependency;
productName = MindboxCommon;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
5 changes: 5 additions & 0 deletions Mindbox/CoreController/CoreController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final class CoreController {
func initialization(configuration: MBConfiguration) {

controllerQueue.async {
MindboxUtils.Stopwatch.shared.start(tag: MindboxUtils.Stopwatch.shared.INIT_SDK)
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider extracting the stopwatch tag into a constant to avoid repeating MindboxUtils.Stopwatch.shared.INIT_SDK multiple times and improve maintainability.

Copilot uses AI. Check for mistakes.
SessionTemporaryStorage.shared.isInstalledFromPersistenceStorageBeforeInitSDK = self.persistenceStorage.isInstalled
SessionTemporaryStorage.shared.isInitializationCalled = true

Expand All @@ -39,6 +40,10 @@ final class CoreController {
} else {
self.repeatInitialization(with: configuration)
}

if let duration = MindboxUtils.Stopwatch.shared.stop(tag: MindboxUtils.Stopwatch.shared.INIT_SDK) {
Mindbox.logger.log(level: .info, message: "Mindbox SDK initialised in \(duration). Version \(MindboxCommon.shared.VERSION)")
}

self.guaranteedDeliveryManager.canScheduleOperations = true

Expand Down