Please run "flutter build ios --release" before archiving(It will generate proper Generated.xcconfig for you).
In fact, all those problems are resulted from improper Generated.xcconfig configuration like `TRACK_WIDGET_CREATION,FLUTTER_FRAMEWORK_DIR,FLUTTER_BUILD_MODE`
In archive mode(flutter's release mode)
Try what I said above to see if it works.
if this picture appears,Now do the archive action, I think it will be ok now.