#import
self.edependencyprovider = [rctappdependencyprovider new]; Потому что, согласно документам, мне не нужно мигрировать в Swift: вариант Objective-C ++, но я получил ошибку 'React/jscexecutorfactory.h' 'Файл, не найденный. Я попробовал несколько возможных решений, но оно еще не решено. < /P>
# require_relative '../node_modules/react-native/scripts/react_native_pods'
# require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-permissions/scripts/setup'
#Google Maps SDK for iOS requires iOS 13, so make sure that your deployment target is >= 13.4 in your iOS project settings.
#platform :ios, min_ios_version_supported #'13.4'
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios,'15.6'
prepare_react_native_project!
setup_permissions([
'AppTrackingTransparency',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
'Bluetooth',
'Camera'
])
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
# Use it to require both react-native's and this package's scripts:
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
# 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 } } } : {}),
# ```
# Changed this line with below line: flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
#flipper_config = FlipperConfiguration.disabled
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
flags = get_default_flags()
#
target 'CustomerFacingApp' do
#target 'CustomerFacingAppDevelopment' do
#use_frameworks!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
$RNFirebaseAnalyticsWithoutAdIdSupport = true
#use_modular_headers!
config = use_native_modules!
#$RNFirebaseAsStaticFramework = true
# Add the lines specifying :modular_headers => true for Firebase pods
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseInstallations', :modular_headers => true
pod 'GoogleDataTransport', :modular_headers => true
pod 'nanopb', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseCrashlytics', :modular_headers => true
pod 'FirebaseRemoteConfig', :modular_headers => true
pod 'FirebaseSessions', :modular_headers => true
pod 'FirebaseABTesting', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'FirebaseFirestoreInternal', :modular_headers => true
pod 'react-native-version-check', :path => '../node_modules/react-native-version-check'
pod 'RNScratch', :path => '../node_modules/react-native-scratch'
pod 'HyperCardScan', '2.2.3'
# React Native Maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
# Flags change depending on the env values.
use_react_native!(
:hermes_enabled => flags[:hermes_enabled],
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'CustomerFacingAppTests' do
inherit! :complete
# Pods for testing
end
target 'CustomerFacingAppDevelopment' do
inherit! :complete
end
target 'CustomerFacingAppStaging' do
inherit! :complete
end
target 'CustomerFacingAppQa' do
inherit! :complete
end
target 'CustomerFacingAppPreprod' do
inherit! :complete
end
target 'CustomerFacingAppUat' do
inherit! :complete
end
target 'CustomerFacingAppDevTemp' do
inherit! :complete
end
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('callstack-repack')
def pod.build_type
Pod::BuildType.static_library
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
)
puts "Post-install Patch is running..."
# Run your patching script and log its output
result = `sh ./CustomerFacingApp/patch_grpc_core.sh`
# Print the output of the script
puts "Output from patch_grpc_core.sh:"
puts result
# Optionally, check for errors
if $?.exitstatus != 0
puts "Error: The patching script failed with exit code #{$?.exitstatus}"
else
puts "Patch Script executed successfully."
end
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
framework_path = File.join(Dir.pwd, framework_relative_path)
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
puts "Stripping bitcode: #{command}"
system(command)
system("chmod -R u+w Pods/RCT-Folly")
Dir.glob("Pods/RCT-Folly/folly/Portability.h").each do |file|
text = File.read(file)
new_contents = text.gsub('#define FOLLY_HAS_COROUTINES 1', '#define FOLLY_HAS_COROUTINES 0')
File.open(file, "w") { |file| file.puts new_contents }
end
end
framework_paths = [
"Pods/LogRocket/LogRocket.xcframework/ios-arm64/LogRocket.framework/LogRocket",
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/Versions/Current/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/hermes.framework/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/hermes"
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
end
# __apply_Xcode_12_5_M1_post_install_workaround(installer)
fuse_path = "./Pods/HyperSDK/Fuse.rb"
clean_assets = false # Pass true to re-download all the assets
if File.exist?(fuse_path)
if system("ruby", fuse_path.to_s, clean_assets.to_s)
end
end
installer.pods_project.targets.each do |t|
if t.name.start_with?("AEP")
t.build_configurations.each do |bc|
bc.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -no-verify-emitted-module-interface'
end
end
t.build_configurations.each do |bc|
bc.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
end
end
end
# pod 'FirebaseCore'
# pod 'FirebaseCoreInternal'
end
< /code>
- Я обновил Podfile с включением Hermes и New Arch. < /li>
Попытался направить импорт RCTAppDependencyProvider в Podfile. Times
CD ios
rm -rf pods
rm podfile.lock
rm -rf ~ /библиотека /разработчик /xcode /dreviveddata /*
pod cache clean -all
install -ripo -update < /li>
Podfile
Подробнее здесь: https://stackoverflow.com/questions/797 ... rade-0-77x
Мобильная версия