ecency-mobile/ios/Podfile

129 lines
4.3 KiB
Plaintext
Raw Normal View History

2024-03-06 11:40:45 +03:00
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# $RNFirebaseAsStaticFramework = true
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, 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
2021-07-31 10:29:44 +03:00
2022-11-14 17:05:19 +03:00
2020-07-17 14:22:06 +03:00
target 'Ecency' do
2024-03-06 11:40:45 +03:00
use_expo_modules!
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
2021-07-31 10:29:44 +03:00
config = use_native_modules!
2022-10-20 15:46:58 +03:00
2022-02-25 07:55:27 +03:00
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
2020-07-17 14:22:06 +03:00
# Pods for Ecency
2021-07-31 11:32:42 +03:00
2022-10-17 11:56:16 +03:00
use_react_native!(
:path => config[:reactNativePath],
2024-02-20 16:58:05 +03:00
2022-10-20 15:46:58 +03:00
# 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,
2022-10-20 15:46:58 +03:00
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
2022-10-17 11:56:16 +03:00
)
2019-12-17 05:26:06 +03:00
2020-07-17 14:22:06 +03:00
target 'EcencyTests' do
2021-07-29 13:40:20 +03:00
inherit! :complete
# Pods for testing
end
2021-07-30 11:21:48 +03:00
2022-11-14 17:05:40 +03:00
# Convert all permission pods into static libraries
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
def pod.build_type;
# Uncomment the line corresponding to your CocoaPods version
Pod::BuildType.static_library # >= 1.9
# Pod::Target::BuildType.static_library # < 1.9
end
end
end
end
2022-10-17 11:56:16 +03:00
2021-08-25 10:57:06 +03:00
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
2022-10-20 15:46:58 +03:00
react_native_post_install(
installer,
config[:reactNativePath],
2022-10-20 15:46:58 +03:00
:mac_catalyst_enabled => false
)
2024-02-20 16:58:05 +03:00
2022-11-08 11:31:29 +03:00
2021-08-25 10:57:06 +03:00
installer.pods_project.targets.each do |target|
2022-11-08 11:31:29 +03:00
#workarounf for xcode 14 archive signing issue
#ref:https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1201464693
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
2021-08-25 10:57:06 +03:00
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
2024-01-16 12:42:40 +03:00
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
2021-08-25 10:57:06 +03:00
end
2022-11-08 11:31:29 +03:00
#this workaround resolves duplicate symbolds caused by GCDAsyncSocket inclusion in TcpSockets
if target.name == 'TcpSockets'
source_files = target.source_build_phase.files
gcd_async_socket = source_files[0] #First file in build phases is GCDAsyncSocket.m, chage index if not the case
puts "Deleting source file #{gcd_async_socket.inspect} from target #{target.inspect}."
source_files.delete gcd_async_socket
2022-11-08 11:31:29 +03:00
end
#workaround for resolving React-Codegen build failure on Xcode 14.3 (iOS 16.4) simulators - 'value' is unavailable
if target.name == 'React-Codegen'
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
2022-11-08 11:31:29 +03:00
2021-08-25 10:57:06 +03:00
end
end
2023-10-10 12:02:27 +03:00
target 'ImageNotifi' do
pod 'Firebase/Messaging'
2023-10-10 12:02:27 +03:00
end