CEF.swift icon indicating copy to clipboard operation
CEF.swift copied to clipboard

CEFswift cannot be distributed as a self-contained framework

Open SyberToto opened this issue 5 years ago • 3 comments

Currently, CEFswift is using a module map to access Chromium Embedded framework itself, but that module map is not included in CEFswift.framework. If any user wants to use compiled CEFswift.framework directly, s/he will probably meet such error

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CEFswift.h"
        ^
~/playground/CEF.swift/Samples/CEFDemo/Library/Release/CEFswift.framework/Headers/CEFswift.h:19:9: error: module 'ChromiumEmbedded' not found
@import ChromiumEmbedded;
        ^
<unknown>:0: error: could not build Objective-C module 'CEFswift'

To reproduce this error, just compile CEFswift and remove the modules folder in CEFswift's source code, then compile the sample project.

I'm not sure if it's a common practice to include multiple module map into one single framework, or should we just define both CEFswift and ChromiumEmbedded in the same module map for CEFswift.framework itself? Anyway, I guess the compiled framework shouldn't rely on any source code.

SyberToto avatar May 14 '19 20:05 SyberToto

Anyway, I guess the compiled framework shouldn't rely on any source code.

Completely agree and it came to me as a surprise that the headers must be present, but right now I don't have a solution off the top of my head. I'll give it a thought soon but if you can come up with something, I'm gladly accepting PRs.

lvsti avatar May 17 '19 21:05 lvsti

Did you find the solution for it ?

umairzahid508 avatar Oct 21 '21 16:10 umairzahid508

Same issue. Can't be distributed. Hard link to the directory where it's built.

Hesham-Salama avatar May 12 '22 09:05 Hesham-Salama