The plugin we use for prebuilding CocoaPods, cocoapods-binary, still
allows Pods to add script phases to the final build...but we don't
actually *want* to run our build script when the pod is prebuilt.
This makes the CocoaPod self-contained at the cost of using a module
layout that SwiftPM cannot replicate. To keep local SwiftPM builds
working, an unstable Swift compiler flag is used to auto-import a
separate SignalFfi module (the way it used to work).
- Verify its correctness with build_ffi.sh --verify-ffi
- Regenerate with build_ffi.sh --generate-ffi
This simplifies the header search logic for both SwiftPM and
CocoaPods, as well as saving on build time by avoiding cbindgen.
The tweak to cbindgen.toml to prefer typedef-based structs and enums
is sidestepping an incompatibility between cbindgen 0.15.0 (which
GitHub has installed) and 0.16.0 (which allows reusing a release build
directory as well as a debug one).
We're not actually logging anything yet, but this will let us do so.
The logging is initialized using a static constructor so that clients
of SignalCoreKit don't have to do any additional setup. This requires
an ObjC file instead of a Swift one. (When running as a Swift package,
logs will just go to stderr via NSLog.)