在Xcode构建完成flutter运行后,我遇到了如下错误。我不知道是什么原因,我想这是因为flutter 3.10.0升级。但不确定原因。请帮我指导。
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running Xcode build...
Xcode build done. 10.1s
ARC Semantic Issue (Xcode): No known class method for selector 'appleCredentialWithIDToken:rawNonce:fullName:'
/Users/paulinahernandez/.pub-cache/hosted/pub.dev/firebase_auth-4.6.0/ios/Classes/FLTFirebaseAuthPlugin.m:592:26
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.
podfile
# Uncomment this line to define a global platform for your project
platform :ios, '14.0'
$FirebaseSDKVersion = '10.3.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
#pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
#pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.3.0'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
pubspec.yaml
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.17.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
carousel_slider: ^4.1.1
extended_image: ^6.3.1
http: ^0.13.5
fluttertoast: ^8.0.9
shared_preferences: ^2.0.15
mvc_pattern: ^8.12.0
cloud_firestore: ^4.0.2
mobile_scanner: ^3.2.0
flutter_slider_drawer: ^2.1.1
pretty_qr_code: ^2.0.2
firebase_auth: ^4.1.0
google_sign_in: ^5.4.2
carousel_indicator: ^1.0.6
time_elapsed: ^0.2.6
url_launcher: ^6.1.6
firebase_dynamic_links: ^5.2.0
pull_to_refresh: ^2.0.0
custom_refresh_indicator: ^2.0.1
liquid_pull_to_refresh: ^3.0.1
audioplayers: ^3.0.1
firebase: ^9.0.3
photo_view: ^0.14.0
flutter_html: ^3.0.0-alpha.6
provider: ^6.0.4
flutter_widget_from_html: ^0.10.0
animated_check: ^1.0.5
google_translator: ^1.0.0
flutter_translate: ^4.0.3
cloud_functions: ^4.0.6
firebase_core: ^2.4.0
firebase_app_check: ^0.1.2+1
font_awesome_flutter: ^10.3.0
flutter_app_badger: ^1.5.0
firebase_messaging: ^14.2.1
badges: ^3.0.2
firebase_crashlytics: ^3.0.4
geolocator: ^8.2.0
geocoding: ^2.0.4
geoflutterfire2: ^2.3.14
socket_io_client: ^2.0.1
internet_file: ^1.2.0
pdfx: ^2.3.0
google_maps_flutter: ^2.2.6
dependency_overrides:
intl: 0.18.0
dev_dependencies:
flutter_test:
sdk: flutter
我尝试了很多方法,包括podfile更改和包升级,但它不能帮助我。
1条答案
按热度按时间ua4mk5z41#
我试着在Podfile中更改
然后运行
pod repo update
和pod update
,它对我有效,我也有同样的问题,希望它对你有帮助