2020-07-20 16:35:17 +00:00
|
|
|
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
2019-08-07 13:51:34 +00:00
|
|
|
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
2022-08-08 21:02:08 +00:00
|
|
|
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
|
|
|
|
|
2023-03-10 19:11:44 +00:00
|
|
|
platform :ios, 13.0
|
2023-04-03 16:10:12 +00:00
|
|
|
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 = FlipperConfiguration.disabled # 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
|
2019-06-21 16:39:20 +00:00
|
|
|
|
2020-07-20 16:35:17 +00:00
|
|
|
def all_pods
|
2021-10-01 20:35:13 +00:00
|
|
|
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true
|
|
|
|
pod 'simdjson', path: '../node_modules/@nozbe/simdjson'
|
2022-08-08 21:02:08 +00:00
|
|
|
$RNFirebaseAnalyticsWithoutAdIdSupport = true
|
2020-07-20 16:35:17 +00:00
|
|
|
config = use_native_modules!
|
2022-08-08 21:02:08 +00:00
|
|
|
|
|
|
|
use_expo_modules!
|
|
|
|
post_integrate do |installer|
|
|
|
|
begin
|
|
|
|
expo_patch_react_imports!(installer)
|
|
|
|
rescue => e
|
|
|
|
Pod::UI.warn e
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
flags = get_default_flags()
|
|
|
|
|
2021-07-21 15:50:39 +00:00
|
|
|
use_react_native!(
|
|
|
|
:path => config[:reactNativePath],
|
2023-03-10 19:11:44 +00:00
|
|
|
# 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 => true,
|
|
|
|
: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 => FlipperConfiguration.disabled,
|
|
|
|
# An absolute path to your application root.
|
2022-08-08 21:02:08 +00:00
|
|
|
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
2021-07-21 15:50:39 +00:00
|
|
|
)
|
2020-05-08 16:37:49 +00:00
|
|
|
end
|
|
|
|
|
2021-01-05 16:23:20 +00:00
|
|
|
abstract_target 'defaults' do
|
2020-11-03 14:18:15 +00:00
|
|
|
|
2020-07-20 16:35:17 +00:00
|
|
|
all_pods
|
2021-01-05 16:23:20 +00:00
|
|
|
|
|
|
|
target 'RocketChatRN' # Experimental app
|
|
|
|
target 'Rocket.Chat' # Official app
|
2021-08-20 19:54:59 +00:00
|
|
|
target 'ShareRocketChatRN'
|
|
|
|
target 'NotificationService'
|
2020-08-19 17:14:22 +00:00
|
|
|
end
|
|
|
|
|
2018-07-26 14:23:06 +00:00
|
|
|
post_install do |installer|
|
2023-03-10 19:11:44 +00:00
|
|
|
react_native_post_install(
|
|
|
|
installer,
|
|
|
|
# Set `mac_catalyst_enabled` to `true` in order to apply patches
|
|
|
|
# necessary for Mac Catalyst builds
|
2023-03-21 17:05:00 +00:00
|
|
|
:mac_catalyst_enabled => false
|
2023-03-10 19:11:44 +00:00
|
|
|
)
|
|
|
|
# __apply_Xcode_12_5_M1_post_install_workaround(installer) # TODO: is this needed?
|
2022-08-08 21:02:08 +00:00
|
|
|
|
2018-07-26 14:23:06 +00:00
|
|
|
installer.pods_project.targets.each do |target|
|
2019-08-07 13:51:34 +00:00
|
|
|
target.build_configurations.each do |config|
|
|
|
|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
|
2023-01-20 16:55:53 +00:00
|
|
|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
|
|
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
|
|
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
2023-03-10 19:11:44 +00:00
|
|
|
# case target.name
|
|
|
|
# when 'RCT-Folly'
|
|
|
|
# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
|
|
|
|
# else
|
|
|
|
# config.build_settings.delete('IPHONEOS_DEPLOYMENT_TARGET')
|
|
|
|
# end
|
2018-07-26 14:23:06 +00:00
|
|
|
end
|
|
|
|
end
|
2021-07-28 20:36:06 +00:00
|
|
|
end
|