9

After upgrading Xcode 14.3 my flutter run failed to run on iOS specifically but I am able to run on Android.

I am getting following error:

Failed to build iOS app
Error output from Xcode build:
↳
    2023-04-03 17:29:33.364 xcodebuild[97688:923371] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
    xcodebuild: error: Unable to find a destination matching the provided destination specifier:
            { id:6EB5FA1B-46DC-4E2D-BA30-9BF413BCB06F }

        Available destinations for the "Runner" scheme:
            { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006000-001429C12E23801E }
            { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/k9/wbd7hvx90_s_1_rt6sqg61b80000gn/T/flutter_tools.3s0yqP/flutter_ios_build_temp_dirw6n3UV/temporary_xcresult_bundle


Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
Code Hunter
  • 10,075
  • 23
  • 72
  • 102
  • you can checkout this [post](https://stackoverflow.com/questions/75486713/upgrade-from-xcode-14-2-to-14-3-phasescriptexecution-failed-with-a-nonzero-exit) – Nayef Radwi Apr 03 '23 at 21:22

3 Answers3

5

Change the

<LaunchAction

      buildConfiguration = "Release" to  buildConfiguration = "Debug"

in Runner.xcscheme. 

Tushar Katyal
  • 412
  • 5
  • 12
  • 2
    Using the navigation of `XCODE: Product > Scheme > Edit Scheme` ... then Build Configuration from `Release` to `Debug` – Seb Jun 20 '23 at 18:47
0

I had the same issue when building an xcf framework. The reason was in my case the DTVCoreDeviceEnableState (whatever that is).

xcodebuild[97688:923371] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)

My solution was to add the -userdefault parameter to the xcodebuild command line:

xcodebuild  -project myproject.xcodeproj\
        -scheme myScheme\
        -destination 'generic/platform=iOS,name=Any iOS Device'\
        -configuration Release\
        -sdk iphoneos\
        -action build\
        -derivedDataPath ./DerivedData\
        -userdefault=DVTEnableCoreDevice=enabled

Make sure, that the -userdefault parameter is the last parameter in the command line. Otherwise, the parameter was ignored (at least in my case).

AD1170
  • 378
  • 1
  • 9
-1

First, open project in xcode,

and using the navigation of XCODE go to

Product > Scheme > Edit Scheme

... then

Build Configuration from Release to Debug

General Grievance
  • 4,555
  • 31
  • 31
  • 45