Skip to content

SDK-502 Fix CocoaPods crash from missing embedded-view nib#1075

Merged
sumeruchat merged 3 commits into
masterfrom
fix/SDK-502-cocoapods-embedded-xib
Jun 12, 2026
Merged

SDK-502 Fix CocoaPods crash from missing embedded-view nib#1075
sumeruchat merged 3 commits into
masterfrom
fix/SDK-502-cocoapods-embedded-xib

Conversation

@sumeruchat

Copy link
Copy Markdown
Contributor

What

Apps integrating the SDK via CocoaPods crash when an out-of-the-box embedded message is shown. The podspec did not bundle IterableEmbeddedView.xib, so the nib was missing at runtime and loadViewFromNib() crashed. SPM is unaffected.

Changes

  • Add swift-sdk/ui-components/**/*.xib to the IterableSDKResources resource bundle in Iterable-iOS-SDK.podspec. This bundles IterableEmbeddedView.xib and SampleInboxCell.xib, which moved out of Resources/ in 6.5.9.
  • Keep the IterableSDKResources bundle name so findCocoaPodsResourceBundle() and the legacy fallback are unchanged.
  • CHANGELOG entry under Unreleased.

Impact

  • Breaking changes: None. Resource packaging only, no API or source-layout change.
  • Dependencies: None.
  • Performance: None.

Testing

How to test:

  1. In a scratch app, add pod 'Iterable-iOS-SDK', :path => '<local repo path>', then pod install.
  2. Build the Iterable-iOS-SDK-IterableSDKResources target and inspect IterableSDKResources.bundle.
  3. Confirm it now contains IterableEmbeddedView.nib and SampleInboxCell.nib (before this change it contained neither).
  4. Display an out-of-the-box embedded message and confirm it renders instead of crashing.

Verified locally: the rebuilt bundle ships both nibs after the change, and ./agent_build.sh passes.

Jira: https://iterable.atlassian.net/browse/SDK-502

IterableEmbeddedView.xib and SampleInboxCell.xib moved out of
swift-sdk/Resources/ in 6.5.9, but the podspec resource_bundles glob
still only covered Resources/. CocoaPods builds shipped
IterableSDKResources without the embedded-view nib, so loadViewFromNib()
crashed when an out-of-the-box embedded message was displayed.

Add swift-sdk/ui-components/**/*.xib to the IterableSDKResources bundle.
Bundle name is unchanged, so the loader and its legacy fallback stay as
they are. SPM already bundled these XIBs and is untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.60%. Comparing base (6ece5b4) to head (5b6da71).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   71.62%   71.60%   -0.03%     
==========================================
  Files         114      114              
  Lines        9462     9462              
==========================================
- Hits         6777     6775       -2     
- Misses       2685     2687       +2     

☔ View full report in Codecov by Harness.
📢 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.

@joaodordio joaodordio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, just one minor comment

Comment thread Iterable-iOS-SDK.podspec Outdated
sumeruchat and others added 2 commits June 11, 2026 16:15
Widen the ui-components resource glob to {storyboard,xib,xcassets,xcdatamodeld}
so it mirrors the Resources/ glob. An xcassets or xcdatamodeld added under
ui-components later would otherwise be dropped from the CocoaPods bundle and
reintroduce a missing-resource crash. Verified via pod install that the built
IterableSDKResources.bundle still ships IterableEmbeddedView.nib and
SampleInboxCell.nib.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sumeruchat sumeruchat merged commit 8263b08 into master Jun 12, 2026
15 checks passed
@sumeruchat sumeruchat deleted the fix/SDK-502-cocoapods-embedded-xib branch June 12, 2026 14:58
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.

2 participants