Skip to content

Commit

Permalink
[RNMobile] Upgrade React Native 0.71.11 - iOS changes (#51386)
Browse files Browse the repository at this point in the history
* refactor: Extract bundle version number to var

* refactor: Delete /.ruby-version, no longer needed

* refactor: Update /podfile to align w/RN updates

* refactor: Remove path names as part of RN upgrade

* Update `Podfile` with changes from RN upgrade helper

* Fix React Native path for `react_native_post_install` script

* Update Pods

* Add patch to fix Reanimated podspec

Without this patch, Reanimated tries to use Hermes version of React Native and produced a build failure. Seems there's an issue in the `podspec` file, as the JSC module is not being added.
Reference: software-mansion/react-native-reanimated#4254

* Update pods to reflect 0.71.11 target

* Apply changes to pods following `pod install`

* Update `Podfile.lock` file

---------

Co-authored-by: Siobhan <[email protected]>
  • Loading branch information
fluiddot and Siobhan authored Jun 30, 2023
1 parent 8f36b9a commit 305db7f
Show file tree
Hide file tree
Showing 8 changed files with 386 additions and 298 deletions.
1 change: 0 additions & 1 deletion packages/react-native-editor/ios/.ruby-version

This file was deleted.

1 change: 1 addition & 0 deletions packages/react-native-editor/ios/.xcode.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export NODE_BINARY=$(command -v node)
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,16 @@
"${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
"${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTAppDelegate/React_RCTAppDelegate.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTBlob/RCTBlob.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTImage/RCTImage.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTLinking/RCTLinking.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTNetwork/RCTNetwork.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework",
"${BUILT_PRODUCTS_DIR}/React-bridging/react_bridging.framework",
"${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsc/React_jsc.framework",
"${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework",
"${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework",
Expand Down Expand Up @@ -394,15 +395,16 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React_RCTAppDelegate.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTBlob.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTLinking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTNetwork.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_bridging.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React_jsc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework",
Expand Down Expand Up @@ -474,15 +476,16 @@
"${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
"${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTAppDelegate/React_RCTAppDelegate.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTBlob/RCTBlob.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTImage/RCTImage.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTLinking/RCTLinking.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTNetwork/RCTNetwork.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework",
"${BUILT_PRODUCTS_DIR}/React-bridging/react_bridging.framework",
"${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsc/React_jsc.framework",
"${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework",
"${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework",
Expand Down Expand Up @@ -522,15 +525,16 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React_RCTAppDelegate.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTBlob.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTLinking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTNetwork.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_bridging.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React_jsc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework",
Expand Down Expand Up @@ -635,6 +639,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(SDKROOT)/usr/lib/swift",
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
Expand Down Expand Up @@ -669,6 +674,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(SDKROOT)/usr/lib/swift",
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
Expand Down Expand Up @@ -710,7 +716,8 @@
INFOPLIST_FILE = GutenbergDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)";
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift$(PROJECT_DIR)";
MARKETING_VERSION = 1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -744,7 +751,8 @@
INFOPLIST_FILE = GutenbergDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)";
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift$(PROJECT_DIR)";
MARKETING_VERSION = 1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -764,7 +772,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -798,7 +806,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
};
Expand All @@ -808,7 +816,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand All @@ -835,7 +843,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-editor/ios/GutenbergDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
38 changes: 34 additions & 4 deletions packages/react-native-editor/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,25 @@ require_relative '../../../node_modules/@react-native-community/cli-platform-ios
# Uncomment the next line to define a global platform for your project
app_ios_deployment_target = Gem::Version.new('13.0')
platform :ios, app_ios_deployment_target.version
install! 'cocoapods', :deterministic_uuids => false
install! 'cocoapods', min_ios_version_supported
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end

target 'GutenbergDemo' do
# Comment the next line if you don't want to use dynamic frameworks
Expand All @@ -16,9 +34,16 @@ target 'GutenbergDemo' do

use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => false,
:fabric_enabled => false,
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to the application root
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
Expand All @@ -29,8 +54,13 @@ target 'GutenbergDemo' do
end

post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
react_native_post_install(
installer,
config[:reactNativePath],
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)

# Let Pods targets inherit deployment target from the app
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/4859
Expand Down
Loading

0 comments on commit 305db7f

Please sign in to comment.