Skip to content

Commit eefbf17

Browse files
author
Evan Greer
committed
Merge branch 'master' into feature/itbl_track_anon_user
# Conflicts: # Iterable-iOS-AppExtensions.podspec # Iterable-iOS-SDK.podspec # swift-sdk.xcodeproj/project.pbxproj # swift-sdk/Internal/AuthManager.swift # swift-sdk/SDK/IterableAPI.swift
2 parents 0743abd + eacbfd1 commit eefbf17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2488
-331
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Issue report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: 'joaodordio, sumeruchat'
7+
8+
---
9+
10+
## ✍️ Issue Description
11+
12+
Please provide a clear and concise description of the issue you are experiencing.
13+
14+
## 📋 Steps to Reproduce
15+
1.
16+
2.
17+
3.
18+
(List all necessary steps to reliably reproduce the issue.)
19+
20+
---
21+
22+
#### 👤 Iterable `orgId`: _Enter your organization id_
23+
#### 📦 Iterable SDK version: _Enter which version of Iterable SDK are you targeting_
24+
#### 📲 iOS SDK version: _Enter which version of iOS SDK are you experiencing this issue_
25+
26+
27+
---
28+
29+
30+
31+
32+
### ⚠️ Beta Software Notice
33+
34+
**Important:** Our team does not provide support for issues encountered on beta or pre-release versions of operating systems, development tools, or other software. Please verify that the issue occurs on stable, officially released software before submitting this report. Thank you for your understanding.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/workflows/build-and-test.yml

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: pull_request
44

55
jobs:
66
run-tests-job:
7-
runs-on: macos-14
7+
runs-on: macos-15
88

99
steps:
1010
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -13,17 +13,99 @@ jobs:
1313
with:
1414
xcode-version: latest-stable
1515

16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.x'
20+
1621
- name: Setup Ruby and xcpretty
1722
run: |
1823
gem install erb
1924
gem install xcpretty
2025
26+
- name: Print available simulators
27+
run: xcrun simctl list devices | cat
28+
2129
- name: Build and test
2230
run: |
23-
xcodebuild test -project swift-sdk.xcodeproj -scheme swift-sdk -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16 Pro' -enableCodeCoverage YES CODE_SIGNING_REQUIRED=NO | xcpretty && exit ${PIPESTATUS[0]}
31+
xcodebuild test -project swift-sdk.xcodeproj -scheme swift-sdk -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2' -enableCodeCoverage YES -resultBundlePath TestResults.xcresult CODE_SIGNING_REQUIRED=NO | xcpretty && exit ${PIPESTATUS[0]}
32+
33+
- name: Process test results
34+
run: |
35+
python3 scripts/process_xcresult.py --path TestResults.xcresult --test-output test-results.html --coverage-output coverage-results.html --test-plan tests/swift-sdk.xctestplan --summary-json test-summary.json --commit-sha ${{ github.sha }}
36+
if: success() || failure()
37+
38+
- name: Create Test Report Check
39+
uses: actions/github-script@v7
40+
if: success() || failure()
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
script: |
44+
const fs = require('fs');
45+
46+
// Read the test results and coverage reports
47+
let testReport = "";
48+
let coverageReport = "";
49+
50+
try {
51+
testReport = fs.readFileSync("test-results.html", 'utf8');
52+
coverageReport = fs.readFileSync("coverage-results.html", 'utf8');
53+
} catch (error) {
54+
core.warning(`Error reading report files: ${error.message}`);
55+
}
56+
57+
// Read test summary
58+
let testStats = {
59+
total_tests: 0,
60+
passed_tests: 0,
61+
failed_tests: 0,
62+
success_rate: 0
63+
};
64+
65+
try {
66+
const summaryJson = fs.readFileSync("test-summary.json", 'utf8');
67+
testStats = JSON.parse(summaryJson);
68+
69+
// Generate simple markdown summary
70+
fs.writeFileSync("report-summary.md",
71+
`# Test Results\n\n` +
72+
`- Total: ${testStats.total_tests}\n` +
73+
`- Passed: ${testStats.passed_tests}\n` +
74+
`- Failed: ${testStats.failed_tests}\n` +
75+
`- Success: ${(testStats.success_rate).toFixed(1)}%\n`
76+
);
77+
} catch (error) {
78+
core.warning(`Error reading test summary: ${error.message}`);
79+
}
80+
81+
82+
// Extract just the main content from the HTML - removing the HTML tags
83+
function stripHtml(html) {
84+
// Simple regex to extract text content from HTML
85+
return html
86+
.replace(/<h2>[\s\S]*?<\/h2>/gi, '')
87+
.trim();
88+
}
89+
90+
// Create the check with test results as summary and coverage as details
91+
await github.rest.checks.create({
92+
owner: context.repo.owner,
93+
repo: context.repo.repo,
94+
name: 'Unit Test Results',
95+
head_sha: context.payload.pull_request?.head.sha || context.sha,
96+
status: 'completed',
97+
conclusion: testStats.failed_tests > 0 ? 'failure' : 'success',
98+
output: {
99+
title: `Tests: ${testStats.passed_tests}/${testStats.passed_tests + testStats.failed_tests} passed (${(testStats.success_rate).toFixed(1)}%) Skipped: ${testStats.skipped_tests}`,
100+
summary: stripHtml(testReport.substring(0, 65000)),
101+
text: stripHtml(coverageReport.substring(0, 65000))
102+
}
103+
});
24104
25105
- name: CocoaPods lint
26106
run: pod lib lint --allow-warnings
27107

28108
- name: Upload coverage report to codecov.io
29-
run: bash <(curl -s https://codecov.io/bash) -X gcov -J 'IterableSDK' -J 'IterableAppExtensions'
109+
env:
110+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
111+
run: bash <(curl -s https://codecov.io/bash) -X gcov -J 'IterableSDK' -J 'IterableAppExtensions' -B main -C ${{ github.sha }} -r ${{ github.repository }}

.github/workflows/e2e.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: pull_request
44

55
jobs:
66
run-e2e-job:
7-
runs-on: macos-14
7+
runs-on: macos-15
88

99
steps:
1010
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -23,3 +23,5 @@ jobs:
2323
in_app_template_id: ${{secrets.E2E_IN_APP_TEMPLATE_ID}}
2424
run: |
2525
./tests/endpoint-tests/scripts/run_test.sh
26+
27+

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2626
## [Unreleased]
2727
- Adding section for unreleased changes
2828

29+
## [6.5.12]
30+
- Made `IterableDataRegion` an `@objc` class for better Objective-C compatibility.
31+
- Improved robustness of the SDK by adding more internal initialization checks before executing certain operations.
32+
- Enhanced thread safety for embedded message data handling, leading to increased stability.
33+
- Improved `IterableEmbeddedView` by making `imgView` and `cardImageView` optional, leading to more robust view handling, particularly for `.card` and `.banner` types when images might not be present.
34+
- Minor refinements to authentication and token refresh logic for increased stability.
35+
2936
## [6.5.11]
3037
### Fixed
3138
- Added missing constructor for `IterableAPIMobileFrameworkInfo`

Iterable-iOS-AppExtensions.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Iterable-iOS-AppExtensions"
33
s.module_name = "IterableAppExtensions"
4-
s.version = "6.6.0-beta3"
4+
s.version = "6.5.12"
55
s.summary = "App Extensions for Iterable SDK"
66

77
s.description = <<-DESC

Iterable-iOS-SDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Iterable-iOS-SDK"
33
s.module_name = "IterableSDK"
4-
s.version = "6.6.0-beta3"
4+
s.version = "6.5.12"
55
s.summary = "Iterable's official SDK for iOS"
66

77
s.description = <<-DESC

sample-apps/swift-sample-app/swift-sample-app.xcodeproj/project.pbxproj

Lines changed: 100 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@
503503
"$(inherited)",
504504
"@executable_path/Frameworks",
505505
);
506-
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app";
506+
PRODUCT_BUNDLE_IDENTIFIER = "*";
507507
PRODUCT_NAME = "$(TARGET_NAME)";
508508
SWIFT_VERSION = 5.0;
509509
TARGETED_DEVICE_FAMILY = "1,2";
@@ -522,7 +522,7 @@
522522
"$(inherited)",
523523
"@executable_path/Frameworks",
524524
);
525-
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app";
525+
PRODUCT_BUNDLE_IDENTIFIER = "*";
526526
PRODUCT_NAME = "$(TARGET_NAME)";
527527
SWIFT_VERSION = 5.0;
528528
TARGETED_DEVICE_FAMILY = "1,2";
@@ -540,7 +540,7 @@
540540
"@executable_path/Frameworks",
541541
"@executable_path/../../Frameworks",
542542
);
543-
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app.swift-sample-app-notification-extension";
543+
PRODUCT_BUNDLE_IDENTIFIER = "*";
544544
PRODUCT_NAME = "$(TARGET_NAME)";
545545
SKIP_INSTALL = YES;
546546
SWIFT_VERSION = 5.0;
@@ -559,14 +559,107 @@
559559
"@executable_path/Frameworks",
560560
"@executable_path/../../Frameworks",
561561
);
562-
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app.swift-sample-app-notification-extension";
562+
PRODUCT_BUNDLE_IDENTIFIER = "*";
563563
PRODUCT_NAME = "$(TARGET_NAME)";
564564
SKIP_INSTALL = YES;
565565
SWIFT_VERSION = 5.0;
566566
TARGETED_DEVICE_FAMILY = "1,2";
567567
};
568568
name = Release;
569569
};
570+
AC123456789ABCDEF /* Internal */ = {
571+
isa = XCBuildConfiguration;
572+
buildSettings = {
573+
ALWAYS_SEARCH_USER_PATHS = NO;
574+
CLANG_ANALYZER_NONNULL = YES;
575+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
576+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
577+
CLANG_CXX_LIBRARY = "libc++";
578+
CLANG_ENABLE_MODULES = YES;
579+
CLANG_ENABLE_OBJC_ARC = YES;
580+
CLANG_ENABLE_OBJC_WEAK = YES;
581+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
582+
CLANG_WARN_BOOL_CONVERSION = YES;
583+
CLANG_WARN_COMMA = YES;
584+
CLANG_WARN_CONSTANT_CONVERSION = YES;
585+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
586+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
587+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
588+
CLANG_WARN_EMPTY_BODY = YES;
589+
CLANG_WARN_ENUM_CONVERSION = YES;
590+
CLANG_WARN_INFINITE_RECURSION = YES;
591+
CLANG_WARN_INT_CONVERSION = YES;
592+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
593+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
594+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
595+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
596+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
597+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
598+
CLANG_WARN_STRICT_PROTOTYPES = YES;
599+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
600+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
601+
CLANG_WARN_UNREACHABLE_CODE = YES;
602+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
603+
CODE_SIGN_IDENTITY = "iPhone Developer";
604+
COPY_PHASE_STRIP = NO;
605+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
606+
ENABLE_NS_ASSERTIONS = NO;
607+
ENABLE_STRICT_OBJC_MSGSEND = YES;
608+
GCC_C_LANGUAGE_STANDARD = gnu11;
609+
GCC_NO_COMMON_BLOCKS = YES;
610+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
611+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
612+
GCC_WARN_UNDECLARED_SELECTOR = YES;
613+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
614+
GCC_WARN_UNUSED_FUNCTION = YES;
615+
GCC_WARN_UNUSED_VARIABLE = YES;
616+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
617+
MTL_ENABLE_DEBUG_INFO = NO;
618+
SDKROOT = iphoneos;
619+
SWIFT_COMPILATION_MODE = wholemodule;
620+
SWIFT_OPTIMIZATION_LEVEL = "-O";
621+
VALIDATE_PRODUCT = YES;
622+
};
623+
name = Internal;
624+
};
625+
AC123456789ABCDE0 /* Internal */ = {
626+
isa = XCBuildConfiguration;
627+
buildSettings = {
628+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
629+
CODE_SIGN_ENTITLEMENTS = "swift-sample-app/swift-sample-app.entitlements";
630+
CODE_SIGN_STYLE = Automatic;
631+
DEVELOPMENT_TEAM = "BP98Z28R86";
632+
INFOPLIST_FILE = "swift-sample-app/Info.plist";
633+
LD_RUNPATH_SEARCH_PATHS = (
634+
"$(inherited)",
635+
"@executable_path/Frameworks",
636+
);
637+
PRODUCT_BUNDLE_IDENTIFIER = "com.iterable.swift-sample-app";
638+
PRODUCT_NAME = "$(TARGET_NAME)";
639+
SWIFT_VERSION = 5.0;
640+
TARGETED_DEVICE_FAMILY = "1,2";
641+
};
642+
name = Internal;
643+
};
644+
AC123456789ABCDE1 /* Internal */ = {
645+
isa = XCBuildConfiguration;
646+
buildSettings = {
647+
CODE_SIGN_STYLE = Automatic;
648+
DEVELOPMENT_TEAM = "BP98Z28R86";
649+
INFOPLIST_FILE = "swift-sample-app-notification-extension/Info.plist";
650+
LD_RUNPATH_SEARCH_PATHS = (
651+
"$(inherited)",
652+
"@executable_path/Frameworks",
653+
"@executable_path/../../Frameworks",
654+
);
655+
PRODUCT_BUNDLE_IDENTIFIER = "com.iterable.swift-sample-app.notification-extension";
656+
PRODUCT_NAME = "$(TARGET_NAME)";
657+
SKIP_INSTALL = YES;
658+
SWIFT_VERSION = 5.0;
659+
TARGETED_DEVICE_FAMILY = "1,2";
660+
};
661+
name = Internal;
662+
};
570663
/* End XCBuildConfiguration section */
571664

572665
/* Begin XCConfigurationList section */
@@ -575,6 +668,7 @@
575668
buildConfigurations = (
576669
ACA3A14520E2F6B100FEF74F /* Debug */,
577670
ACA3A14620E2F6B100FEF74F /* Release */,
671+
AC123456789ABCDEF /* Internal */,
578672
);
579673
defaultConfigurationIsVisible = 0;
580674
defaultConfigurationName = Release;
@@ -584,6 +678,7 @@
584678
buildConfigurations = (
585679
ACA3A14820E2F6B100FEF74F /* Debug */,
586680
ACA3A14920E2F6B100FEF74F /* Release */,
681+
AC123456789ABCDE0 /* Internal */,
587682
);
588683
defaultConfigurationIsVisible = 0;
589684
defaultConfigurationName = Release;
@@ -593,6 +688,7 @@
593688
buildConfigurations = (
594689
ACA3A15720E2F83E00FEF74F /* Debug */,
595690
ACA3A15820E2F83E00FEF74F /* Release */,
691+
AC123456789ABCDE1 /* Internal */,
596692
);
597693
defaultConfigurationIsVisible = 0;
598694
defaultConfigurationName = Release;

0 commit comments

Comments
 (0)