2024-04-22 16:01:45 +00:00
|
|
|
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')
|
2023-12-11 15:52:23 +00:00
|
|
|
|
|
|
|
platform :ios, min_ios_version_supported
|
|
|
|
prepare_react_native_project!
|
|
|
|
|
2024-04-22 16:01:45 +00:00
|
|
|
setup_permissions([
|
|
|
|
'Camera',
|
|
|
|
'FaceID',
|
|
|
|
'MediaLibrary',
|
|
|
|
'Microphone',
|
|
|
|
'Notifications',
|
|
|
|
'PhotoLibrary',
|
|
|
|
'PhotoLibraryAddOnly',
|
|
|
|
])
|
|
|
|
|
2023-12-11 15:52:23 +00:00
|
|
|
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
|
2023-06-14 01:47:41 +00:00
|
|
|
|
2023-10-17 18:05:58 +00:00
|
|
|
# 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
|
|
|
|
|
2020-06-24 15:54:28 +00:00
|
|
|
abstract_target 'Status' do
|
2020-05-01 07:20:06 +00:00
|
|
|
# Pods for StatusQuo
|
2021-01-07 12:59:57 +00:00
|
|
|
config = use_native_modules!
|
2017-12-30 04:35:25 +00:00
|
|
|
|
2023-06-14 01:47:41 +00:00
|
|
|
# Flags change depending on the env values.
|
|
|
|
flags = get_default_flags()
|
|
|
|
|
|
|
|
use_react_native!(
|
|
|
|
:path => config[:reactNativePath],
|
|
|
|
:fabric_enabled => flags[:fabric_enabled],
|
2024-04-30 08:38:41 +00:00
|
|
|
:hermes_enabled => true,
|
2023-06-14 01:47:41 +00:00
|
|
|
# An absolute path to your application root.
|
|
|
|
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
|
|
)
|
2019-08-29 10:47:39 +00:00
|
|
|
|
2019-08-06 16:16:51 +00:00
|
|
|
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
|
2021-01-19 09:00:39 +00:00
|
|
|
pod 'react-native-config', :path => '../node_modules/react-native-config'
|
|
|
|
|
2022-07-04 10:08:16 +00:00
|
|
|
pod 'SSZipArchive', '2.4.3'
|
2024-12-04 13:35:43 +00:00
|
|
|
# to fix [!] CocoaPods could not find compatible versions for pod "CryptoSwift"
|
|
|
|
pod 'CryptoSwift', git: "https://github.com/krzyzanowskim/CryptoSwift", tag: '1.8.0'
|
2020-11-25 09:30:00 +00:00
|
|
|
pod "react-native-status-keycard", path: "../node_modules/react-native-status-keycard"
|
2021-03-29 16:23:40 +00:00
|
|
|
pod "react-native-status", path: "../modules/react-native-status"
|
2024-12-03 13:32:37 +00:00
|
|
|
pod "Keycard", git: "https://github.com/status-im/Keycard.swift.git", tag: '3.1.1'
|
2020-11-25 09:30:00 +00:00
|
|
|
pod 'secp256k1', git: "https://github.com/status-im/secp256k1.swift.git", submodules: true
|
|
|
|
|
2020-06-24 15:54:28 +00:00
|
|
|
target 'StatusIm' do
|
2021-08-30 22:51:19 +00:00
|
|
|
|
2020-06-24 15:54:28 +00:00
|
|
|
target 'StatusImTests' do
|
|
|
|
inherit! :complete
|
|
|
|
# Pods for testing
|
|
|
|
end
|
|
|
|
end
|
2020-11-25 09:30:00 +00:00
|
|
|
|
2020-06-24 15:54:28 +00:00
|
|
|
target 'StatusImPR' do
|
|
|
|
end
|
2020-11-25 09:30:00 +00:00
|
|
|
|
2023-03-22 13:13:51 +00:00
|
|
|
post_install do |installer|
|
2024-03-22 14:21:44 +00:00
|
|
|
# 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,
|
|
|
|
)
|
2023-03-22 13:13:51 +00:00
|
|
|
# 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
|
2023-10-24 08:48:36 +00:00
|
|
|
# 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
|
2023-03-22 13:13:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-08-06 16:16:51 +00:00
|
|
|
use_native_modules!
|
2020-11-25 09:30:00 +00:00
|
|
|
end
|