Skip to content

add-to-app via CocoaPods cannot find flutter_assets on iOS 14 #63552

Closed

Description

@xster

Run https://github.com/flutter/samples/tree/master/add_to_app/ios_fullscreen via the CocoaPods integration path.

Fails to launch the Flutter screen on iOS 14 / Xcode 12

Failed to find assets path for "Frameworks/App.framework/flutter_assets"
[VERBOSE-2:engine.cc(148)] Engine run configuration was invalid.
[VERBOSE-2:shell.cc(487)] Could not launch engine with configuration.
flutter: Observatory listening on http://127.0.0.1:63033/hwmX53Eqeq0=/

Interestingly, once I launch it once via iOS 13 / Xcode 11, then go back to iOS 14 / Xcode 12, it works.

cc @jmagman

Activity

  1. added
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: existing-appsIntegration with existing apps via the add-to-app flow
    e: OS-version specificAffects only some versions of the relevant operating system
    on Aug 12, 2020
  2. xster commented on Aug 12, 2020

    @xster
    MemberAuthor

    Tried another one. This is pretty suspect.

    ../[flutter-module]/.ios/Flutter/flutter_export_environment.sh: line 8: inherited: command not found
    

    Perhaps it didn't run xcode_backend.sh (the next line to flutter_export_environment.sh) at all?

  3. szotp commented on Aug 12, 2020

    @szotp

    Here is a fix, please merge: #63568

    It's not related to iOS 14. It will start working if you build app once, then execute "pod install" and run again.

    "inherited: command not found" is also a bug, but not related to this.

  4. jmagman commented on Aug 12, 2020

    @jmagman
    Member

    The inherited bug is the problem here. I fixed up the App.framework path problem (which #63568 also does) and it still doesn't embed the App.framework into the resulting host app, though it does make the phantom /User/ directory go away. The Flutter script doesn't run any flutter code, it just bails at flutter_export_environment.sh: line 8: inherited: command not found. When I escape the export "OTHER_LDFLAGS=$(inherited) -framework Flutter" parenthesis, it embeds as expected.

    Let's follow along at duplicate #63176.

  5. BrunoVillanova commented on Dec 11, 2020

    @BrunoVillanova

    I have found the same error trying to build in Xcode 12.2 on Apple M1.
    The difference was that the error only happens when building from the native app, because I am building add-to-app.
    What worked for me was to handle the VALID_ARCHS on my iOS Project Podfile as you can see in this CocoaPods issue

    Fix all configuration

    target 'Demo' do
      post_install do |installer|
        installer.pods_project.build_configurations.each do |configuration|
          installer.pods_project.build_settings(configuration.name)['VALID_ARCHS'] = []
        end
      end
    end
    

    Fix one configuration, like Debug

    target 'Demo' do
      post_install do |installer|
        installer.pods_project.build_settings('Debug')['VALID_ARCHS'] = []
      end
    end
    
  6. ArshAulakh59 commented on Feb 24, 2021

    @ArshAulakh59

    I was able to get my add-to-app project building again from Xcode with the solution mentioned here #71959 (comment).

  7. github-actions commented on Aug 5, 2021

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Aug 5, 2021
  9. added
    P0Critical issues such as a build break or regression
    and removed on Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical issues such as a build break or regressiona: existing-appsIntegration with existing apps via the add-to-app flowe: OS-version specificAffects only some versions of the relevant operating systemplatform-iosiOS applications specificallytoolAffects 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