Repository navigation
[SDK-873] iOS: link the NSE's IterableAppExtensions through SPM - #78
Open
joaodordio wants to merge 4 commits into
Open
joaodordio wants to merge 4 commits into
joaodordio wants to merge 4 commits into
Conversation
CocoaPods trunk is read-only, so Iterable-iOS-AppExtensions 6.7.5 is the last version published there. The plugin now adds the iterable-swift-sdk package to the IterableExpoRichPush target instead of injecting the pod, and removes the Podfile target that earlier versions added. ExpoAdapterIterable searches the SPM products directory so it builds when @iterable/react-native-sdk pulls IterableSDK through spm_dependency. Widens the RN SDK peer to ^3.0.0 || ^4.0.0.
Anchor the Podfile match on the column-0 end the old plugin wrote so empty or nested blocks are handled, normalize package URLs before reuse, and clarify the existing-target log message.
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (3)
🛟 Help
|
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.

Note
Version context (as of 2026-12-02):
@iterable/react-native-sdk4.0.0 is published and still installs the iOS SDK through theIterable-iOS-SDK6.7.5 pod.@iterable/expo-plugin1.1.0, with peer@iterable/react-native-sdk: ^3.0.0. Expo apps installing RN SDK 4.0.0 therefore hit an npm peer conflict today.This PR builds against the pod-based RN SDK (3.x, 4.0.x) and the SPM-based one (4.1.0 and later). Its peer range
^3.0.0 || ^4.0.0covers both, so it can ship before RN 4.1.0, and has to ship no later than it.📝 Summary
🎟️ Jira Ticket: SDK-873
📖 Description
CocoaPods trunk went read-only on 2026-12-02, so
Iterable-iOS-AppExtensions6.7.5 is the last version that will ever be published there.withXcodeProjectmod now adds anXCRemoteSwiftPackageReferenceforhttps://github.com/Iterable/iterable-swift-sdk.git(up to next major from 6.7.5). It also adds anIterableAppExtensionsproduct dependency and a Frameworks build file onIterableExpoRichPush. This runs for new targets, and idempotently for targets that already exist (expo prebuildwithout--clean). The range always admits the exact version the RN SDK pins (today 6.7.5, through the pod or through SPM), so the workspace resolves one version.target 'IterableExpoRichPush' do pod 'Iterable-iOS-AppExtensions' end, and it removes that block if an earlier plugin version left it there. Otherwise the NSE would get twoIterableAppExtensionsmodules. Only a block that contains the Iterable pod is removed, matched on the column-0endthe old plugin wrote.ExpoAdapterIterable.podspec. Adds the sameSWIFT_INCLUDE_PATHSentry RN'sspm.rbadds to the declaring pod. With the SPM-based RN SDK,IterableAppDelegate.swiftotherwise fails withno such module 'IterableSDK'(reproduced). It's a search path only, not a link, so there's no second SDK copy. It has no effect with the pod-based RN SDK (3.x and 4.0.x).^3.0.0to^3.0.0 || ^4.0.0. This fixes the peer conflict for RN SDK 4.0.0, which is live today, and covers 4.1.0, the SPM cutover.yarn.lockchanges only in the peer line.Overlap: #65 (NotificationDelegateRouter) adds Swift files to
ExpoAdapterIterable. The podspec include path covers them, and there are no file conflicts.🧪 How to test?
Run
yarn test. Then inexample/, runnpx expo prebuild --platform ios --clean && cd ios && pod install, and build.IterableExpoRichPushshould listIterableAppExtensionsunder Frameworks, and the Podfile should have no NSE target.Verified locally on Xcode 27.2 with Expo 55 / RN 0.83.2:
.appexlinksITBNotificationServiceExtension; oneiterable-swift-sdk6.7.5 is resolved for the workspaceuse_frameworks!staticuse_frameworks!dynamicIterableSDKclasses are defined once (in the RN framework)The published 4.0.0 has the same iOS dependency as 3.2.1 (the
Iterable-iOS-SDK6.7.5 pod), but I did not build it separately.Also verified: a non-clean
expo prebuildover a Podfile that still has the legacy block strips it and leaves exactly one package reference and one Frameworks entry.CI on head
0b5c1a0(README and CHANGELOG change only since3f1f1693): every check passes except CodeQL Swift, which was still running when this was written. It passed on3f1f1693. CodeQL Swift (Xcode 26.3) runsexpo prebuild --cleanwith RN SDK 3.2.1, resolvesiterable-swift-sdk6.7.5 for the NSE, and builds the example.yarn test:coverage(11 suites, 78 tests, new code at 100% lines),yarn tsc --noEmit,yarn prepareandyarn lintall pass. The newwithIosPushNotifications.utils.test.tsuses the realxcodeparser and writer, including a write-and-reparse round trip and an idempotency check.Not verified: rich push actually rendering through the NSE. The simulator can't authorize notifications without UI automation, so that needs a pass on a device.
🧾 Changelog
Added under [Unreleased].
📹 Loom recording if applicable
N/A
🐞 Github Issues solved
N/A
📚 Docs PR if applicable
iterable-docs#1659 (replaces #1658) covers the Expo page. It says the NSE is linked through SPM, and that RN SDK 4.1.0 and later need this plugin release (the first version after 1.1.x) and Xcode 26+.