feat: Align CocoaPods ObjC module name and kit imports#728
feat: Align CocoaPods ObjC module name and kit imports#728denischilik wants to merge 14 commits intomainfrom
Conversation
Made-with: Cursor
- Set mParticle-Apple-SDK pod module_name to mParticle_Apple_SDK_ObjC and mParticle-Apple-SDK-Umbrella to mParticle_Apple_SDK. - Replace __has_include mParticle_Apple_SDK/mParticle.h blocks with @import mParticle_Apple_SDK_ObjC in kit headers, sources, tests, and Obj-C SPM examples. Made-with: Cursor
PR SummaryMedium Risk Overview Introduces a new CocoaPods spec Reviewed by Cursor Bugbot for commit b1c007e. Bugbot is set up for automated code reviews on this repo. Configure here. |
📦 SDK Size Impact ReportMeasures how much the SDK adds to an app's size (with-SDK minus without-SDK).
➡️ SDK size impact change is minimal. Raw measurementsTarget branch (main): {"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1880,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1796,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6532}This PR: {"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1880,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1796,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6532} |
|
I would also add the umbrella podspec to the build-kits.yml workflow as well. And it needs to be added to the |
Set CLANG_ENABLE_MODULES on mParticle-Apptimize and mParticle-Adobe project configs. Replace @import mParticle_Apple_SDK_ObjC in kit public headers with explicit umbrella imports so builds succeed when modules are disabled or for Firebase/GA4 kits that need mParticle_Apple_SDK.h. Made-with: Cursor
Revert bracket imports; keep using the ObjC module import with Clang modules enabled where configured (e.g. Apptimize, Adobe Xcode projects). Made-with: Cursor
| @@ -1,5 +1,5 @@ | |||
| #import "AppDelegate.h" | |||
| @import mParticle_Apple_SDK; | |||
| #import <mParticle_Apple_SDK.h> | |||
There was a problem hiding this comment.
SPM examples use unreliable bare header import
Medium Severity
All SPM ObjC example apps changed from @import mParticle_Apple_SDK; (a proper Clang module import) to #import <mParticle_Apple_SDK.h> (a bare header import). In SPM, public headers from ObjC targets are namespaced under the module name (mParticle_Apple_SDK_ObjC), so a bare #import <mParticle_Apple_SDK.h> without the module prefix may not resolve in the header search paths. These examples are built in CI via build-kits.yml. The previous @import mParticle_Apple_SDK; or @import mParticle_Apple_SDK_ObjC; are the reliable approaches for SPM consumers.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 41a1722. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1a27d2e. Configure here.
| #import "mParticle.h" | ||
| #import "mParticle_Apple_SDK.h" | ||
| #endif | ||
| #import "mParticle.h" |
There was a problem hiding this comment.
Firebase kit headers inconsistently skip module import
Medium Severity
These four Firebase kit public headers use #import "mParticle.h" while every other kit in this PR was updated to use @import mParticle_Apple_SDK_ObjC;. The quote-style import in a public header is fragile — it depends on the consumer's header search path configuration rather than the module system. All four Firebase/Firebase GA4 kit headers (versions 11 and 12) have this same inconsistency.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 1a27d2e. Configure here.
|
this is part 1, part 2 here #733 |


Summary
mParticle-Apple-SDKpodmodule_nametomParticle_Apple_SDK_ObjCandmParticle-Apple-SDK-UmbrellatomParticle_Apple_SDKfor consistency with SPM product naming.__has_include/ bracket imports ofmParticle_Apple_SDK/mParticle.hwith@import mParticle_Apple_SDK_ObjC;across kit public headers, implementation files, tests, and Obj-C SPM examples.Testing
trunk check(pre-push hook) passed on pushed commit.Made with Cursor