webview_flutter cause issues while archive in iOS

987

To archive an iOS app with Flutter module:

  1. Run flutter build ios in your flutter module directory to create a release build.
  2. Return to Xcode, then clean build folder (optional) and perform archive.

This part is not well-documented in Add-to-app section. For more detail, see create a build archive in official document.

Share:
987
Let's_Create
Author by

Let's_Create

Updated on November 25, 2022

Comments

  • Let's_Create
    Let's_Create over 1 year

    I have a flutter module and integrated in the existing iOS app (add to app). Everything was working but when I try to Archive it produces an error in webview_flutter module:

    bitcode bundle could not be generated because '/Users/flutter-module/.ios/Flutter/engine/Flutter.framework/Flutter' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/flutter-module/.ios/Flutter/engine/Flutter.framework/Flutter' for architecture armv7

    I checked the build setting and the Bitcode enabled is set to "Yes" for obvious reasons, what might be the reason for this error? Does it have something to do with the webview_flutter module?

    EDIT

    macOS: 10.15.3 (Catalina)

    Xcode version: 11.0 (11A420a)

    Flutter version: Channel stable, 1.20.2

    • Coder-256
      Coder-256 almost 4 years
      What version of Flutter are you using? As of 1.9.6, Flutter should have bitcode included.
    • Let's_Create
      Let's_Create almost 4 years
      @Coder-256 I am using 1.20.2, Do you think it is an issue with the package (webview_flutter), because this error occurs within that package.
    • Coder-256
      Coder-256 almost 4 years
      I'm not sure yet, but I'm leaning towards no. What Xcode and macOS version are you using? Could you add all the version info into your question?
    • Coder-256
      Coder-256 almost 4 years
      Can you check that "Enable Bitcode" is enabled, and everything under "Architectures" is set to the default (not bold) on all your targets?
    • Let's_Create
      Let's_Create almost 4 years
      I have updated the question with versions, and Bit code is enabled and the "Architectures" are all set to defaults. let me know if you need any further data
    • Coder-256
      Coder-256 almost 4 years
      What version of Xcode 11 specifically? Sorry for all these questions
    • Let's_Create
      Let's_Create almost 4 years
      No problem at all updated the question. Also @Coder-256 I see an open issue for this in the flutter repo github.com/flutter/flutter/issues/48092. Though it is not specific to this package.
    • Coder-256
      Coder-256 almost 4 years
      Ok, I guess the answer is that this is a known bug and nothing wrong with your code. However one thing I would try is upgrading Xcode to the latest version (currently 11.6).