mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-22 23:28:56 +03:00
92 lines
3.2 KiB
Ruby
92 lines
3.2 KiB
Ruby
# $RNFirebaseAsStaticFramework = true
|
|
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
|
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
|
|
|
# use_frameworks! :linkage => :static
|
|
platform :ios, '12.4'
|
|
install! 'cocoapods', :deterministic_uuids => false
|
|
|
|
|
|
target 'Ecency' do
|
|
config = use_native_modules!
|
|
|
|
# Flags change depending on the env values.
|
|
flags = get_default_flags()
|
|
|
|
permissions_path = '../node_modules/react-native-permissions/ios'
|
|
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
|
|
# Pods for Ecency
|
|
|
|
use_react_native!(
|
|
:path => config[:reactNativePath],
|
|
# 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.
|
|
:flipper_configuration => FlipperConfiguration.disabled,
|
|
# An absolute path to your application root.
|
|
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
)
|
|
|
|
target 'EcencyTests' do
|
|
inherit! :complete
|
|
# Pods for testing
|
|
end
|
|
|
|
# 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
|
|
|
|
|
|
post_install do |installer|
|
|
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
|
|
)
|
|
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
|
|
installer.pods_project.targets.each do |target|
|
|
|
|
#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
|
|
|
|
target.build_configurations.each do |config|
|
|
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
|
|
end
|
|
|
|
#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
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|