DenisovAV / flutter_tv

233 stars 40 forks source link

TV Simulator Launch Error: No Dart in Flutter Engine #22

Closed Sadhorsephile closed 8 months ago

Sadhorsephile commented 8 months ago

Hi!

I followed all the steps from the README.md, but there is a build error in XCode:

Compling /Flutter/App.Framework
 └─engine /Users/parshonok/dev/flutter_tv
 └─Coping Flutter.framework
 └─Compiling kernal
/Users/parshonok/rnd/flutter_tv/ios/../scripts/xcode_appletv.sh: line 41: /Users/parshonok/dev/flutter_tv/out/host_debug_unopt/dart: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

I took the engine build from here and indeed, host_debug_unopt folder doesn't contain dart.

P.S. I saw the following error in some issues here:

sed: 1: "Runner.xcodeproj/projec ...": invalid command code R

and found a solution of some kind (more info here):

+ sed -i "s#FLUTTER_LOCAL_ENGINE[[:space:]]=[[:space:]].*;#FLUTTER_LOCAL_ENGINE = \"${FLUTTER_LOCAL_ENGINE}\";#g" Runner.xcodeproj/project.pbxproj
- sed -i "" "s#FLUTTER_LOCAL_ENGINE[[:space:]]=[[:space:]].*;#FLUTTER_LOCAL_ENGINE = \"${FLUTTER_LOCAL_ENGINE}\";#g" Runner.xcodeproj/project.pbxproj

P.P.S. It would be great to have some reset script instead of re-clone repo every time things go wrong 🥺

DenisovAV commented 8 months ago

Hi! Let me check again, everything was fine when I was preparing archives. btw, which type of CPU do you have (and XCode and MacOS versions)? I checked using Intel CPU only. PS. Everything works fine on my laptop, thanks for highlighting will check it too PPS. Thanks for the proposal, definitely you are right, will add it

Sadhorsephile commented 8 months ago

which type of CPU do you have

Apple M1

XCode

14.3.1

MacOS

Ventura 13.4.1

DenisovAV commented 8 months ago

Checked on Intel CPU, and everything is fine. Checked on M1, and got an error, but different. Will try to fix it, prepare new archive, and lets try again

Sadhorsephile commented 8 months ago

I wanted to share that I successfully built the app for tvOS. My mistake was downloading only ios_debug_sim_unopt. When I also downloaded host_debug_unopt, it worked.

DenisovAV commented 8 months ago

I have Sonoma 14.3.1, and XCode 15.2 at M1 Machine, may this is the root cause of my issue. Will check it. But I think we can close this issue. I'll add reset script in the next update