webview_cef
                                
                                
                                
                                    webview_cef copied to clipboard
                            
                            
                            
                        error in macos Android Studio and temporary fix
after read https://github.com/hlwhl/webview_cef/issues/11, i will update this, update 30 nov 2022, error :
clang: error: no such file or directory: 'Embedded' clang: error: no such file or directory: 'Framework'
u must clear "other linker flags" in Runner.xcodeproj
- open project folder, open macos folder
 - open Runner.xcodeproj, click Runner, open "Build Settings"
 - scroll and looking for "Lingking"
 - clearing "Other Linker Flags"
 

I have tested with s.vendored_frameworks = '"third/cef/Chromium Embedded Framework.framework"'. It is the reason caused the error2 you mentioned above.
Leave s.vendored_frameworks = 'third/cef/Chromium Embedded Framework.framework' as it is, delete 'Podfile.lock' and execute flutter clean in example folder, it works as intended. The framework file will be copy to app bundle automatically.
i got this error "clang: error: no such file or directory: 'Embedded' clang: error: no such file or directory: 'Framework' Command Ld failed with a nonzero exit code"
but when i run the new example there is no error. I don't know what's different in my example and my project.
after read this
clearing "other linker flag" and then its working. thank you
i will edit my text on above, maybe someone need this on english

Clearing Other Linker Flags is causing problems with some plugins, for example with firebase_analytics:
Launching lib/app/main.dart on macOS in debug mode...
Running pod install...
Building macOS application...
ld: warning: ignoring duplicate library '-lc++'
ld: warning: duplicate -rpath '/usr/lib/swift' ignored
ld: warning: duplicate -rpath '@executable_path/../Frameworks' ignored
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
  _FIRConsentStatusDenied, referenced from:
      -[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
      -[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
  _FIRConsentStatusGranted, referenced from:
      -[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
      -[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
  _FIRConsentTypeAdStorage, referenced from:
      -[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
  _FIRConsentTypeAnalyticsStorage, referenced from:
      -[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
  _OBJC_CLASS_$_FIRAnalytics, referenced from:
       in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
Exception: Build process failed
                                    
                                    
                                    
                                
I've fixed it locally without clearing Other Linker Flags using this quick and dirty Dart script:
import 'dart:io';
// Fix for package:webview_cef, see https://github.com/hlwhl/webview_cef/issues/27
void main() {
  const List paths = [
    'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig',
    'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig',
    'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig',
  ];
  for (final path in paths) {
    File(path).writeAsStringSync(
      File(path)
          .readAsStringSync()
          .replaceAll('-ObjC Embedded Framework ', '')
          .replaceAll('-framework "Chromium"', '-framework "Chromium Embedded Framework"'),
    );
  }
}
Assuming you will put this in tool/webview_cef_linker_fix.dart just run dart tool/webview_cef_linker_fix.dart in terminal when the build fails (probably only needed after each flutter pub get).
I've fixed it locally without clearing Other Linker Flags using this quick and dirty Dart script:
import 'dart:io'; // Fix for package:webview_cef, see https://github.com/hlwhl/webview_cef/issues/27 void main() { const List paths = [ 'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig', 'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig', 'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig', ]; for (final path in paths) { File(path).writeAsStringSync( File(path) .readAsStringSync() .replaceAll('-ObjC Embedded Framework ', '') .replaceAll('-framework "Chromium"', '-framework "Chromium Embedded Framework"'), ); } }Assuming you will put this in
tool/webview_cef_linker_fix.dartjust rundart tool/webview_cef_linker_fix.dartin terminal when the build fails (probably only needed after eachflutter pub get).
Did not work for me, do you have any solutions or possible reasons? I checked manually and did not see any of the replaced values in those files. @adrianjagielak
Did not work for me, do you have any solutions or possible reasons? I checked manually and did not see any of the replaced values in those files. @adrianjagielak
What is your current content of macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig?
Did not work for me, do you have any solutions or possible reasons? I checked manually and did not see any of the replaced values in those files. @adrianjagielak
What is your current content of macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig?
I'm sorry for the late late response but I just wanted to write this to clear up any doubts that may arise in the minds of those who will read it. I do not know what was the problem at that time but currently, I do not have any problem. Replacing the following (just as you did in your dart script) works without any problem for me also:
- .replaceAll('-ObjC Embedded Framework ', '')
 - .replaceAll('-framework "Chromium"', '-framework "Chromium Embedded Framework"')