skip to Main Content

I’ve upgraded my system to use Xcode 15 and iOS 17. Since this upgrade i discover a weird behavior on one of my project and not the others.

flutter run -t lib/entrypoints/generations/main.dart --flavor generations

As you can see on the following image, I’ve run my app using the ‘generations’ flavor and the ‘generations’ bundle id but Xcode tried to launch one of my other flavor named "zim" which have the bundle id egdigital.zimradio.Zim-Radio.

In fact xcode tried to run the flavor defined inside the "default value for command line build" instead of current flavor.

If I run my app on a device with a lower iOS version, I didn’t have the issue.
I can also reproduce that on emulator and the issue is little different : On a fresh new emulator, Xcode will deploy the previous flavor that I used. Smell like weird cache issue.

This problem is weird and I need some help !

Flutter 3.13.8
Xcode: 15.0.1
MacOS: 14.2.3
IPhone SE 2gen: iOS 17.1.2

enter image description here

On my device, i’ve didn’t have any visible certificate to accept inside General -> VPN & Device Management.

The operation couldn’t be completed. (OSStatus error -10814.)
Domain: IDELaunchCoreDevice
Code: 0
Recovery Suggestion: Verify that the Developer App certificate for your account is trusted on your device. Open Settings on the device and navigate to General -> VPN & Device Management, then select your Developer App certificate to trust it.
User Info: {
    IDERunOperationFailingWorker = IDELaunchCoreDeviceWorker;
}
--
The operation couldn’t be completed. (OSStatus error -10814.)
Domain: NSOSStatusErrorDomain
Code: -10814
User Info: {
    "_LSFunction" = runEvaluator;
    "_LSLine" = 1608;
}

EDIT :

After running defaults delete com.apple.dt.Xcode the issue persist but error is little different. I take for this new take an other flavor ‘named’ ODS on the same project.

XCode didn’t try to find previous app (because I deleted all possible caches) but it still fail to open the new one created.

Error :
enter image description here

The operation couldn’t be completed. (OSStatus error -10814.)
Domain: IDELaunchCoreDevice
Code: 0
Recovery Suggestion: Verify that the Developer App certificate for your account is trusted on your device. Open Settings on the device and navigate to General -> VPN & Device Management, then select your Developer App certificate to trust it.
User Info: {
    IDERunOperationFailingWorker = IDELaunchCoreDeviceWorker;
}
--
The operation couldn’t be completed. (OSStatus error -10814.)
Domain: NSOSStatusErrorDomain
Code: -10814
User Info: {
    "_LSFunction" = runEvaluator;
    "_LSLine" = 1608;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone12,8";
    "device_osBuild" = "17.1.2 (21B101)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.40.14";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 4624;
    "operation_errorCode" = 0;
    "operation_errorDomain" = IDELaunchCoreDevice;
    "operation_errorWorker" = IDELaunchCoreDeviceWorker;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 99;
    "param_launcher_substyle" = 8192;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphoneos;
}
--

No certificate to accept :
enter image description here

App is here, didn’t understand why Xcode fail…
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    I think found the solution :

    My xscheme files (one per flavor) used as 'buildConfiguration' the default value like 'Debug' or 'Release' instead of the flavor based one : 'Debug-generations' or 'Debug-ods'.

    Because of that, xcode used the defaultBuildConfiguration and launched my first in list flavor (zim).

    Strangely, first build on fresh simulator fail but next one work perfectly. Anyways, not big issue i can work peacefully now.


  2. Try using –dart-define=app.flavor=generations, I was facing the same issue and it got resolved using this,

    Try either of these commands

    1. flutter run -t lib/entrypoints/generations/main.dart –flavor generations –dart-define=app.flavor=generations
    2. flutter run -t lib/entrypoints/generations/main.dart –dart-define=app.flavor=generations

    //Update

    app.flavor is an enviroment variable which I accept to set my flavor and then the above code works

        const String appFlavor =String.fromEnvironment('app.flavor');
    

    Use this appFlavor to set my app flavor and then the 2 flutter run solutions work. Do let me know if its working or not.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search