You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter build ios fails: Failed to verify bitcode in Flutter.framework/Flutter on Xcode 10.3 #49787
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.14.6 18G2022, locale en)[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)[!] Android Studio (not installed)[!] Connected device ! No devices available! Doctor found issues in 3 categories.
We have faced the same issue after upgrading flutter from hotfix5 to hotfix7. What I have found so far, this might be related with the XCode version. In the logs there is something like this:
{
code = 0;
description = "Failed to verify bitcode in Flutter.framework/Flutter:\nerror: Linker option verification failed for bundle /var/folders/wt/jjmd1pm16lv1d9ntx203shw00000gp/T/FluttermQF29X/Flutter.armv7.xar (unrecognized arguments: -platform_version iOS 8.0.0 13.0.0)\n\n";
info = {
};
level = ERROR;
type = "malformed-payload";
}
AFAIK you need XCode 11 to build against iOS 13. Also, other mention about similar behaviour when the library is build in version 'X' of XCode, and when you want to use it under version 'Y' which is lower, there might be a problem with bitcode bundling (appspector/ios-sdk#4 (comment))
If I didn't find any solution we will probably update the XCode version. I will let you know.
@jmagman Sorry if my issue is confusing, I'll explain it better.
I use services like AppCenter / CodeMagic to build and distribute my apps in flutter.
These services allow you to choose the version of xcode, so the output can be confusing, but the version chosen when you gave this error was 10.3.
This is the environment I use, App Center.
Note that the version that was compiled was distributed in the store, and my code has not been changed until then, and I have the same problem with this application after the last hotfixes.
EDIT: I was able to confirm that the cause of the white screen and crash was Firebase Performance.
Essentially the LUCI builder must never be upgraded past the minimum Xcode version.
Reproduction steps
$ flutter create test_app
$ flutter build ios
open ios/Runner.xcworkspace in Xcode 10.2.
Set up signing
Product > Archive
Distribute App > Development (or however you would distribute it, I have a development cert) > Next > Next
Bitcode validation error. iOS app submission is blocked. Probably ditto macOS App Store submission but I didn't try.
Workaround
Upgrade to Xcode 11 or higher.
Options
Downgrade the LUCI builder to Xcode 10.2 and hotfix with the rebuilt engine (new hotfix)
Downgrade the LUCI builder to Xcode 10.2 and rebuild the same hotfixed engine and replace the existing assets (no hotfix needed, assets being changed without a version bump probably not okay)
Turn off all gauge performance metric tests, upgrade mac-10 to Xcode 11, up the minimum Xcode version in the tool to 11.0 (released September 2019), hotfix.
Option 3 but no hotfix, let the version bump work its way through the channels, communicate to users must upgrade to Xcode 11.
Option 3 looks like the most complete fix, but we would lose the gauge benchmarks.
Downgrading the builders will involve rolling back multiple patches on the hotfix branch - 1 and 2 both seem pretty risky to me.
I would rather turn off the gauge tests. My understanding is that it's both an Xcode issue and an iOS version issue. We need to find a way to enable them that will not require so much work on each upgrade of Xcode - the fact that we haven't found a work around yet is very concerning (Xcode 11 has been out for a while).
I'm abivalent about hotfixing a change in the version checking on Xcode, but it would probably be good.
@jmagman I didn't enable bitcode in my project. I also don't use add-to-app.
When you are building AppStore version by default it uses bitcode, so later on, Apple can rebuild your application without you action if needed (and also decrease the size of output files depending on the device / OS is used to download it). Our builder works fine for code review process, but tasks that builds release-able version fails because of that.
Side note. This is kinda breaking change, because everyone needs to bump XCode and was released as a hotfix. Similar issues is with firebase for flutter. They have changed CloudFunctionsExeception structure and each application that rely on error response doesn't work anymore properly :(
Normally I would say that we should go with (4) since I don't think we should be using a hotfix as essentially an announcement mechanism. But I think @christopherfujino already has a hotfix in the works for something else, and we can piggyback on that one and do (3).
Yes, this was an unintentional break. Unfortunately, we don't have a good way to roll this back - the process to do so would very likely introduce new breakages that would be even more serious than this one.
We're sorry about this. A few of us are working on a document describing how this happened and what we're going to do to try to prevent it from happening again. Unfortunately, at this point, your only option is to upgrade Xcode or downgrade to hotfix 6 or earlier.
And for what it's worth, our next stable release would have introduced this change either way - but we realize introducing it as a hotfix without even a changelog update is disruptive. This just slipped through the cracks.
Reacted by Renan Delfanti, Christopher Fujino, Marcin Pawłowski, Per Lycke and Jay
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
RenanDelfanti commentedon Jan 30, 2020
pawlowskim commentedon Jan 31, 2020
We have faced the same issue after upgrading flutter from hotfix5 to hotfix7. What I have found so far, this might be related with the XCode version. In the logs there is something like this:
AFAIK you need XCode 11 to build against iOS 13. Also, other mention about similar behaviour when the library is build in version 'X' of XCode, and when you want to use it under version 'Y' which is lower, there might be a problem with bitcode bundling (appspector/ios-sdk#4 (comment))
If I didn't find any solution we will probably update the XCode version. I will let you know.
EDIT. Some new info:
#47101 (comment)
RenanDelfanti commentedon Jan 31, 2020
Some additional:
When I change version of Xcode 10.3 to 11.3.1, its compile, but I have a blank screen and crash.
jmagman commentedon Feb 1, 2020
@RenanDelfanti Your doctor output said "Xcode - develop for iOS and macOS (Xcode 11.3.1)". But you were on Xcode 10.3?
That crash looks like it's in Firebase. You should create a new issue at https://github.com/firebase/firebase-ios-sdk/issues.
[-]Build iOS fail[/-][+]flutter build ios fails: Failed to verify bitcode in Flutter.framework/Flutter[/+]RenanDelfanti commentedon Feb 1, 2020
@jmagman Sorry if my issue is confusing, I'll explain it better.
I use services like AppCenter / CodeMagic to build and distribute my apps in flutter.
These services allow you to choose the version of xcode, so the output can be confusing, but the version chosen when you gave this error was 10.3.
This is the environment I use, App Center.

Note that the version that was compiled was distributed in the store, and my code has not been changed until then, and I have the same problem with this application after the last hotfixes.
EDIT: I was able to confirm that the cause of the white screen and crash was Firebase Performance.
jmagman commentedon Feb 3, 2020
This issue can track the tool adding more Xcode 11 checks, then.
11 remaining items
godofredoc commentedon Feb 7, 2020
microbenchmarks_ios are always failing on ios 13.3 too.
jmagman commentedon Feb 7, 2020
Essentially the LUCI builder must never be upgraded past the minimum Xcode version.
Reproduction steps
ios/Runner.xcworkspacein Xcode 10.2.Bitcode validation error. iOS app submission is blocked. Probably ditto macOS App Store submission but I didn't try.
Workaround
Upgrade to Xcode 11 or higher.
Options
Option 3 looks like the most complete fix, but we would lose the gauge benchmarks.
\cc @tvolkert @zanderso
jmagman commentedon Feb 7, 2020
Created #50315 in anticipation of Xcode version bump required for option 3 or 4.
dnfield commentedon Feb 7, 2020
We should have a test on Luci that fails if the devicelab is on a lower version of Xcode than Luci.
dnfield commentedon Feb 7, 2020
Downgrading the builders will involve rolling back multiple patches on the hotfix branch - 1 and 2 both seem pretty risky to me.
I would rather turn off the gauge tests. My understanding is that it's both an Xcode issue and an iOS version issue. We need to find a way to enable them that will not require so much work on each upgrade of Xcode - the fact that we haven't found a work around yet is very concerning (Xcode 11 has been out for a while).
I'm abivalent about hotfixing a change in the version checking on Xcode, but it would probably be good.
pawlowskim commentedon Feb 7, 2020
When you are building AppStore version by default it uses bitcode, so later on, Apple can rebuild your application without you action if needed (and also decrease the size of output files depending on the device / OS is used to download it). Our builder works fine for code review process, but tasks that builds release-able version fails because of that.
Side note. This is kinda breaking change, because everyone needs to bump XCode and was released as a hotfix. Similar issues is with firebase for flutter. They have changed
CloudFunctionsExeceptionstructure and each application that rely on error response doesn't work anymore properly :(zanderso commentedon Feb 7, 2020
Normally I would say that we should go with (4) since I don't think we should be using a hotfix as essentially an announcement mechanism. But I think @christopherfujino already has a hotfix in the works for something else, and we can piggyback on that one and do (3).
jmagman commentedon Feb 7, 2020
We're going with Option 3.
dnfield commentedon Feb 8, 2020
Yes, this was an unintentional break. Unfortunately, we don't have a good way to roll this back - the process to do so would very likely introduce new breakages that would be even more serious than this one.
We're sorry about this. A few of us are working on a document describing how this happened and what we're going to do to try to prevent it from happening again. Unfortunately, at this point, your only option is to upgrade Xcode or downgrade to hotfix 6 or earlier.
dnfield commentedon Feb 8, 2020
And for what it's worth, our next stable release would have introduced this change either way - but we realize introducing it as a hotfix without even a changelog update is disruptive. This just slipped through the cracks.
jmagman commentedon Feb 12, 2020
Xcode 11 check is in master and stable. See https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel#hotfix8-february-11-2020
Please update to Xcode 11! Closing.
github-actions commentedon Aug 23, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.