I have a flutter app for which flutter run
always works perfectly, for pretty much any simulator we have.
I now have to setup flutter flavors as it is a requirement that multiple different versions of the app have to be present on the same device (production app being used by employees + test app with new features for internal alpha testing on employee phones). For both Android and iOS.
For Android, the setup of flutter flavors works perfectly according to the docs.
But, when following this guide here and also properly updating the Podfile as mentioned in the guider, running pod install
again, and then flutter run --flavor flavorname
, I’m getting the error:
User-Defined Issue (Xcode): Unsupported Swift architecture
and the application fails to build.
I’ve been digging and trying to fix this for hours now, but I’m clueless now. Deintegrating and re-loading the pods, deleting the derived data, cleaning the build folder, removing and regenerating the Podfile.lock
; none of that works. I’ve interestingly found others with this problem too, e.g. here. But without answers. For me, the error happens with the package shared_preferences (2.2.2), but again only when trying to run the app via --flavor
. Through normal flutter run
everything works. But as the shared_preferences package is maintained by the official flutter.dev publisher, I guess it’s me who’s missing something??