Created
June 19, 2024 01:11
-
-
Save thanhdevapp/0cd09fb1d86caa30d8cb9dd54c36b284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bên mình build IOS thì gặp lỗi sau: | |
dyld[1887]: Symbol not found: _$s9Alamofire11RetryResultO05doNotB0yA2CmFWC | |
Referenced from: <A9C2D6D3-D89A-33FD-90DB-FCDDC4FD4122> /private/var/containers/Bundle/Application/CBB8B2A4-10D2-4D1D-BBB5-2C1F3D3DD3D3/maxQ.app/Frameworks/PVCBeKYC.framework/PVCBeKYC | |
Expected in: <0FBD319F-3398-30E7-B4EF-08CFF7CE53B4> /private/var/containers/Bundle/Application/CBB8B2A4-10D2-4D1D-BBB5-2C1F3D3DD3D3/maxQ.app/Frameworks/Alamofire.framework/Alamofire | |
Message from debugger: killed | |
Thông tin môi trường: | |
System: | |
OS: macOS 14.4 | |
CPU: (8) arm64 Apple M1 | |
Memory: 220.81 MB / 16.00 GB | |
Shell: 5.9 - /bin/zsh | |
Binaries: | |
Node: 18.19.1 - /opt/homebrew/opt/node@18/bin/node | |
Yarn: 1.22.19 - /opt/homebrew/bin/yarn | |
npm: 10.2.4 - /opt/homebrew/opt/node@18/bin/npm | |
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman | |
Managers: | |
CocoaPods: 1.15.2 - /Users/thanhngo/.rvm/gems/ruby-2.7.5/bin/pod | |
SDKs: | |
iOS SDK: | |
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4 | |
Android SDK: | |
API Levels: 25, 28, 29, 30, 31, 32, 33, 34 | |
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1, 34.0.0 | |
System Images: android-33 | Google APIs ARM 64 v8a | |
Android NDK: Not Found | |
IDEs: | |
Android Studio: Not Found | |
Xcode: 15.3/15E204a - /usr/bin/xcodebuild | |
Thông tin file pod | |
require_relative '../node_modules/react-native/scripts/react_native_pods' | |
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | |
platform :ios, '12.4' | |
install! 'cocoapods', :deterministic_uuids => false | |
target 'maxQ' do | |
config = use_native_modules! | |
# Flags change depending on the env values. | |
# flags = get_default_flags() | |
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 => true, | |
# Enables Flipper. | |
# | |
# Note that if you have use_frameworks! enabled, Flipper will not work and | |
# you should disable the next line. | |
# :flipper_configuration => FlipperConfiguration.enabled(["Debug"], { 'Flipper' => '0.159.0' }), | |
# An absolute path to your application root. | |
:app_path => "#{Pod::Config.instance.installation_root}/.." | |
) | |
permissions_path = '../node_modules/react-native-permissions/ios' | |
# pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency" | |
# pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral" | |
# pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars" | |
pod 'Permission-Camera', :path => "#{permissions_path}/Camera" | |
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts" | |
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID" | |
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy" | |
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways" | |
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse" | |
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary" | |
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone" | |
pod 'Permission-Motion', :path => "#{permissions_path}/Motion" | |
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications" | |
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary" | |
pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly" | |
pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders" | |
pod 'Permission-Siri', :path => "#{permissions_path}/Siri" | |
pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition" | |
pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit" | |
pod 'Firebase', :modular_headers => true | |
pod 'FirebaseCore', :modular_headers => true | |
pod 'FirebaseCoreInternal', :modular_headers => true | |
# pod 'FirebaseStorageInternal', :modular_headers => true | |
pod 'FirebaseCoreExtension', :modular_headers => true | |
pod 'FirebaseAppCheckInterop', :modular_headers => true | |
pod 'FirebaseAuthInterop', :modular_headers => true | |
pod 'FirebaseMessagingInterop', :modular_headers => true | |
pod 'GTMSessionFetcher', :modular_headers => true | |
pod 'FirebaseAppCheckInterop', :modular_headers => true | |
pod 'FirebaseAuthInterop', :modular_headers => true | |
pod 'GoogleUtilities', :modular_headers => true | |
pod 'MLKitVision' , :podspec => 'MLKitVision.podspec.json' , :modular_headers => true | |
pod 'MLKitCommon' , :podspec => 'MLKitCommon.podspec.json' , :modular_headers => true | |
# Yêu cầu bổ sung đoạn mã sau vào Podfile | |
dynamic_frameworks = ['Alamofire', 'CryptoSwift', 'SnapKit', 'lottie-ios', 'KeychainSwift', 'ObjectMapper'] | |
pre_install do |installer| | |
installer.pod_targets.each do |pod| | |
if dynamic_frameworks.include?(pod.name) | |
puts "Overriding the build_type to dynamic_framework for #{pod.name}" | |
def pod.build_type; | |
Pod::BuildType.dynamic_framework | |
end | |
end | |
end | |
end | |
# Enables Flipper. | |
# | |
# Note that if you have use_frameworks! enabled, Flipper will not work and | |
# you should disable these next few lines. | |
post_install do |installer| | |
# Apple Silicon builds require a library path tweak for Swift library discovery or "symbol not found" for swift things | |
installer.aggregate_targets.each do |aggregate_target| | |
aggregate_target.user_project.native_targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)'] | |
end | |
end | |
aggregate_target.user_project.save | |
end | |
# Flipper requires a crude patch to bump up iOS deployment target, or "error: thread-local storage is not supported for the current target" | |
# I'm not aware of any other way to fix this one other than bumping iOS deployment target to match react-native (iOS 11 now) | |
installer.pods_project.targets.each do |target| | |
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['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' | |
end | |
end | |
# Build Active Architecture Only "NO" (react-native-maps) | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO" | |
end | |
end | |
installer.pods_project.build_configurations.each do |config| | |
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" | |
end | |
react_native_post_install(installer) | |
__apply_Xcode_12_5_M1_post_install_workaround(installer) | |
installer.pods_project.targets.each do |target| | |
if ['Alamofire', 'CryptoSwift', 'SnapKit', 'lottie-ios', 'KeychainSwift', 'ObjectMapper'].include? "#{target}" | |
target.build_configurations.each do |config| | |
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' | |
# Xcode 14 supports only iOS >= 11.0. | |
deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] | |
if !deployment_target.nil? && !deployment_target.empty? && deployment_target.to_f < 12.0 | |
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment