Skip to content

Flutter 3.7.11 Xcode 14.3 : Unable to find a destination matching the provided destination specifier #124835

Open
@AlexTeamX

Description

@AlexTeamX

Is there an existing issue for this?

  • I have searched the existing issues
    I have read the guide to filing a bug

Steps to reproduce

  1. create a scheme named "dev"
  2. run "flutter run --flavor=dev"

Expected results

Successful run on the iOS Simulator

Actual results

Failed to build iOS app

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running Xcode build...
Xcode build done.                                            2.7s
Failed to build iOS app
Error output from Xcode build:

    2023-04-14 10:34:07.928 xcodebuild[28647:219942] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
    xcodebuild: error: Unable to find a destination matching the provided destination specifier:
    		{ id:C311C176-8DD0-47E6-97AF-24D51BEEC8BB }

    	Available destinations for the "dev" scheme:
    		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

Xcode's output:

    Writing result bundle at path:
    	/var/folders/xr/6lbh_mk957ngr87s6bw78_dw0000gn/T/flutter_tools.n4NdNq/flutter_ios_build_temp_dir9043NQ/temporary_xcresult_bundle


Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.7.11, on macOS 13.2.1 22D68 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.7.11 on channel stable at /Users/apaipai/fvm/versions/3.7.11
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f72efea43c (2 days ago), 2023-04-11 11:57:21 -0700
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/apaipai/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = /Users/apaipai/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.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.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 73.0.4
    • Dart plugin version 231.8109.91

[✓] Connected device (4 available)
    • iPhone 14 Pro (mobile) • C311C176-8DD0-47E6-97AF-24D51BEEC8BB     • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)        • macos                                    • darwin-x64     • macOS 13.2.1 22D68 darwin-x64
    • Chrome (web)           • chrome                                   • web-javascript • Google Chrome 110.0.5481.100

[✓] HTTP Host Availability
    • All required HTTP hosts are available

Activity

JherysVargas

JherysVargas commented on Apr 14, 2023

@JherysVargas
atleugim

atleugim commented on Apr 14, 2023

@atleugim
added
in triagePresently being triaged by the triage team
on Apr 14, 2023
huycozy

huycozy commented on Apr 14, 2023

@huycozy
Member

@YAOSHUWEI It seems the issue is caused by deployment target. Please check this if it can help.

@JherysVargas @atleugim Are you also seeing this issue on the latest stable 3.7.11?

added
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Apr 14, 2023
AlexTeamX

AlexTeamX commented on Apr 14, 2023

@AlexTeamX
Author

@YAOSHUWEI It seems the issue is caused by deployment target. Please check this if it can help.

@JherysVargas @atleugim Are you also seeing this issue on the latest stable 3.7.11?
My deployment is already on ios 11.
There is no error when I launch app without flavor.

removed
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Apr 14, 2023
huycozy

huycozy commented on Apr 14, 2023

@huycozy
Member

@YAOSHUWEI I also try with flavor sample on XCode 14.3 but still can not reproduce this issue. Please also try running it to see if it works or not.

Also, can you share your Podfile content?

added
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Apr 14, 2023
AlexTeamX

AlexTeamX commented on Apr 14, 2023

@AlexTeamX
Author
Podfile Content
# Uncomment this line to define a global platform for your project
platform :ios, '11.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!

  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
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['ENABLE_BITCODE'] = 'NO'
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
          '$(inherited)',

          ## dart: PermissionGroup.calendar
          # 'PERMISSION_EVENTS=1',

          ## dart: PermissionGroup.reminders
          # 'PERMISSION_REMINDERS=1',

          ## dart: PermissionGroup.contacts
          'PERMISSION_CONTACTS=1',

          ## dart: PermissionGroup.camera
          'PERMISSION_CAMERA=1',

          ## dart: PermissionGroup.microphone
          # 'PERMISSION_MICROPHONE=1',

          ## dart: PermissionGroup.speech
          # 'PERMISSION_SPEECH_RECOGNIZER=1',

          ## dart: PermissionGroup.photos
          'PERMISSION_PHOTOS=1',

          ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
          'PERMISSION_LOCATION=1',

          ## dart: PermissionGroup.notification
          # 'PERMISSION_NOTIFICATIONS=1',

          ## dart: PermissionGroup.mediaLibrary
          # 'PERMISSION_MEDIA_LIBRARY=1',

          ## dart: PermissionGroup.sensors
          # 'PERMISSION_SENSORS=1',

          ## dart: PermissionGroup.bluetooth
          # 'PERMISSION_BLUETOOTH=1',

          ## dart: PermissionGroup.appTrackingTransparency
          # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',

          ## dart: PermissionGroup.criticalAlerts
          # 'PERMISSION_CRITICAL_ALERTS=1'
        ]
    end
  end
end

@YAOSHUWEI I also try with flavor sample on XCode 14.3 but still can not reproduce this issue. Please also try running it to see if it works or not.

Also, can you share your Podfile content?

removed
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Apr 14, 2023
huycozy

huycozy commented on Apr 14, 2023

@huycozy
Member

I don't see your flavor configuration on your Podfile. Please see Creating flavors for Flutter and make sure you have completed all steps there.

You may also try the flavor sample project in my previous comment as well.

added
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Apr 14, 2023
atleugim

atleugim commented on Apr 14, 2023

@atleugim

@huycozy yes i'm on the latest stable 3.7.11 and its happening.

Rollfreeze

Rollfreeze commented on Apr 14, 2023

@Rollfreeze

62 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listneeds repro infoAutomated crash report whose cause isn't yet knownplatform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rivella50@stuartmorgan-g@ahmedalttai@Hixie@jmagman

        Issue actions

          Flutter 3.7.11 Xcode 14.3 : Unable to find a destination matching the provided destination specifier · Issue #124835 · flutter/flutter