flutter_flavorizr icon indicating copy to clipboard operation
flutter_flavorizr copied to clipboard

Unable to Run on iOS Simulator: Release/Profile Builds Not Supported

Open hbalxzdl opened this issue 8 months ago • 2 comments

When attempting to run the project using Flutter, I encountered an issue where the app fails to start on the iOS simulator. The error message is as follows: Target aot_assembly_release failed: Exception: release/profile builds are only supported for physical devices. attempted to build for simulator

Flavor Config:

flavors:
  app_release:
    app:
      name: 'app'
    android:
      applicationId: "com.demo.app"
    ios:
      bundleId: "com.demo.app"

May I ask how to configure it

hbalxzdl avatar Apr 17 '25 08:04 hbalxzdl

Hey @hbalxzdl , the error message is clear: why are you running your app in release/profile?

AngeloAvv avatar Apr 18 '25 20:04 AngeloAvv

Hello,I got the same issue. Even running flutter run --flavor clientrelease --debug. I got the error on ios:

Target aot_assembly_release failed: Exception: release/profile builds are only supported for physical devices. attempted to build for simulator

Curiously running flutter run --flavor clientdebug I didn't get that issue.

my config is the following

flavorizr:
  flavors:
    clientdebug:
      app:
        name: "App debug"
      android:
        applicationId: "com.example.app.client.debug"
      ios:
        bundleId: "com.example.app.client.debug"
      macos:
        bundleId: "com.example.app.client.debug"

    clientrelease:
      app:
        name: "App"
      android:
        applicationId: "com.example.app.client.release"
      ios:
        bundleId:"com.example.app.client.release"
      macos:
        bundleId: "com.example.app.client.release"

SOLUTION

It sounds so dumb, but somehow flavor name is the main error. avoid calling "release" your flavor name. Name cannot contain that word. I would appreciate if someone could add this small but big issue in docs.

    client:  //Instead of client_release or clientrelease
      app:
        name: "App"
      android:
        applicationId: "com.example.app.client.release"
      ios:
        bundleId:"com.example.app.client.release"
      macos:
        bundleId: "com.example.app.client.release"

NullPointerException-25 avatar Nov 05 '25 01:11 NullPointerException-25