1

Building our Flutter project fails on iOS. The following steps work without problems:

  • running on the XCode simulator (flutter run)
  • building in the terminal (flutter build ios)
  • running on a real device in debug mode (flutter run -d "abcd")

If I open the project in XCode, change the build target to "Generic iOS Device" and hit "Build" or "Archive" I get the following error:

/Users/.../development/testproject/ios/Runner/GeneratedPluginRegistrant.m:6:9: 'flutter_exif_rotation/FlutterExifRotationPlugin.h' file not found

After removing the FlutterExifRotationPlugin, the error reoccurs with the next plugin alphabetically, so I figured that plugins in general don't work at the moment.

I tried:

  • dev, stable and master channels of flutter
  • reinstalling XCode
  • reinstalling Flutter
  • create a new project and moving the old files there

But nothing worked so far.

1 Answer 1

2

Ok the solution was very simple. I had to open the .xcworkspace file instead of the .xcodeproject one.

One WEEK went down the pipe for this error. I hope that you, future reader, will find this comment useful.

Sign up to request clarification or add additional context in comments.

1 Comment

Brilliant. Luckily I didn't lose as much time. There's quite a few issues out there asking about this issue - this was the solution for me. Phew! Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.