Facebook SDK build fails in .swiftinterface files (Flutter, iOS)
Last updated November 17, 2026
The short answer
Your Xcode is older than 26.4. Plugin versions from 0.32.0 are built on Facebook SDK v19, and that SDK needs Xcode 26.4 or newer to build.
The errors look like this, and none of them mention Xcode:
.../FBAEMKit.framework/Modules/FBAEMKit.swiftmodule/arm64-apple-ios.private.swiftinterface:13:63: error: Expected type
.../arm64-apple-ios.private.swiftinterface:13:81: error: Consecutive statements on a line must be separated by ';'Check what you are building with:
xcodebuild -versionWhy it happens
The Facebook iOS SDK ships as prebuilt frameworks. Each framework describes its public API in a text file, the .swiftinterface, and your Swift compiler has to read that file to use the framework.
The v19 interfaces are written in a newer Swift syntax than older compilers can parse. The compiler does not say "this file is too new". It reports the first line it cannot read as a syntax error, inside a file you did not write.
What it is not
The same interface text ships for every platform slice, so the error does not depend on any of these:
- Simulator or device. Both fail.
- Architecture. Removing an
EXCLUDED_ARCHSsetting for the arm64 simulator changes nothing. - CocoaPods or Swift Package Manager. Both pull the same frameworks.
We checked rather than guessed. The same commit of our example app, on the same CI machine: Xcode 26.3 fails with exactly these errors, and Xcode 26.4.1 builds. Our CI now builds on Xcode 26.4 on every change, so the minimum stays honest.
Fix one: update Xcode
Install Xcode 26.4 or newer. This is the fix if you can take it.
Remember your CI. A build machine pinned to an older Xcode fails the same way while your laptop builds fine. On hosted runners, select the version explicitly instead of relying on the default.
Fix two: stay on Facebook SDK v18 for now
If you cannot move Xcode yet, stay on the last plugin line built on Facebook SDK v18:
dependencies:
facebook_app_events: ^0.31.1With CocoaPods, also run this once, because Podfile.lock still pins v19:
cd ios && pod update FBSDKCoreKitThis is a holding position. You keep an older Facebook SDK, and you miss the plugin fixes released after 0.31.1.
The other error you meet when changing SDK major
Moving between plugin versions built on different Facebook SDK majors, in either direction, CocoaPods can stop with "changed the constraints of dependency FBSDKCoreKit inside your development pod facebook_app_events". pod install does not move a plugin's transitive dependency, and the pod repo update hint Flutter prints does not fix it. The pod update FBSDKCoreKit command above does. Which Facebook SDK version you actually get explains what controls the resolved version.
Verify your setup
- xcodebuild -version reports 26.4 or newer on the machine that runs the failing build
- Your CI selects that Xcode version explicitly
- If you stayed on ^0.31.1 with CocoaPods, you ran pod update FBSDKCoreKit and Podfile.lock resolves FBSDKCoreKit 18.x
- Your iOS deployment target is 15.0 or higher if you are on a plugin version built on Facebook SDK v19
Meta's reference documentation
Plugin API reference
Still stuck?
It is a plugin defect
If the plugin is doing something the native Facebook SDK does not, that is our bug. Open an issue and we fix it. Free, always, no conditions.
Open a GitHub issueIt is a usage question
Configuration and integration questions are best asked where other developers can find the answer later.
Ask on StackOverflowYour numbers are wrong and money is moving
If Meta install campaigns are spending and the attribution does not add up, that is a different problem from a broken build. It starts with a free 20 minute call. The one hour diagnostic, 300 USD and credited against the audit, follows if it is worth it.
See the diagnostic and audit