Closed pamir72 closed 2 years ago
Проблему решил. Возможно кому-то будет полезно.
В моем случае помогла строка в начале Podfile: ENV['SWIFT_VERSION'] = '5.0'
внизу вернул код по умолчанию: _post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_buildsettings(target) end end
Добрый день ! Получаю ошибку при компиляции для iOS на yandex_mapkit 2.0.3
Error running pod install Error launching application on iPhone 13.
Знаю, что такая уже ветка есть и там проблема вроде бы решена. Делал как там, но не помогло.
Podfile:
platform :ios, '10.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)) end
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['SWIFT_VERSION'] = '4.0' end end end
_Пробовал config.build_settings['SWIFTVERSION'] = '5.0'. Результат тот же
flutter doctor -v
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.2.1 21D62 darwin-x64, locale ru-RU) • Flutter version 2.10.4 at ... • Upstream repository https://github.com/flutter/flutter.git • Framework revision c860cba910 (13 days ago), 2022-03-25 00:23:12 -0500 • Engine revision 57d3bac3dd • Dart version 2.16.2 • DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at ... • Platform android-31, build-tools 31.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[✓] VS Code (version 1.65.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available) • iPhone 13 (mobile) • D9A95925-CF50-47EE-8B74-14D3795990FE • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.75
[✓] HTTP Host Availability • All required HTTP hosts are available
• No issues found!