-
Notifications
You must be signed in to change notification settings - Fork 42
SDK-290 Add Expo Config Plugin and Fix Static Linkage Swift Header Import #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
plugin/src/withIterablePodfile.ts
Outdated
| return contents; | ||
| } | ||
|
|
||
| const iterablePods = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually adding dynamic linkage to the pods, so it's not actually testing it with static pod linkages.
…r import" This reverts commit 28fe855.

🔹 JIRA Ticket(s) if any
✏️ Description
Problem
Integrating the Iterable React Native SDK in Expo managed workflows requires complex manual configuration:
This leads to recurring build failures:
'Iterable_React_Native_SDK-Swift.h' file not foundSolution
1. Expo Config Plugin
New plugin at
plugin/src/that automates iOS build configuration duringexpo prebuild:Autolinking Exclusion (
withIterableAutolinking.ts):@iterable/react-native-sdkfrom iOS autolinking to prevent duplicate entriesPodfile Transformation (
withIterablePodfile.ts):use_frameworks! :linkage => :staticis set (Expo requirement):linkage => :dynamicoverrideIterableNotificationstarget for push extensionsUsage:
{ "expo": { "plugins": [ ["@iterable/react-native-sdk", { "enableNotificationExtension": true }] ] } }2. Swift Header Import Fix
Updated
RNIterableAPI.mmto use conditional import for static framework builds:3. Podspec Updates
Added to
Iterable-React-Native-SDK.podspec:SWIFT_OBJC_INTERFACE_HEADER_NAMEsettingHEADER_SEARCH_PATHSfor generated Swift header locationFiles Changed
plugin/src/index.tsplugin/src/withIterableAutolinking.tsplugin/src/withIterablePodfile.tsplugin/__tests__/plugin.test.tsios/RNIterableAPI/RNIterableAPI.mmIterable-React-Native-SDK.podspecpackage.jsonTesting
yarn build- SDK and plugin compile successfullyyarn test:plugin- All plugin tests passyarn ios- No Swift header errorsnpx expo prebuild- Correct Podfile outputDependencies
iterable-swift-sdkversion 6.6.5+ with C linkage header fixes