Version
3.57.0
Steps to Reproduce
- Use Xcode 26.4 (build 17E192) on macOS 26 (Darwin 25.3.0), Apple Silicon.
- Create or open an iOS app targeting iOS 26.0 with Swift 6.0.
- Add
posthog-ios as a Swift Package Manager dependency, version 3.57.0 (also reproduced on 3.50.0).
- Resolve packages:
xcodebuild -resolvePackageDependencies. Confirms PostHog 3.57.0 + transitive PLCrashReporter 1.12.2.
- Build for the iOS Simulator:
xcodebuild build -sdk iphonesimulator -arch arm64.
- Build fails inside the PostHog package's
phlibwebp C target while compiling vendor/libwebp/yuv_sse2.c (and the other yuv_*.c SIMD variants).
The clang invocation passes -fno-implicit-modules and -fmodule-file=_Builtin_stddef=…/ExplicitPrecompiledModules/_Builtin_stddef-…pcm, but that .pcm is never produced. Inspecting ~/Library/Developer/Xcode/DerivedData/<project>/SourcePackages/checkouts/posthog-ios/build/GeneratedModuleMaps-iphonesimulator/ shows only phlibwebp.modulemap and PostHog.modulemap — CrashReporter.modulemap is missing.
Two error forms repeat throughout the build log:
fatal error: module map file '.../GeneratedModuleMaps-iphonesimulator/CrashReporter.modulemap' not found
.../usr/lib/clang/21/include/stddef.h:89:2: fatal error: module file '.../ExplicitPrecompiledModules/_Builtin_stddef-…pcm' not found: module file not found
Tried (none fixed it): xcodebuild clean, deleting DerivedData and re-resolving packages, setting CLANG_ENABLE_EXPLICIT_MODULES = NO and SWIFT_ENABLE_EXPLICIT_MODULES = NO at both target and project level, bumping posthog-ios from 3.50.0 → 3.57.0. None propagate to the SPM package's own compilation. The only thing that unblocks the build is the global Xcode default defaults write com.apple.dt.Xcode IDESwiftPackagesEnableExplicitlyBuiltModules NO, which is not a per-project fix.
Expected Result
The PostHog SPM package builds cleanly under Xcode 26 with explicit module builds enabled (the default for iOS 26 / Xcode 26 projects), without requiring the consuming project to disable explicit modules globally. Specifically, the phlibwebp C target should compile vendor/libwebp/*.c against the SDK's standard headers without referencing _Builtin_stddef.pcm (or other _Builtin_*.pcm) files that the explicit-modules pipeline doesn't produce, and CrashReporter.modulemap should be available in the generated module-maps directory the build references.
Actual Result
Build fails inside the PostHog package's phlibwebp C target while compiling vendor/libwebp/yuv_sse2.c (and the other yuv_*.c SIMD variants). Two error forms repeat throughout the log:
fatal error: module map file '.../SourcePackages/checkouts/posthog-ios/build/GeneratedModuleMaps-iphonesimulator/CrashReporter.modulemap' not found
.../usr/lib/clang/21/include/stddef.h:89:2: fatal error: module file '.../SourcePackages/checkouts/posthog-ios/build/ExplicitPrecompiledModules/_Builtin_stddef-2WHHVO9DDU3HYIK85SE9PKH9I.pcm' not found: module file not found
89 | #include <__stddef_header_macro.h>
| ^
The clang invocation passes -fno-implicit-modules and -fmodule-file=_Builtin_stddef=…/ExplicitPrecompiledModules/_Builtin_stddef-…pcm — but the .pcm files are never produced inside the package's build directory. Listing ~/Library/Developer/Xcode/DerivedData/<project>/SourcePackages/checkouts/posthog-ios/build/GeneratedModuleMaps-iphonesimulator/ shows only phlibwebp.modulemap and PostHog.modulemap — CrashReporter.modulemap is missing entirely. The triggering include chain is vendor/libwebp/yuv_sse2.c → ph_yuv.h → ph_dsp.h → ph_cpu.h → <stddef.h>. The build terminates with ** BUILD FAILED ** with no PostHog code ever compiled successfully.
Version
3.57.0
Steps to Reproduce
posthog-iosas a Swift Package Manager dependency, version3.57.0(also reproduced on3.50.0).xcodebuild -resolvePackageDependencies. Confirms PostHog 3.57.0 + transitive PLCrashReporter 1.12.2.xcodebuild build -sdk iphonesimulator -arch arm64.phlibwebpC target while compilingvendor/libwebp/yuv_sse2.c(and the otheryuv_*.cSIMD variants).The clang invocation passes
-fno-implicit-modulesand-fmodule-file=_Builtin_stddef=…/ExplicitPrecompiledModules/_Builtin_stddef-…pcm, but that.pcmis never produced. Inspecting~/Library/Developer/Xcode/DerivedData/<project>/SourcePackages/checkouts/posthog-ios/build/GeneratedModuleMaps-iphonesimulator/shows onlyphlibwebp.modulemapandPostHog.modulemap—CrashReporter.modulemapis missing.Two error forms repeat throughout the build log:
Tried (none fixed it):
xcodebuild clean, deleting DerivedData and re-resolving packages, settingCLANG_ENABLE_EXPLICIT_MODULES = NOandSWIFT_ENABLE_EXPLICIT_MODULES = NOat both target and project level, bumping posthog-ios from 3.50.0 → 3.57.0. None propagate to the SPM package's own compilation. The only thing that unblocks the build is the global Xcode defaultdefaults write com.apple.dt.Xcode IDESwiftPackagesEnableExplicitlyBuiltModules NO, which is not a per-project fix.Expected Result
The PostHog SPM package builds cleanly under Xcode 26 with explicit module builds enabled (the default for iOS 26 / Xcode 26 projects), without requiring the consuming project to disable explicit modules globally. Specifically, the
phlibwebpC target should compilevendor/libwebp/*.cagainst the SDK's standard headers without referencing_Builtin_stddef.pcm(or other_Builtin_*.pcm) files that the explicit-modules pipeline doesn't produce, andCrashReporter.modulemapshould be available in the generated module-maps directory the build references.Actual Result
Build fails inside the PostHog package's
phlibwebpC target while compilingvendor/libwebp/yuv_sse2.c(and the otheryuv_*.cSIMD variants). Two error forms repeat throughout the log:The clang invocation passes
-fno-implicit-modulesand-fmodule-file=_Builtin_stddef=…/ExplicitPrecompiledModules/_Builtin_stddef-…pcm— but the.pcmfiles are never produced inside the package's build directory. Listing~/Library/Developer/Xcode/DerivedData/<project>/SourcePackages/checkouts/posthog-ios/build/GeneratedModuleMaps-iphonesimulator/shows onlyphlibwebp.modulemapandPostHog.modulemap—CrashReporter.modulemapis missing entirely. The triggering include chain isvendor/libwebp/yuv_sse2.c→ph_yuv.h→ph_dsp.h→ph_cpu.h→<stddef.h>. The build terminates with** BUILD FAILED **with no PostHog code ever compiled successfully.