Skip to content

Commit f3dd774

Browse files
peachbitsclaude
andcommitted
iOS: build and run under React Native 0.85 / Expo SDK 56 / Xcode 26
Expo autolinking + new-architecture Podfile (deployment target 16.4), the ExpoReactNativeFactory AppDelegate, and RCTNewArchEnabled in Info.plist. Includes the build fixes needed under Xcode 26. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7468768 commit f3dd774

5 files changed

Lines changed: 1281 additions & 1033 deletions

File tree

ios/Podfile

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ require_relative '../node_modules/react-native-permissions/scripts/setup'
1313
$RNFirebaseAnalyticsWithoutAdIdSupport = true
1414
$RNFirebaseAsStaticFramework = true
1515

16-
# The min_ios_version_supported is iOS 13.4 for RN 74:
17-
# However any device that can use iOS 13.4 can also upgrade to iOS 15.6 which
18-
# is still supported by the latest version of Xcode for debugging
19-
ios_platform_version = '15.6'
16+
# Expo SDK 56 / React Native 0.85 require a minimum deployment target of iOS 16.4.
17+
ios_platform_version = '16.4'
2018
platform :ios, ios_platform_version
2119
prepare_react_native_project!
2220

@@ -44,7 +42,25 @@ target 'edge' do
4442
Pod::UI.warn e
4543
end
4644
end
47-
config = use_native_modules!
45+
# Expo SDK 56 autolinking: feed expo's unified native-module config (which
46+
# registers ExpoModulesCore + expo modules + RN community modules) into
47+
# use_native_modules!.
48+
if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1'
49+
config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"]
50+
else
51+
config_command = [
52+
'node',
53+
'--no-warnings',
54+
'--eval',
55+
'require(\'expo/bin/autolinking\')',
56+
'expo-modules-autolinking',
57+
'react-native-config',
58+
'--json',
59+
'--platform',
60+
'ios'
61+
]
62+
end
63+
config = use_native_modules!(config_command)
4864

4965
use_react_native!(
5066
:path => config[:reactNativePath],
@@ -61,6 +77,20 @@ target 'edge' do
6177
target.build_configurations.each do |config|
6278
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_platform_version
6379

80+
# Allow non-modular includes (e.g. @react-native-firebase headers that
81+
# include <React/RCTConvert.h>) under use_frameworks! + Xcode 26's strict
82+
# explicit-modules scanning, which otherwise errors on RNFBApp.
83+
config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
84+
85+
# @react-native-firebase wrappers import React/Firebase headers
86+
# textually (#import, not @import). Under clang modules + use_frameworks
87+
# on Xcode 26 this fails ("RCTPromiseRejectBlock must be imported from
88+
# module RNFBApp.RNFBAppModule"). Build the RNFB pods without modules so
89+
# their textual imports resolve directly.
90+
if target.name.start_with?('RNFB')
91+
config.build_settings['CLANG_ENABLE_MODULES'] = 'NO'
92+
end
93+
6494
# Xcode 17+ / iOS 26 SDK workaround: Re-enable std::allocator<const T>
6595
# which was removed for stricter C++ standard compliance.
6696
# See: https://github.com/getsentry/sentry-cocoa/issues/5172

0 commit comments

Comments
 (0)