Unable to Run on iOS Simulator: Release/Profile Builds Not Supported
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
Hey @hbalxzdl , the error message is clear: why are you running your app in release/profile?
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"