Skip to content

fix: Static library compilation in podspec#140

Open
steve228uk wants to merge 4 commits into
exponea:mainfrom
steve228uk:fix/static-libraries
Open

fix: Static library compilation in podspec#140
steve228uk wants to merge 4 commits into
exponea:mainfrom
steve228uk:fix/static-libraries

Conversation

@steve228uk
Copy link
Copy Markdown

@steve228uk steve228uk commented May 14, 2026

Summary

  • Updates the podspec configuration used when USE_FRAMEWORKS=static.
  • Explicitly preserves React Native's clang C++ language standard in the merged pod target config.
  • Explicitly sets the generated Swift Objective-C header name.
  • Appends the required React Native and generated Swift header search paths without replacing existing pod target config.

Issues Resolved

Static framework iOS builds could fail because Objective-C sources attempted to import react_native_exponea_sdk-Swift.h before Xcode exposed it reliably.

The previous direct pod_target_xcconfig[...] approach could also fail during pod install because CocoaPods exposes pod_target_xcconfig= as a writer, but not as a readable hash accessor.

When overriding pod target config for static framework builds, the podspec must continue to carry React Native's configured clang C++ language standard so the target stays aligned with the React Native build settings.

How

  • Reads any existing pod_target_xcconfig from s.attributes_hash.
  • Preserves existing config values and existing HEADER_SEARCH_PATHS.
  • Falls back to $(inherited) when no header search paths are already present.
  • Assigns the merged config back via s.pod_target_xcconfig = ....
  • Sets CLANG_CXX_LANGUAGE_STANDARD to rct_cxx_language_standard().
  • Keeps SWIFT_COMPILATION_MODE set to incremental for static framework builds.
  • Sets SWIFT_OBJC_INTERFACE_HEADER_NAME to react_native_exponea_sdk-Swift.h.

Validation

  • git diff --check
  • ruby -c react-native-exponea-sdk.podspec

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.

1 participant