Had the same issue with flutter 3.24.3, because the project was created using an older version flutter. just delete the ios folder and create new files using
flutter create --platforms ios
don't forget to add any existing config such as google services etc