mirror of
https://github.com/status-im/status-react.git
synced 2025-02-21 15:18:41 +00:00
This commit upgrades `react-native` to `v0.75.3` Following changes were also made : - `NDK` upgraded to `26.1.10909125` - `@react-native/gradle-plugin` is set up using `includeBuild` gradle mechanism which is a better way. - `reactjs` is upgraded to `18.3.1` - `react-native-config` is upgraded to `1.5.3` - `react-native-navigation` is upgraded to `7.40.1` - `react-native-reanimated` is upgraded to `3.16.6` - `react-native-gesture-handler` is upgraded to `2.22.0` - `react-native-keychain` is upgraded to `9.2.2` - patches for react-native-navigation are updated. PR in RNN repo -> https://github.com/wix/react-native-navigation/pull/7913 - patched autolinking behaviour in `react-native` to prevent generating `autolinking.json` in a gradle step. We run gradle in a sandbox with `--offline` so this is not feasible for us. We do the same thing via a nix phase called `autolinkPhase`. - `AGP` is bumped to `8.5.0` and `aapt2` is bumped to `8.5.0-11315950` - we no longer need to patch out `-X` from `script_phases-patched.sh` - `gradle` deps were updated. - `pods` were updated. - `gems` were updated.
106 lines
3.3 KiB
Ruby
106 lines
3.3 KiB
Ruby
def node_require(script)
|
|
# Resolve script with node to allow for hoisting
|
|
require Pod::Executable.execute_command('node', ['-p',
|
|
"require.resolve(
|
|
'#{script}',
|
|
{paths: [process.argv[1]]},
|
|
)", __dir__]).strip
|
|
end
|
|
|
|
node_require('react-native/scripts/react_native_pods.rb')
|
|
node_require('react-native-permissions/scripts/setup.rb')
|
|
|
|
platform :ios, min_ios_version_supported
|
|
prepare_react_native_project!
|
|
|
|
setup_permissions([
|
|
'Camera',
|
|
'FaceID',
|
|
'MediaLibrary',
|
|
'Microphone',
|
|
'Notifications',
|
|
'PhotoLibrary',
|
|
'PhotoLibraryAddOnly',
|
|
])
|
|
|
|
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
|
|
|
|
# If inside a Nix shell, allow pod install
|
|
inside_nix_shell = ENV['IN_NIX_SHELL']
|
|
allow_pod_install = !inside_nix_shell.nil?
|
|
|
|
unless allow_pod_install
|
|
puts "ERROR: 'pod install' must be run inside a Nix shell. Please ensure you're inside a nix shell and try again."
|
|
exit 1
|
|
end
|
|
|
|
abstract_target 'Status' do
|
|
# Pods for StatusQuo
|
|
config = use_native_modules!
|
|
|
|
# Flags change depending on the env values.
|
|
flags = get_default_flags()
|
|
|
|
use_react_native!(
|
|
:path => config[:reactNativePath],
|
|
:fabric_enabled => flags[:fabric_enabled],
|
|
:hermes_enabled => true,
|
|
# An absolute path to your application root.
|
|
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
)
|
|
|
|
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
|
|
pod 'react-native-config', :path => '../node_modules/react-native-config'
|
|
|
|
pod 'SSZipArchive', '2.4.3'
|
|
# to fix [!] CocoaPods could not find compatible versions for pod "CryptoSwift"
|
|
pod 'CryptoSwift', git: "https://github.com/krzyzanowskim/CryptoSwift", tag: '1.8.0'
|
|
pod 'TOCropViewController', git: "https://github.com/TimOliver/TOCropViewController", tag: '2.7.4'
|
|
pod "react-native-status-keycard", path: "../node_modules/react-native-status-keycard"
|
|
pod "react-native-status", path: "../modules/react-native-status"
|
|
pod "Keycard", git: "https://github.com/status-im/Keycard.swift.git", tag: '3.1.1'
|
|
pod 'secp256k1', git: "https://github.com/status-im/secp256k1.swift.git", submodules: true
|
|
|
|
target 'StatusIm' do
|
|
|
|
target 'StatusImTests' do
|
|
inherit! :complete
|
|
# Pods for testing
|
|
end
|
|
end
|
|
|
|
target 'StatusImPR' do
|
|
end
|
|
|
|
post_install do |installer|
|
|
# as per react-native 0.73.2 template
|
|
# https://github.com/facebook/react-native/blob/c5c0563f209ead8f884204763e02115bd66d1960/packages/react-native/template/ios/Podfile#L49-L52
|
|
react_native_post_install(
|
|
installer,
|
|
config[:reactNativePath],
|
|
:mac_catalyst_enabled => false,
|
|
# :ccache_enabled => true
|
|
)
|
|
# some of libs wouldn't be build for x86_64 otherwise and that is
|
|
# necessary for ios simulators
|
|
installer.pods_project.targets.each do |target|
|
|
target.build_configurations.each do |config|
|
|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
|
|
end
|
|
# We need to remove the predefinition of IPHONEOS_DEPLOYMENT_TARGET from RNCK lib to use our own.
|
|
case target.name
|
|
when 'ReactNativeCameraKit'
|
|
target.build_configurations.each do |config|
|
|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
use_native_modules!
|
|
end
|