Skip to content

Migrate Flutter projects to remove ENABLE_BITCODE=YES #111776

@jmagman

Description

@jmagman

Ensure Flutter apps do not have ENABLE_BITCODE turned on. It it is on, then give the user a warning and remove the build settings. This will allow bitcode to be removed from the tool.

New migration would look a lot like:

String? migrateLine(String line) {
// Xcode project file changes.
const String deploymentTargetOriginal8 = 'IPHONEOS_DEPLOYMENT_TARGET = 8.0;';
const String deploymentTargetOriginal9 = 'IPHONEOS_DEPLOYMENT_TARGET = 9.0;';

like:

  @override
  String? migrateLine(String line) {
    if (line.contains('ENABLE_BITCODE = YES;')) {
      if (!migrationRequired) {
        // Only print for the first discovered change found.
        logger.printWarning('Disabling deprecated bitcode. See https://github.com/flutter/flutter/issues/107887 for additional details.');
      }
      return null;
    }

    return line;
  }

We never turned bitcode on by default in our template, so this should be uncommon, though possible if was turned on with a Watch companion #73607 (comment)

Part of #107883

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions