Closed junjie-zeng closed 3 months ago
Podfile里把ios目标版本从11改到12
Podfile 中ios为12.4
require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :ios, '12.4' install! 'cocoapods', :deterministic_uuids => false
production = ENV["PRODUCTION"] == "1"
if ENV['CI'] pod 'OpenSSL-Universal' end pod 'SDWebImageWebPCoder'
target 'appTemplate' do config = use_native_modules!
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath], :hermes_enabled => true, :fabric_enabled => flags[:fabric_enabled], :flipper_configuration => ENV['CI'] ? FlipperConfiguration.disabled : FlipperConfiguration.enabled, :app_path => "#{Pod::Config.instance.installation_root}/.." )
target 'appTemplateTests' do inherit! :complete end
post_install do |installer| react_native_post_install( installer, :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) 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|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] < '12.4'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
end
end
end
end
end end
在xcode里运行看下报错吧
👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
npx react-native info输出日志:
warn Package react-native-amap3d contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this. info Fetching system and libraries information... System: OS: macOS 14.4.1 CPU: (8) arm64 Apple M3 Memory: 94.64 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node Yarn: 1.22.21 - ~/.nvm/versions/node/v18.19.0/bin/yarn npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm Watchman: 2024.04.22.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.15.0 - /Users/mmt/.gem/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: Not Found IDEs: Android Studio: 2023.1 AI-231.9392.1.2311.11330709 Xcode: 15.3/15E204a - /usr/bin/xcodebuild Languages: Java: 11.0.22 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
命令行输入 yarn ios:
/Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'Flipper-PeerTalk' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'react-native-netinfo' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'RNBootSplash' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'react-native-safe-area-context' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'AMapFoundation' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'MMKVCore' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'SDWebImageWebPCoder' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'react-native-webview' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'RNSVG' from project 'Pods') /Users/Mob-APP/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.4.99. (in target 'RCT-Folly' from project 'Pods')
--- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:CBCC0851-481F-444D-AEFC-0BEF1BC5132A, OS:17.4, name:iPhone_15 } { platform:iOS Simulator, id:CBCC0851-481F-444D-AEFC-0BEF1BC5132A, OS:17.4, name:iPhone_15 } BUILD FAILED
info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
截图: