Today I tried to compile a Flutter app to iOS for the first time. After setting up the signing key in XCode, I ran flutter build ios and got the following error:

~/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.4+2/darwin/Classes/FLTFirebaseCorePlugin.m:6:9: fatal error: 'UserAgent.h' file not found

I found a similar report on StackOverflow (see post). The person recommends to run pod install, flutter clean then flutter build ios again. I tried it with no success.

On GitHub, they posted a workaround that seems to work, which is to downgrade to an older version until the issue is fixed.

The actual issue is being worked on here.

It seems like the issue appeared 8 days ago and someone started working on it 6 days ago. The PR is still pretty active. Looking forward to seeing the fix!