Skip to content

Commit 669bf5b

Browse files
fix(mobile): track-player RN 0.79 compat + fmt consteval for Xcode 26 (#14397)
## Summary #14396 unblocked the runner + hermesc issues. The binary build matrix now actually compiles and surfaces two real upstream-library incompatibilities with React Native 0.79 + Xcode 26 in [run 26320122339](https://github.com/AudiusProject/apps/actions/runs/26320122339). ### 1. Android RC + Prod — \`react-native-track-player@4.0.1\` is incompatible with RN 0.79 Kotlin compile error at \`react-native-track-player\` against the updated \`HeadlessJsTaskService\` in RN 0.79: \`\`\` e: file://.../react-native-track-player/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt:764:5 'onBind' overrides nothing. \`\`\` RN 0.79's [\`HeadlessJsTaskService.kt:58\`](https://github.com/facebook/react-native/blob/0.79-stable/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt#L58) now declares: \`\`\`kotlin override fun onBind(intent: Intent): IBinder? = null \`\`\` but \`react-native-track-player@4.0.1\` still has the pre-0.79 signature: \`\`\`kotlin override fun onBind(intent: Intent?): IBinder \`\`\` Kotlin allows covariant return types but not contravariant parameter types — \`Intent?\` ≠ \`Intent\` for override matching, so the compiler errors. \`react-native-track-player@4.1.2\` already matches RN 0.79's signature, so bumping the dep is the fix. - \`packages/mobile/package.json\`: \`4.0.1\` → \`4.1.2\` - \`package-lock.json\` regenerated to match. ### 2. iOS RC + Prod — \`fmt 11.0.2\` consteval fails under Xcode 26 / Apple Clang xcodebuild archive failed compiling the \`fmt\` Pod: \`\`\` Pods/fmt/include/fmt/format-inl.h:59: error: call to consteval function 'fmt::basic_format_string<...>' is not a constant expression 59 | fmt::format_to(it, FMT_STRING("{}{}"), message, SEP); \`\`\` RN 0.79 pins fmt 11.0.2 via [\`third-party-podspecs/fmt.podspec\`](https://github.com/facebook/react-native/blob/0.79-stable/packages/react-native/third-party-podspecs/fmt.podspec). Apple Clang in Xcode 26 enforces stricter \`consteval\` evaluation than 11.0.2 was written against. Fixed upstream in fmt 11.1+ (RN 0.80 picks up the newer fmt); for 0.79 the standard workaround is \`-DFMT_USE_CONSTEVAL=0\`, which falls back to the constexpr implementation. Add a Podfile post_install hook that injects \`FMT_USE_CONSTEVAL=0\` into \`GCC_PREPROCESSOR_DEFINITIONS\` for the \`fmt\` target only. CI's existing \`bundle exec pod install\` step picks up the change with no lockfile churn. ### Re-trigger the release flow - \`packages/mobile/package.json\`: \`1.5.183\` → \`1.5.184\` - iOS \`Info.plist\` \`CFBundleShortVersionString\`: \`1.1.196\` → \`1.1.197\` - Android \`versionName\`: \`1.1.532\` → \`1.1.533\` ## Test plan - [ ] Merge → version-check fires all 4 binary jobs - [ ] Android RC + Prod pass Kotlin compile and reach \`fastlane releaseCandidate\` / \`prod\` (no \`onBind overrides nothing\`) - [ ] iOS RC + Prod compile \`fmt\` cleanly under Xcode 26 (no \`consteval\` error) and reach \`pilot\` - [ ] Slack notifications fire on success 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1219e2a commit 669bf5b

5 files changed

Lines changed: 45 additions & 26 deletions

File tree

package-lock.json

Lines changed: 25 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mobile/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ android {
134134
// versionCode is automatically incremented in CI
135135
versionCode 1
136136
// Make sure this is above the currently released Android version in the play store if your changes touch native code:
137-
versionName "1.1.532"
137+
versionName "1.1.533"
138138
resValue "string", "build_config_package", "co.audius.app"
139139
resConfigs "en"
140140
}

packages/mobile/ios/AudiusReactNative/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.1.196</string>
20+
<string>1.1.197</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>

packages/mobile/ios/Podfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ target 'AudiusReactNative' do
9797
end
9898
end
9999

100+
# Xcode 26 / Apple Clang enforces stricter consteval evaluation, which
101+
# breaks the fmt 11.0.2 that React Native 0.79 pins:
102+
# Pods/fmt/include/fmt/format-inl.h:59: error: call to consteval
103+
# function 'fmt::basic_format_string<...>' is not a constant expression
104+
# FMT_USE_CONSTEVAL=0 forces the constexpr fallback. Fixed upstream in
105+
# fmt 11.1+ / RN 0.80; this is a stopgap until we upgrade RN.
106+
installer.pods_project.targets.each do |target|
107+
next unless target.name == 'fmt'
108+
target.build_configurations.each do |config|
109+
defs = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] || ['$(inherited)']
110+
defs = [defs] unless defs.is_a?(Array)
111+
defs << 'FMT_USE_CONSTEVAL=0' unless defs.include?('FMT_USE_CONSTEVAL=0')
112+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = defs
113+
end
114+
end
115+
100116
end
101117
end
102118

packages/mobile/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@audius/mobile",
3-
"version": "1.5.183",
3+
"version": "1.5.184",
44
"private": true,
55
"scripts": {
66
"android:dev": "ENVFILE=.env.dev turbo run android -- --mode=prodDebug",
@@ -149,7 +149,7 @@
149149
"react-native-svg": "^15.11.2",
150150
"react-native-svg-transformer": "1.5.0",
151151
"react-native-tab-view": "4.2.0",
152-
"react-native-track-player": "4.0.1",
152+
"react-native-track-player": "4.1.2",
153153
"react-native-url-polyfill": "2.0.0",
154154
"react-native-version-number": "0.3.6",
155155
"react-native-video": "6.18.0",

0 commit comments

Comments
 (0)