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
add-to-app via CocoaPods cannot find flutter_assets on iOS 14 #63552
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.
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.
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
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
xster commentedon Aug 12, 2020
Tried another one. This is pretty suspect.
Perhaps it didn't run xcode_backend.sh (the next line to flutter_export_environment.sh) at all?
szotp commentedon Aug 12, 2020
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.
jmagman commentedon Aug 12, 2020
The
inheritedbug 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 anyfluttercode, it just bails atflutter_export_environment.sh: line 8: inherited: command not found. When I escape theexport "OTHER_LDFLAGS=$(inherited) -framework Flutter"parenthesis, it embeds as expected.Let's follow along at duplicate #63176.
BrunoVillanova commentedon Dec 11, 2020
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
Fix one configuration, like Debug
ArshAulakh59 commentedon Feb 24, 2021
I was able to get my add-to-app project building again from Xcode with the solution mentioned here #71959 (comment).
github-actions commentedon Aug 5, 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.