Upgrading an old Flutter project giving privacy errors - Stack Overflow

admin2025-04-16  3

I'm trying to get an older flutter project updated to the current version of flutter. I'm running into an issue when I try to run the project about a missing privacy file:

Error (Xcode): Build input file cannot be found: '/Users/USER/projects/APP/build/ios/Debug-iphonesimulator/url_launcher_ios/url_launcher_ios_privacy.bundle/url_launcher_ios_privacy'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

I think my version are all valid:

name: app
description: APP
version: 2.3.3+55

environment:
  sdk: '>=3.0.0 <4.0.0'
  flutter: "^3.19.0"
  
dependencies:
  multi_select_flutter: ^4.1.2
  autocomplete_textfield: ^2.0.1
  camera: ^0.11.1
  # charts_flutter: ^0.12.0
  collection: ^1.16.0
  # device_info: ^2.0.3 
  event_bus: ^2.0.0 
  exif: ^3.1.1
  flutter:
    sdk: flutter
  flutter_linkify: ^6.0.0
  flutter_image_compress: ^2.4.0
  image_picker: ^1.1.2
  image_crop: ^0.4.0
  intl: ^0.20.2
  # package_info: ^2.0.2 
  path_provider: ^2.1.5
  pubnub: ^5.1.1
  recase: ^4.0.0
  shared_preferences: ^2.5.1
  time_machine: ^0.9.17
  url_launcher: ^6.3.1
  version: ^3.0.2
  zxcvbn: ^1.0.0
  mixpanel_flutter: ^2.0.0
  #xcvbnm: 1.0.0
  

dev_dependencies:
  flutter_test:
    sdk: flutter
  test: ^1.21.1
  mockito: ^5.2.0
  build_runner: ^2.2.0
  flutter_driver:
    sdk: flutter
Flutter 3.27.3 • channel stable • .git
Framework • revision c519ee916e (13 days ago) • 2025-01-21 10:32:23 -0800
Engine • revision e672b006cb
Tools • Dart 3.6.1 • DevTools 2.40.2

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.3, on macOS 15.3 24D60 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See  for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See /to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.90.2)
[✓] Connected device (4 available)
[✓] Network resources

I'm not worried about android at the moment, just trying to get iOS to build in the simulator.

I've done the basic

flutter clean            
flutter pub get
flutter run -t lib/main_development.dart

and I've tried a complete reset of pods:

cd ios
rm -rf Pods              
rm -rf .flutter-plugins
rm -rf .flutter-plugins-dependencies
rm -rf Podfile.lock
pod install --repo-update

Full Log:

flutter pub get
flutter run -t lib/main_development.dart
Cleaning Xcode workspace...                                         3.5s
Deleting build...                                                   35ms
Deleting .dart_tool...                                               3ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
Deleting Flutter.podspec...                                          0ms
Deleting .flutter-plugins-dependencies...                            2ms
Deleting .flutter-plugins...                                         0ms
Resolving dependencies... (1.7s)
Downloading packages... 
  _fe_analyzer_shared 76.0.0 (79.0.0 available)
  analyzer 6.11.0 (7.2.0 available)
  async 2.11.0 (2.12.0 available)
  boolean_selector 2.1.1 (2.1.2 available)
  cbor 4.1.0 (6.3.5 available)
  characters 1.3.0 (1.4.0 available)
  clock 1.1.1 (1.1.2 available)
  collection 1.19.0 (1.19.1 available)
  fake_async 1.3.1 (1.3.3 available)
  file 7.0.0 (7.0.1 available)
  http 0.13.6 (1.3.0 available)
  leak_tracker 10.0.7 (10.0.9 available)
  leak_tracker_flutter_testing 3.0.8 (3.0.9 available)
  matcher 0.12.16+1 (0.12.17 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  path 1.9.0 (1.9.1 available)
  petitparser 6.0.2 (6.1.0 available)
  platform 3.1.5 (3.1.6 available)
  process 5.0.2 (5.0.3 available)
  shelf_web_socket 2.0.1 (3.0.0 available)
  source_span 1.10.0 (1.10.1 available)
  stack_trace 1.12.0 (1.12.1 available)
  stream_channel 2.1.2 (2.1.4 available)
  string_scanner 1.3.0 (1.4.1 available)
  term_glyph 1.2.1 (1.2.2 available)
  test 1.25.8 (1.25.14 available)
  test_api 0.7.3 (0.7.4 available)
  test_core 0.6.5 (0.6.8 available)
  vm_service 14.3.0 (15.0.0 available)
  webdriver 3.0.4 (3.1.0 available)
Got dependencies!
31 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main_development.dart on iPhone SE (3rd generation) in debug mode...
Running pod install...                                           2,292ms
Running Xcode build...                                                  
Xcode build done.                                           10.8s
Failed to build iOS app
Error (Xcode): Build input file cannot be found: '/Users/USER/projects/APP/build/ios/Debug-iphonesimulator/url_launcher_ios/url_launcher_ios_privacy.bundle/url_launcher_ios_privacy'. Did you forget to declare this file as an output
of a script phase or custom build rule which produces it?


Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).```
转载请注明原文地址:http://www.anycun.com/QandA/1744754558a87143.html