camera_avfoundation not found while build an app on xcode


I've tried to do like create a new project, reinstall podfile and still not works

[!] Flutter (Channel [user-branch], 3.44.9, on Microsoft Windows [Version 10.0.26200.9445], locale en-ID) [484ms]

! Flutter version 3.44.9 on channel \[user-branch\] at C:\\src\\flutter

  Currently on an unknown channel. Run \`flutter channel\` to switch to an official channel.

  If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.

! Upstream repository unknown source is not a standard remote.

  Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.

• Framework revision 6b182d2c75 (8 weeks ago), 2026-08-05 10:04:07 -0700

• Engine revision 5a2a6a42cc

• Dart version 3.12.2

• DevTools version 2.57.0

• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file,

  enable-lldb-debugging, enable-uiscene-migration, enable-riscv64

• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[√] Windows Version (Windows 11 or higher, 25H2, 2009) [825ms]

[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [2.2s]

• Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)

• Platform android-36, build-tools 36.1.0

• Java binary at: C:\\Program Files\\Java\\jdk-17\\bin\\java

  This JDK is specified in your Flutter configuration.

  To change the current JDK, run: \`flutter config --jdk-dir="path/to/jdk"\`.

• Java version Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)

! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[√] Chrome - develop for the web [141ms]

• Chrome at C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.4.3) [139ms]

• Visual Studio at C:\\Program Files\\Microsoft Visual Studio\\18\\Community

• Visual Studio Community 2026 version 18.4.11626.88

• Windows 10 SDK version 10.0.26100.0

[√] Connected device (4 available) [313ms]

• SM S938U (mobile) • emulator-5554 • android-x64    • Android 12 (API 32)

• Windows (desktop) • windows       • windows-x64    • Microsoft Windows \[Version 10.0.26200.9445\]

• Chrome (web)      • chrome        • web-javascript • Google Chrome 154.0.8037.59

• Edge (web)        • edge          • web-javascript • Microsoft Edge 153.0.4234.48

[√] Network resources [486ms]

• All expected network resources are available.

! Doctor found issues in 2 categories.

podfile

platform :ios, '15.5'

# 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! :linkage => :static
  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)
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '5.0'
      config.build_settings['SWIFT_STRICT_CONCURRENCY'] = 'minimal'
      config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
      config.build_settings['SWIFT_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5'
      config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
      config.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
      config.build_settings['DEFINES_MODULE'] = 'YES'

      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',
        'PERMISSION_CAMERA=1',
        'PERMISSION_PHOTOS=1',
        'PERMISSION_LOCATION=1',
        'PERMISSION_NOTIFICATIONS=1',
        'PERMISSION_MICROPHONE=0',
        'PERMISSION_BLUETOOTH=0',
        'PERMISSION_CONTACTS=0',
        'PERMISSION_EVENTS=0',
        'PERMISSION_REMINDERS=0',
        'PERMISSION_SPEECH_RECOGNIZER=0',
        'PERMISSION_MEDIA_LIBRARY=0',
        'PERMISSION_SENSORS=0',
        'PERMISSION_APP_TRACKING_TRANSPARENCY=0',
      ]
    end
  end
end

pubspec.yaml

  cupertino_icons: ^1.0.8
  collection: ^1.18.0
  google_fonts: ^8.1.0
  table_calendar: ^3.1.2
  lucide_icons_flutter: ^3.1.20
  file_picker: ^8.1.4
  image_picker: ^1.2.2
  url_launcher: ^6.3.1
  flutter_secure_storage: ^10.3.1
  http: ^1.2.1
  dio: ^5.8.0+1
  crypto: ^3.0.3
  intl: ^0.20.2
  geolocator: ^14.0.2
  flutter_map: ^8.3.0
  html_unescape: ^2.0.0
  cloud_firestore: ^6.0.0
  firebase_messaging: ^16.0.0
  firebase_core: ^4.0.0
  firebase_auth: ^6.0.0
  flutter_local_notifications: ^19.5.0
  latlong2: ^0.9.1
  lottie: ^3.3.3
  local_auth: ^3.0.1
  country_flags: ^3.3.0
  mobile_scanner: ^7.2.0
  provider: ^6.1.2
  shared_preferences: ^2.2.3
  safe_device: ^1.3.10
  device_info_plus: ^12.4.0
  network_info_plus: ^7.0.0
  connectivity_plus: ^7.1.1
  geocoding: 3.0.0
  permission_handler: ^12.0.1
  android_id: ^0.5.1
  flutter_typeahead: ^5.2.0
  package_info_plus: ^9.0.1
  path_provider: ^2.1.5
  share_plus: ^12.0.2
  camera: ^0.12.1
  google_mlkit_face_detection: ^0.15.1
  tflite_flutter: ^0.12.1
  image: ^4.1.7
  firebase_crashlytics: ^5.4.0
  firebase_performance: ^0.11.6

xcode 27

0
Oct 1 at 3:10 AM
User AvatarVGate
#android#ios#flutter#xcode#camera

No answer found for this question yet.