I wrote an app in Flutter, and I am looking to add a native iOS today extension to it. I added the widget target but when I try to build the build fails because the app extension target can not find specific flutter libraries (which does not make sense since it wouldn't use them anyway).
From what I can gather, the xCode project is trying to include Flutter libraries with all targets?
Here is the error:
ld: warning: directory not found for option '-F/Users/nickmowen/Library/Developer/Xcode/DerivedData/Runner-egikkgpuyfdkbcconodjborapzme/Build/Products/Debug-iphoneos/share'
ld: warning: directory not found for option '-F/Users/nickmowen/Library/Developer/Xcode/DerivedData/Runner-egikkgpuyfdkbcconodjborapzme/Build/Products/Debug-iphoneos/shared_preferences'
ld: warning: directory not found for option '-F/Users/nickmowen/Library/Developer/Xcode/DerivedData/Runner-egikkgpuyfdkbcconodjborapzme/Build/Products/Debug-iphoneos/sqflite'
ld: warning: directory not found for option '-F/Users/nickmowen/Library/Developer/Xcode/DerivedData/Runner-egikkgpuyfdkbcconodjborapzme/Build/Products/Debug-iphoneos/url_launcher'
ld: framework not found FMDB
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas to fix this? Thanks!
Edit:
Going into Pods and enabling bitcode for each of the flutter libraries in there got rid of a bunch of errors, but then I am getting this error:
ld: '/Users/nickmowen/Library/Android/flutter/bin/cache/artifacts/engine/ios/Flutter.framework/Flutter' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/nickmowen/Library/Android/flutter/bin/cache/artifacts/engine/ios/Flutter.framework/Flutter' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This works for me.
Project -> Building Settings -> Enable Bitcode Set to 'NO'
Image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With