Skip to content

ci: normalize CocoaPods targets for Xcode 27 (MBL-2278) - #633

Merged
Shahroz16 merged 14 commits into
mainfrom
codex/mbl-2278-cocoapods-target-normalization
Aug 19, 2026
Merged

ci: normalize CocoaPods targets for Xcode 27 (MBL-2278)#633
Shahroz16 merged 14 commits into
mainfrom
codex/mbl-2278-cocoapods-target-normalization

Conversation

@Shahroz16

@Shahroz16 Shahroz16 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ship the CocoaPods deployment-target helper with the React Native package
  • normalize generated and integrated targets to max(React Native floor, 15.0)
  • fail before mutation when selected target, project, or xcconfig settings contain qualified IPHONEOS_DEPLOYMENT_TARGET[...] keys
  • wire the APN/FCM sample through deterministic primary-podspec discovery
  • add focused helper/autolinking tests, recursive audits, CI coverage, and customer guidance

Root cause

Xcode 27 validates every generated target configuration. React Native 0.83 currently requires iOS 15.1, but generated dependency and resource-bundle targets can still carry lower deployment metadata and fail before Customer.io source compilation. A qualified setting such as IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*] can also override an unconditional value, so it must be resolved by the host rather than hidden by a synthesized target override.

Compatibility policy

Customer.io still supports iOS versions below 15, so lower native podspec minimums remain intentional. Raising those public minimums first would drop older applications and would not control transitive pod metadata. This helper instead aligns generated build targets with the current React Native iOS floor, without changing published package runtime support.

Safety

The helper validates the whole selected configuration set before mutation, preserves higher numeric values, reports each original -> final change, and fails closed for unresolved xcconfig or qualified-setting forms. The npm package owns this helper copy and its local behavior tests. It does not use a cross-repository source lock or require wrapper copies to remain byte-identical.

Validation

  • helper suite: 31 tests, 177 assertions
  • conditional target, project, and xcconfig regressions
  • recursive FCM audit: 294 target configurations at iOS 15.1 or newer
  • clean APN and FCM installs on CocoaPods 1.15.2 normalized their known lower targets
  • APN and FCM Xcode 26.6 simulator builds and unsigned generic-device archives passed
  • npm dry-run includes the helper and customer guide, and excludes the retired source lock
  • workspace and installed-package autolinking tests, Ruby/Node syntax, ESLint pre-push hook, and diff check passed

Release and merge policy

This prerequisite should be squash merged only, under this ci: PR title. Merge or rebase would expose historical fix: commits to semantic-release and could trigger an unintended patch release. The squashed CI change will ship with the next coordinated React Native package release after lifecycle runtime validation.

Boundaries

Expo remains the no-override control. This PR does not change React Native lifecycle routing or prove physical-device delivery, signed export, App Store submission, or every customer dependency graph. Hosted Xcode 27 after-proof remains separate.


Note

Medium Risk
Changes iOS build integration and post_install behavior for integrated app/extension targets; mistakes could raise customer deployment floors or fail pod install, but scope is build-time only with extensive tests and fail-closed validation.

Overview
Adds an opt-in CocoaPods Podfile helper so React Native apps can raise generated and integrated targets to a floor of max(React Native min, iOS 15.0) (e.g. 15.1 on RN 0.83), addressing Xcode 27 rejecting pod targets whose deployment metadata is below the SDK build range.

The helper (ios/cocoapods_deployment_target.rb) validates settings before mutation, preserves higher numeric floors, resolves target → xcconfig → project precedence, and fails closed on non-numeric or qualified IPHONEOS_DEPLOYMENT_TARGET[...] keys. It ships in the npm package with a customer guide (docs/cocoapods-deployment-target-normalization.md) and a README pointer.

The example Podfile wires normalize! after react_native_post_install. iOS CI runs autolinking checks, the Minitest helper suite, and a recursive audit over Pods and the sample app project. Autolinking pins the primary customerio-reactnative.podspec when a rich-push podspec exists.

Reviewed by Cursor Bugbot for commit 2b2a815. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • iOS FCM: 633.14.0 (29784805)
  • Android APN: 633.14.0 (29784805)

@Shahroz16
Shahroz16 marked this pull request as ready for review August 14, 2026 17:30
@Shahroz16
Shahroz16 requested a review from a team as a code owner August 14, 2026 17:30
@Shahroz16 Shahroz16 changed the title fix: normalize CocoaPods targets for Xcode 27 (MBL-2278) ci: normalize CocoaPods targets for Xcode 27 (MBL-2278) Aug 14, 2026
Comment thread ios/cocoapods_deployment_target.rb
Comment thread ios/cocoapods_deployment_target.rb Outdated

@mahmoud-elmorabea mahmoud-elmorabea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • validate_numeric_settings! (:567) raises AuditError on a present-but-non-numeric IPHONEOS_DEPLOYMENT_TARGET ($(inherited), $(MIN_IOS)), so an xcconfig-driven customer project breaks pod install with no opt-out — skip-with-warning, or an allow_non_numeric: escape?
  • Third byte-identical copy of the helper (ios#1208, flutter#389) with byte-identity as a manual invariant — can it live in mobile-ci-tools?

@Shahroz16
Shahroz16 requested a review from a team August 18, 2026 08:50
@Shahroz16
Shahroz16 requested a review from mrehan27 August 18, 2026 19:41
@Shahroz16
Shahroz16 merged commit a11edde into main Aug 19, 2026
19 checks passed
@Shahroz16
Shahroz16 deleted the codex/mbl-2278-cocoapods-target-normalization branch August 19, 2026 01:07
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.

3 participants