Skip to content

fix(ios): raise deployment target to 17.0 and stabilize Babel hoisting#1085

Merged
msluszniak merged 4 commits intomainfrom
fix/ios-deployment-target-17
Apr 20, 2026
Merged

fix(ios): raise deployment target to 17.0 and stabilize Babel hoisting#1085
msluszniak merged 4 commits intomainfrom
fix/ios-deployment-target-17

Conversation

@msluszniak
Copy link
Copy Markdown
Member

@msluszniak msluszniak commented Apr 20, 2026

Summary

  • Bumps the iOS deployment target from 15.1 to 17.0 everywhere (podspec, tracked app xcodeprojs and Podfile, Expo apps via expo-build-properties) so the target matches the prebuilt executorch libraries (minos 17.0). Silences the "was built for newer iOS version" linker warnings that previously ran at the end of every iOS build.
  • Re-adds expo-router to the workspace root devDependencies so Yarn hoists it next to babel-preset-expo. Without this, babel-preset-expo's require.resolve('expo-router') check fails, its expo-router Babel plugin is never registered, process.env.EXPO_ROUTER_APP_ROOT stays un-inlined, and Metro rejects require.context in expo-router/_ctx.ios.js. Reverts the incidental breakage from chore: clean up root peer deps and drop ignored resolutions #1083.
  • Scopes logFilters in .yarnrc.yml to silence the YN0002 lines for the root workspace's expo-router peers (and the YN0086 summary). Warnings from any other workspace still surface. The mechanism mirrors the existing @signalwire/docusaurus-theme-llms-txt filter.
  • Updates React Native Audio Api to version 0.12.0

Why iOS 17 specifically

The executorch prebuilt libraries (libexecutorch_ios.a, libbackend_xnnpack_ios.a, etc.) and ExecutorchLib.xcframework are built with minos=17.0. Linking them into an app with a lower deployment target produces a run of linker warnings on every build. README already documents iOS 17.0 as the minimum supported version, so this change also brings build configs in line with the docs.

Remaining warnings after this PR

  • phonemis — shipped with minos=26.0, which is way above the app target. Out of scope here; the library is being rebuilt by a separate team member.
  • pthreadpool (minos 12/14) and cpuinfo (LC_VERSION_MIN 11) — below 17.0, so they don't trigger "built for newer" warnings. No action needed today; worth rebuilding next time those libraries touch the repo for consistency.

Test plan

  • yarn at repo root completes without YN0002 / YN0086 warnings (PR chore: clean up root peer deps and drop ignored resolutions #1083's original goal, preserved).
  • For each Expo app (apps/{llm,computer-vision,speech,text-embeddings}): rm -rf ios && yarn ios successfully prebuilds, installs pods, and builds.
  • In each app's build log, the previous block of "object file was built for newer iOS version (17.0) than being linked (15.1)" warnings from executorch libs is gone.
  • apps/bare-rn: pod install && yarn ios builds; no executorch version-mismatch linker warnings.
  • Metro bundles successfully for Expo apps using expo-router (llm, computer-vision, text-embeddings) — the _ctx.ios.js require.context error reported during development is resolved by the hoist fix.
  • apps/llm builds on Xcode 26.4 without the size_t / Constants.h compile error from react-native-audio-api.

🤖 Generated with Claude Code

msluszniak and others added 2 commits April 20, 2026 12:46
Aligns build configs with the iOS 17.0 minimum already documented in
README. The prebuilt executorch libraries are built at minos=17.0,
so linking them into apps targeting 15.1 produced "built for newer
iOS version" linker warnings at every app build.

Apps' ios/ directories are gitignored, so Expo apps get the target
via expo-build-properties in app.json (adding the dep where missing)
rather than editing generated files that would be overwritten on
next prebuild.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yarn hoists babel-preset-expo to the repo root while, by default, it
leaves expo-router inside per-app node_modules. babel-preset-expo
calls require.resolve('expo-router') from its own location to decide
whether to register its expo-router Babel plugin; when the two
packages are split across different node_modules folders the check
fails, process.env.EXPO_ROUTER_APP_ROOT is never replaced with a
literal, and Metro rejects require.context(process.env.X, ...) in
expo-router/_ctx.ios.js.

Declaring expo-router in the root devDependencies pins it alongside
babel-preset-expo. The root workspace doesn't actually consume
expo-router at runtime, so it legitimately doesn't provide the seven
peers expo-router advertises (expo, react, react-native, etc.) —
each app that does use expo-router declares them directly. The
scoped logFilters suppress only the YN0002 lines tied to the root
workspace's expo-router peers plus the YN0086 summary; unmet peer
warnings from any other workspace continue to surface.

Reverts the incidental breakage from #1083, which dropped the root
devDependency to silence those same warnings without realizing it
was load-bearing for Babel hoisting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@msluszniak msluszniak self-assigned this Apr 20, 2026
@msluszniak msluszniak added the chore PRs that are chores label Apr 20, 2026
@msluszniak msluszniak requested a review from qvpiotr April 20, 2026 12:09
msluszniak and others added 2 commits April 20, 2026 15:00
react-native-audio-api 0.8.4's common/cpp/audioapi/core/Constants.h
uses size_t without including <cstddef>. Recent libc++ headers
(Xcode 26.4+) no longer transitively pull it in, so the file fails
to compile. Upstream fix: software-mansion/react-native-audio-api#1032.

Applies the same one-line include via a Yarn patch so the app builds
on Xcode 26.4 without waiting for an upstream release. apps/speech
already uses 0.11.5, which carries the fix, so it's untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0.12.0 ships the upstream <cstddef> include fix (software-mansion/
react-native-audio-api#1032), so the Yarn patch against 0.8.4 is no
longer needed and is removed.

Adjusts apps/llm for the 0.11/0.12 API changes:
- drop react-native-audio-api/metro-config wrapper (subpath removed;
  it only collapsed internal stack frames for symbolication)
- AudioRecorder now takes no constructor args; recording params
  moved to onAudioReady(options, callback)
- iosOptions: 'allowBluetooth' was renamed to 'allowBluetoothHFP'

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@msluszniak msluszniak merged commit 61560ff into main Apr 20, 2026
4 of 6 checks passed
@msluszniak msluszniak deleted the fix/ios-deployment-target-17 branch April 20, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore PRs that are chores

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants