Skip to content

[native_assets] Use hook/build.dart instead of build.dart #138727

@juliansteenbakker

Description

@juliansteenbakker

Is there an existing issue for this?

Steps to reproduce

  1. upgrade to flutter 3.16
  2. run flutter build ios

This only happens on my local app, not on an empty app.

I don't know why this happens. The --enable-native-assets is only available on the master channel, so it does not work on stable. However app building was fine with version 3.13 of flutter. What is causing this message?

I have tried:

  • pod deintegrate and pod install
  • flutter clean

Other OS'es seem to work, like macOS or Android.

Expected results

Build successfull

Actual results

Running Xcode build...
Xcode archive done. 53,8s
Failed to build iOS app
Error (Xcode): Target native_assets failed: Exception: Package(s) x require the native assets feature to be enabled. Enable using flutter config --enable-native-assets.

Logs

Logs
Archiving com.x.x...
Automatically signing iOS for device deployment using specified development team in Xcode project: x
Running pod install...                                              4,8s
Running Xcode build...                                                  
Xcode archive done.                                         53,8s
Failed to build iOS app
Error (Xcode): Target native_assets failed: Exception: Package(s) x require the native assets feature to be enabled. Enable using `flutter config --enable-native-assets`.

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-x64, locale nl-NL)
    • Flutter version 3.16.0 on channel stable at /usr/local/Caskroom/flutter/2.10.4/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (5 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/julian/Library/Android/sdk
    • Platform android-34, build-tools 33.0.1
    • Java binary at: /Users/julian/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/julian/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.84.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • SM F926B (mobile)   • RFCR812ZT6L                              • android-arm64  • Android 13 (API 33)
    • iPhone (3) (mobile) • 9b4d7d982f89bd9a36ad4cef025328faa9254d59 • ios            • iOS 12.5.7 16H81
    • macOS (desktop)     • macos                                    • darwin-x64     • macOS 14.1.1 23B81 darwin-x64
    • Chrome (web)        • chrome                                   • web-javascript • Google Chrome 119.0.6045.159
    ! Error: Browsing on the local area network for iPad van Julian (2). Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for iPhone van Robin. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions