I've had this issue for a while now and now that Flutter 2.5 is out, have much more of a need to fix it. I'm trying to build Flutter in profile mode to take advantage of the shader SkSl warmup and reduce runtime jank on iOS (https://flutter.dev/docs/perf/rendering/shader).
The crux of the problem: I get a "No Provisioning Profile was found for your project's Bundle Identifier or your device." error when building to a real device with the "--profile" flag, but building in release mode works fine. To illustrate this:
- Working:
flutter run --flavor prod -t "lib/main.dart" - Not working:
flutter run --profile --flavor prod -t "lib/main.dart" --cache-sksl --purge-persistent-cache
According to the Flutter documentation, the profile flag runs in a slightly modified release mode, so I'm not sure why the build fails.
A couple more details:
- I'm using Fastlane Match for provisioning profiles. There's a corresponding "Profile-prod" configuration in XCode which uses the same provisioning profile and bundle identifier as the main production release configuration.
- I also have dev and stage build flavors which build to the device fine using a command such as
flutter run --flavor stage -t "lib/main_stage.dart" - I've also tried
flutter run --profile --cache-sksl --purge-persistent-cacheas explicitly mentioned in the documentation but that also fails with the same error
Any suggestions are appreciated!