Skip to content

Conversation

@sumeruchat
Copy link
Contributor

@sumeruchat sumeruchat commented Jan 13, 2026

Problem

Carthage builds were failing with SwiftVerifyEmittedModuleInterface errors when building the SDK with Xcode 16 / Swift 6.2. The errors looked like:

error: no type named 'SendRequestValue' in module 'IterableSDK'
error: no type named 'SendRequestError' in module 'IterableSDK'

This was blocking Superhuman (high-value customer, red health status) from upgrading to 6.6.4+.

Root Cause

When Carthage builds frameworks, it sets BUILD_LIBRARY_FOR_DISTRIBUTION=YES, which tells Swift to generate .swiftinterface files. These interface files can only reference public types.

The issue was that SendRequestValue and SendRequestError were declared as internal types, but they were being used in return types of protocol methods throughout the SDK. This created a mismatch where the module interface generator couldn't properly expose these types.

Solution

Made the following types public in swift-sdk/Internal/RequestSender.swift:

  • SendRequestValue (typealias)
  • SendRequestError (struct, including all properties and methods)

This is the correct fix because these types were already effectively part of the public API through their use in protocol method signatures - we're just making it explicit now.

Verification

Tested the fix in multiple ways:

  1. Direct xcodebuild test: Built the SDK target with BUILD_LIBRARY_FOR_DISTRIBUTION=YES on both iOS device and simulator SDKs - both succeeded.

  2. Actual Carthage build: Created a test Cartfile pointing to the local repo and ran carthage update --use-xcframeworks --platform iOS. Build completed successfully and generated valid XCFrameworks for both IterableSDK and IterableAppExtensions.

  3. Framework validation: Verified the built frameworks contain valid Mach-O binaries and Swift module files.

The fix is minimal (only changes access modifiers) and doesn't alter any functionality.

Related

Fixes SDK-305
Zendesk Ticket: #253251

* 'master' of github-iterable:Iterable/iterable-swift-sdk:
  SDK-296 make isIterableDeepLink public (#992)
@sumeruchat sumeruchat force-pushed the fix/SDK-305-carthage-build-errors branch from ca8a6ea to 5bce3b2 Compare January 13, 2026 18:57
@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.74%. Comparing base (e5176d4) to head (cfae121).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #994      +/-   ##
==========================================
+ Coverage   69.73%   69.74%   +0.01%     
==========================================
  Files         111      111              
  Lines        8983     8983              
==========================================
+ Hits         6264     6265       +1     
+ Misses       2719     2718       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@jena-chakour jena-chakour left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@joaodordio joaodordio left a comment

Choose a reason for hiding this comment

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

LGTM

@sumeruchat sumeruchat merged commit 0cd2c62 into master Jan 15, 2026
14 checks passed
@sumeruchat sumeruchat deleted the fix/SDK-305-carthage-build-errors branch January 15, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants