-
Notifications
You must be signed in to change notification settings - Fork 610
Allow building with non-xcode workflow #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The original design of this project was targeting desktop developers who wanted to embed Flutter within a traditionally-developed desktop project. However, so far most of the interest seems to be from people who are looking for a Flutter-like development experience where the wrapper app is largely an implementation detail, so I do expect us in the future to support something that looks much more like the existing Flutter workflow. (In the short term, you could easily make a simple Makefile or similar that invokes xcodebuild on your project, and trigger that from the editor of your choice.) |
To add some nuance to the answer: Xcode tools installation will always be required because Apple requires them to build applications for macOS (and iOS). (Unless Apple changes this policy.) |
Thank you. My main goal was to avoid installing and having to use full xcode to build, and get by with command line tools instance plus IntelliJ with flutter plugin |
I want command line tools. I hate GUI. Can we have a command line tools, please? something like: |
These tools work because the native embedding code for mobile is created and managed by Flutter, which is not currently the design of this project (as discussed both in my comment above and the README). Making command-line wrappers to build the example or the library would be easy, but wouldn't really help someone trying to use this library in their own project; there would still be the step of creating new macOS, Linux, and/or Windows embedding applications. For that there will need to be something that serves the purpose of As I noted above I do think that kind of tooling will come in the future, but right now the focus is still primarily on building out functionality. |
@stuartmorgan thanks a lot for the detail reply. Yeah, I figured out I needed |
I tried copying over the
I tried running the build through xcodebuild from the command line, but that did not yield the same results as running from within Xcode. xcodebuild -configuration Debug -target Example\ Embedder
...
/Users/dacoharkes/flt/engine/flutter-desktop-embedding/example/macos_fde/Example Embedder-Bridging-Header.h:16:9: error: 'FlutterEmbedderColorPanel/FlutterEmbedderColorPanel.h' file not found
#import <FlutterEmbedderColorPanel/FlutterEmbedderColorPanel.h>
^
1 error generated.
<unknown>:0: error: failed to emit precompiled header '/Users/dacoharkes/flt/engine/flutter-desktop-embedding/example/macos_fde/build/SharedPrecompiledHeaders/Example Embedder-Bridging-Header-swift_2A2APZ7VJ8VYG-clang_69D6YMFET0U9.pch' for bridging header '/Users/dacoharkes/flt/engine/flutter-desktop-embedding/example/macos_fde/Example Embedder-Bridging-Header.h'
<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
PrecompileSwiftBridgingHeader normal x86_64
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures) Side note: I don't need the fde in the end, but I'm using dart:ffi which is not supported on arm yet. I'll manage with using the fde on Linux for the time being. |
If you email the mailing list with specific errors, I may be able to figure out from the errors what you missed updating.
The error you have there indicates that the dependencies (plugins) aren't using the same build location as the application. This xcodebuild command works fine on the CI machines: I'll likely add an example shell script to the repository soon that does an xcodebuild to a known location, as part of adding some information about how to set up a build/run/debug cycle from within VS Code, which would address the original request in this bug. |
Moved to flutter/flutter#30706 |
Flutter allows build/run on Android/iOS from Android Studio and IntelliJ, would it be possible to build on macOS also using those tools?
The text was updated successfully, but these errors were encountered: