Skip to content

Fix bug with missing App.framework - #63568

Closed
szotp wants to merge 1 commit into
flutter:masterfrom
szotp:patch-2
Closed

szotp wants to merge 1 commit into
flutter:masterfrom
szotp:patch-2

Conversation

@szotp

@szotp szotp commented Aug 12, 2020

Copy link
Copy Markdown

Two weeks ago, for some reason __dir__ was replaced with this File.join thing which is doesn't really work, as it would create something like this:

/Users/work/Documents/Playground/AddToAppBug/my_flutter/.ios/Flutter/Users/work/Documents/Playground/AddToAppBug/my_flutter/.ios/Flutter/App.framework

when we wanted this

/Users/work/Documents/Playground/AddToAppBug/my_flutter/.ios/Flutter/App.framework

So if you are compiling app from fresh state, it would not create App.framework where it should, "pod install" would not include App.framework in the copy frameworks script, and the finished build would have no App.framework inside.

Typically this will occur in builds from CI, but not locally, as people don't clean that often.

@jmagman FYI

Two weeks ago, for some reason __dir__ was replaced with this File.join thing which is completely broken, as it would create something like this:
/Users/work/Documents/Playground/AddToAppBug/my_flutter/.ios/Flutter/Users/work/Documents/Playground/AddToAppBug/my_flutter/.ios/Flutter/App.framework

when we wanted this

/Users/work/Documents/Playground/AddToAppBug/my_flutter/.ios/Flutter/App.framework

So if you are compiling app from fresh state, it would create App.framework in wrong place, "pod install" would not include App.framework in the copy frameworks script, and the finished build would have no App.framework inside.

Typically this will occur in builds from CI, but not locally, as people don't clean that often.
@szotp
szotp requested a review from jmagman as a code owner August 12, 2020 12:21
@flutter-dashboard flutter-dashboard Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 12, 2020
@xster

xster commented Aug 12, 2020

Copy link
Copy Markdown
Member

Ah this is probably on the right path. I did see /Users/[name]/... paths being generated.

@jmagman

jmagman commented Aug 12, 2020

Copy link
Copy Markdown
Member

@szotp Thanks for your contribution! I had a similar fix at #63412 but with some updated tests. Would you mind taking a look at that one and validating it works?

Closing in favor of that PR (the tests I added failed on master, but pass on the PR).

@jmagman jmagman closed this Aug 12, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants