ecency-mobile/ios/Podfile

92 lines
3.2 KiB
Plaintext
Raw Normal View History

2022-11-14 17:05:19 +03:00
$RNFirebaseAsStaticFramework = true
2021-07-31 10:29:44 +03:00
require_relative '../node_modules/react-native/scripts/react_native_pods'
2019-09-11 22:42:49 +03:00
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
2022-11-14 17:05:19 +03:00
use_frameworks! :linkage => :static
2022-10-25 14:03:45 +03:00
platform :ios, '12.4'
2022-10-20 15:46:58 +03:00
install! 'cocoapods', :deterministic_uuids => false
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
2021-07-31 10:29:44 +03:00
config = use_native_modules!
2022-10-20 15:46:58 +03:00
# Flags change depending on the env values.
flags = get_default_flags()
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],
2022-10-20 15:46:58 +03: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 => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
2022-10-28 00:22:39 +03:00
:flipper_configuration => FlipperConfiguration.disabled,
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|
2022-10-20 15:46:58 +03:00
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
2022-10-17 11:56:16 +03:00
__apply_Xcode_12_5_M1_post_install_workaround(installer)
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"
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
end
2022-11-08 11:31:29 +03:00
2021-08-25 10:57:06 +03:00
end
end