Когда я создаю свое приложение Flutter в режиме отладки, оно работает нормально, и я могу использовать свое приложение в любом эмуляторе без проблем. Но когда я нажимаю кнопку «Редактировать схему» и пытаюсь запустить ее в режиме выпуска, сборка завершается с ошибкой, и я получаю, что модуль cloud_firestore не найден.
Причина, по которой я пытаюсь выполнить сборку для режима выпуска, заключается в том, что когда Я отправил свое приложение в магазин приложений, но оно было отклонено почти сразу по причине сбоя при запуске приложения.
Информация, которую вы должны знать:
Версия для Mac:

Приложение отлично работает в режиме отладки
Версия XCode: v14.2
Flutter Doctor: ошибок нет
Версия Cocoapods: 1.15.2
Версия Flutter: 3.19.5 (Стабильная версия)
Версия Dart: 3.3.3
Содержимое подфайла:
Код: Выделить всё
platform :ios, '12.0'
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!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Код: Выделить всё
name: lifenavigator
version: 1.0.0+1
publish_to: none
description: A new Flutter project.
environment:
sdk: '>=3.2.3
Подробнее здесь: [url]https://stackoverflow.com/questions/78252481/module-not-found-when-building-flutter-app-for-ios[/url]
Мобильная версия