SDK-502 Fix CocoaPods crash from missing embedded-view nib#1075
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
joaodordio
approved these changes
Jun 11, 2026
joaodordio
left a comment
Member
There was a problem hiding this comment.
LGTM, just one minor comment
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 andloadViewFromNib()crashed. SPM is unaffected.Changes
swift-sdk/ui-components/**/*.xibto theIterableSDKResourcesresource bundle inIterable-iOS-SDK.podspec. This bundlesIterableEmbeddedView.xibandSampleInboxCell.xib, which moved out ofResources/in 6.5.9.IterableSDKResourcesbundle name sofindCocoaPodsResourceBundle()and the legacy fallback are unchanged.Impact
Testing
How to test:
pod 'Iterable-iOS-SDK', :path => '<local repo path>', thenpod install.Iterable-iOS-SDK-IterableSDKResourcestarget and inspectIterableSDKResources.bundle.IterableEmbeddedView.nibandSampleInboxCell.nib(before this change it contained neither).Verified locally: the rebuilt bundle ships both nibs after the change, and
./agent_build.shpasses.Jira: https://iterable.atlassian.net/browse/SDK-502