-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Add2App [Option A&B] with plugins failed to build because plugins was built without full bitcode #48092
Comments
This issue was on additionally I upgraded to currently latest:
and repeat test: |
You doesn’t apply severe label. |
I need to try this, I'm not sure what's going on and don't have a workaround at the moment. |
Hello! @jmagman , please tell me - When will it be fixed? I meet the same issue and I can not release application because of this error! thanks |
@jmagman , I tried to add flutter module to app via Option A - cocoapods script, recommended way
|
to make sure I'm doing everything right and to provide more information for you I do everything from scratch with latest flutter version:
I create new flutter module with simplest flutter module(no pub dependencies) everything compiles and successfully uploads to AppStore.
|
Need integration tests that not just build the host app, but archive and validate it, too.
Xcode project settings > Build Settings > Embed Frameworks and remove FlutterPluginRegistratant.framework (or xcframework). Keep it in Link Binary With Libraries. This is a static framework, not a dynamic one...
I believe this one is because the plugins are being built instead of archived, and so aren't being created with bitcode. I'm about to put out a pull request to fix this one.
I believe this could happen if |
@jmagman, Does you(or team) need any tests or clarifications from me? |
@nailgilaziev Did you try my suggestions above? For option A (CocoaPods) try running For option B (generating frameworks) disable bitcode in your host app, and remove FlutterPluginRegistratant.framework (or xcframework) from the Embed Frameworks build phase. It's a static framework and so should be linked on and not embedded. Depending on what plugins you have, you may also need to do the same for them. Run:
to see which podspecs (CocoaPods metadata per plugin) should also be removed. |
@jmagman , sorry, I didn't saw you message when writing "help" :) my bad. I will try it now and get feedback today |
yeah, option B with excluded FlutterPluginRegistratant.framework (or xcframework) from Embed Frameworks phase is working! |
Added the warning here: |
@jmagman I believe that is important to add in website(docs) to recommend run When I create a new flutter module, flutter script will create a To reproduce: flutter create --template=module example
cd ios_app
pod install Because `echo "static const int Moo = 88;" | xcrun clang -x c -dynamiclib -o "#{app_framework_dylib}" -` When I use
For resolving this, run build with the mode that you need before, for example: flutter build ios --release --no-codesign When I use
Question: Doctor:
|
Flutter is not supported in the simulator (x86_64) in release mode. See #11754. |
Hello, just wanted to drop a quick note thanking you for the detail in this issue and the related PR. We are not flutter users, but came across similar iOS build errors in our app that links against frameworks from a different project. The frameworks are delivered after being built (not archived), so the fix to build with |
Where and how do you set this? |
|
Even I am facing this bitcode issue with webview_flutter plugin. macOS: 10.15.3 (Catalina) |
same |
#73072 is available on 1.26.0-12.0.pre, which is currently available on the master, dev, and beta channels. |
Hi @jmagman Sorry for ping on closed issue, but seems like I am still facing this even with latest stable build: flutter doctor -v output
We're developing the plugin which is added to the app where this is reproducible. You can find the app project in here in case you want to reproduce this. As described in our repo issue, using Release build configuration does the trick as workaround to be able to run the app on iOS device. Is this still supposed to be like that? Cheers |
@uerceg adjust/flutter_sdk#42 sounds like it's a normal Flutter app trying to consume your plugin, not necessarily add-to-app related. I just ran your sample app on a phone against Flutter stable and it built and launched fine in debug mode, I don't see any bitcode related warnings. It's running:
It doesn't even have bitcode enabled (which aligns with the default in a I recommend you file a new issue since it doesn't look related to add-to-app. |
Huh! Really interesting. Thank you for lightning speed check on this one. 🍺 I opened new issue for this. |
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 |
This is a next step of an issue described here #47930 and all preparation steps is the same.
But now before building
.xcframework
just add tomy_flutter
module some plugin dependencies.I added most popular shared_preferences plugin to
pubspec.yaml
and added example code tomain.dart
file.Next
produce
Applying them to xcode pbxproj -> build -> error
I checked this situation with another plugin - path_provider - result the same.
If I try to disable bitcode I get another error:
![headerr](https://user-images.githubusercontent.com/2749021/71697211-54583f00-2dc8-11ea-87c9-829a90a2d344.png)
with this logs:
IDEDistribution.critical.log
IDEDistribution.standard.log
IDEDistribution.verbose.log
The text was updated successfully, but these errors were encountered: