Flutter macOS Desktop project release artifact location - flutter

I want to build a macOS app from the Flutter project. I can build it and run fine from Android Studio and command line using the following command:
flutter build macos
flutter run -d macos
The documentation says the '.app' file is self-contained and can be distributed as it. However, it doesn't say where it's generated. Do you know how to locate the '.app' artifact for macOS?

mine was in build/macos/Build/Products/Release/$APPNAME.app
And yes, it seems to be entirely self-contained and distributable.

Related

Flutter: Cannot parse result path string

Error I am getting:
When I am trying to build the app (Which is by default app by Flutter), I am facing this problem please someone help me out.
flutter doctor -v:
I also checked the problems but didn't get anything.
I was trying to build the app.
If you are using windows, it is selected windows build by default on VS Code. You can select device on top section for android studio and bottom corner for vs-code.
and then run the app again.
Also you can use command on terminal like
flutter run -d c
this will run on chrome(I am using c to select chrome).
If you like to build on Windows, you need to install Desktop development with C++. Check How to build release version of windows app?

XCode keep search for flutter windows path

I try to build IOS version to my flutter app
I'm using virtual box with macOC catalina
after edit flutter & app path in XCode like:
when I start to build app archive, XCode show this code
That mean its still looking for flutter windows path (C:\src\flutter..........)
what's wrong here?!
Before running your project in xcode
Do
flutter clean
flutter pub get
go yo your iOS directory in side terminal and run pod install
And remember to run flutter commands you have to download flutter SDK (in your MacOs)

Flutter Project build in macOS

I am windows user and have no experience with macOS. I have developed flutter app in Windows 10 using Android Studio. All working fine and already tested with physical Android Device. Now it is the time to test IOS device. There's the problem started.
I can't build my project in XCode. I already changed user defined build settings as shown in screenshots
When build the project, it is still finding the flutter SDK location of Windows OS
This is my flutter doctor check in macOS
Please guide me.
I found the solution with the help of my friend - flutter developer.
Go to the project directory and run flutter create -i swift . It will recreate the ios folder in project.
Then run pod install command under ios folder

Flutter ios release build cannot find snapshot

While trying to build flutter ios app for release I am getting this error every time
Failed to find snapshot: /var/containers/Bundle/Application/19D78607-A03B/Runner.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin
I have tried these things to correct it but failed
running flutter clean and then flutter run --release
changing flutter channel to beta and master
deleting build folder and then flutter clean and flutter run --release
flutter clean > flutter build ios > archive in Xcode to test on the test flight
Does anyone know how to fix it?
I've been seeing this issue frequently over the last few days. I recreated my ios directory which fixed the issue temporarily, but it came back.
What I learned is that it is expected that kernel_blob.bin is not present in release builds, because that file contains your Dart sources in bytecode form ready for JIT, but release builds don't use JIT, they use AOT and your Dart files are compiled into a binary that is placed under App.framework. Rather, this error happens because the release build of the app is incorrectly incorporating the debug (i.e. JIT) version of the Flutter engine.
The best solution I've found so far is to move the build folder to the trash (flutter clean is not working and hangs indefinitely on deleting the build folder for some reason), run flutter clean, run flutter build ios --release from the command line first, then (in my case) create the archive in Xcode.
Run flutter doctor -v
I have resolved this problem, if someone happened, you can try this.
Remove Flutter.framework, build again. Make sure Flutter.framework and App.framework are the same debug or release mode.
Run the following from a terminal, this removes "ios/Flutter/App.framework" and everything underneath it:
rm -rf ios/Flutter/App.framework
and then rebuild your app from xCode. This solved this problem for me.

Flutter iOS Build Error: framework not found Flutter

I am able to run the app in android studios but whenever I try in xcode I get a flutter framework not found.
upgrade your flutter by doing
flutter upgrade
and it will upgrade the engine and download necessary tools.
This will even kill flutter daemons.
And run the application again
flutter run
Make sure you open .xcworkspace (and not .xcodeproj in XCode).
Ensure you have 'Flutter.Framework' listed under "Linked Frameworks and Libraries". If not, just drag and drop it from the main project. Like below
I was facing the same error whene I try to archive in Xcode
I fixed it by
flutter upgrade
and
flutter run
I fixed this by switching to the master channel, and switching back to the stable channel. Also remember to run 'flutter upgrade' after switching.
Delete the flutter directory.
Download new flutter
Extract it and put it where you want.
Run the command export PATH="$PATH:`pwd`/flutter/bin"
if the command does not work then specify your path like bellow
export PATH="$PATH: /Users/{your user name}/Documents/src/flutter/bin"
Restart your machine and you are ready to go.
After that - inside your project's ios directory -
delete the .symlink directory
delete the Pods directory
delete the Podfile.lock file
and now run -
flutter clean
flutter packages upgrade
flutter build ios
For me nothing worked except, deleting my flutter files fully and reinstalling.
Use this flutter docs for reinstallation: Flutter Installation Link
I tried everything nothing worked except:-
Flutter upgrade
Flutter run
and boom- Build succeeded!
Please try the following steps:
Delete the flutter SDK
Download the same flutter SDK and re-install it
restart the android studio
It should be worked well.
Fixed by switching branches from beta to master