ivnsch / SwiftCharts

Easy to use and highly customizable charts library for iOS
Apache License 2.0
2.53k stars 410 forks source link

Framework is generated without full bitcode using provided Xcode project file #372

Closed jumbopilot closed 6 years ago

jumbopilot commented 6 years ago

Hi guys,

I'm struggling with the generation of the Swiftcharts 0.6.2 framework in Xcode10. All is working fine in my development environment, but when trying to archive my project (importing SwiftCharts) the following linker error is thrown:

ld: bitcode bundle could not be generated because '.../SwiftCharts.framework/SwiftCharts' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '.../SwiftCharts.framework/SwiftCharts' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

The framework (target SwiftCharts) can easily be generated using the provided xcode project file and these build settings: Deployment target 12.0 Devices iPhone App Extensions Allow App Extension API only Configuration Debug Build Option Enable Bitcode is set to Yes for the Framework target

The resulting framework file (SwiftCharts.framework) is then integrated per drag&drop in my project via Linked Frameworks and Libraries.

clang has the arguments: -arch arm64 -fembed-bitcode -bitcode_verify -bitcode_hide_symbols

Archiving the framework, as suggested, works, but from within the Organiser/Archives the 'Distribute Content' method does not generate any valuable content (empty) in the export directory.

Any hint?

jumbopilot commented 6 years ago

Fix it on my own: Added a User Defined Setting in the framework (SwiftCharts project) target's build setting for BITCODE_GENERATION_MODE=bitcode.