This is how iOS and macOS work; the initializer is run on library load, and library load is delayed until the first symbol from that library is referenced. It's also explicitly permitted in the C++ ...