Skip to content

Commit 7effb98

Browse files
denischiliknickolas-dimitrakasthomson-t
authored
feat: rename podspecs to umbrella + ObjC core (#733)
* Add mParticle-Apple-SDK-Umbrella.podspec for Swift umbrella (CocoaPods) Made-with: Cursor * ci: publish CocoaPods Swift → core → umbrella in release-publish Made-with: Cursor * Align CocoaPods ObjC module imports across kits - 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 * fix(kits): enable Clang modules for Apptimize and Adobe Xcode projects 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 * fix(kits): restore @import mParticle_Apple_SDK_ObjC in public headers Revert bracket imports; keep using the ObjC module import with Clang modules enabled where configured (e.g. Apptimize, Adobe Xcode projects). Made-with: Cursor * update imports in example apps * update pod lint * update release scripts * update workflows * reorder dependencies * fix(ci): Bump Umbrella podspec version in pod lint CI step Made-with: Cursor * revert headers * try to fix rokt lint * remove trailing \ * feat(cocoapods): rename podspecs to umbrella + ObjC core - mParticle-Apple-SDK.podspec: Swift umbrella (public pod name unchanged) - mParticle-Apple-SDK-ObjC.podspec: ObjC core (replaces former root podspec) - Remove mParticle-Apple-SDK-Umbrella.podspec - Update release workflows, release.sh, AGENTS.md, and Xcode project refs Made-with: Cursor * remove app extention --------- Co-authored-by: Nickolas Dimitrakas <nickolas.dimitrakas@rokt.com> Co-authored-by: Thomson Thomas <125323226+thomson-t@users.noreply.github.com>
1 parent b4d1c30 commit 7effb98

77 files changed

Lines changed: 137 additions & 256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-and-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: find . -path '*.podspec' -exec perl -pi -e 's/.+\.social_media_url.+//' {} \;
3939

4040
- name: Lint with CocoaPods
41-
run: pod lib lint --include-podspecs=mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec
41+
run: pod lib lint mParticle-Apple-SDK.podspec --include-podspecs="{mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}"
4242

4343
- name: Undo twitter change to podspec
4444
run: git checkout *.podspec

.github/workflows/build-kits.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ jobs:
4343
# TODO: Remove the sed bumps and --include-podspecs once mParticle-Apple-SDK v9.0
4444
# is published to CocoaPods CDN.
4545
sed -i '' 's/s\.version[[:space:]]*=.*/s.version = "9.0.0"/' mParticle-Apple-SDK.podspec
46+
sed -i '' 's/s\.version[[:space:]]*=.*/s.version = "9.0.0"/' mParticle-Apple-SDK-ObjC.podspec
4647
sed -i '' 's/s\.version[[:space:]]*=.*/s.version = "9.0.0"/' mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec
4748
4849
echo "Linting: ${{ matrix.kit.podspec }}"
4950
for attempt in 1 2 3; do
5051
pod lib lint "${{ matrix.kit.podspec }}" \
5152
--allow-warnings \
5253
--skip-import-validation \
53-
--include-podspecs="{mParticle-Apple-SDK.podspec,mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec}" \
54+
--include-podspecs="{mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}" \
5455
&& break
5556
[ $attempt -lt 3 ] && echo "Attempt $attempt failed, retrying in 60s..." && sleep 60 || exit 1
5657
done

.github/workflows/release-draft.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
run: |
7272
PODSPECS=(
7373
"mParticle-Apple-SDK.podspec"
74+
"mParticle-Apple-SDK-ObjC.podspec"
7475
"mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec"
7576
)
7677
while IFS= read -r spec; do
@@ -119,14 +120,14 @@ jobs:
119120
kits-path: Kits
120121

121122
# --- Commit, push, and create PR ---
122-
123123
- name: Commit version changes
124124
run: |
125125
git add \
126126
CHANGELOG.md \
127127
VERSION \
128128
Framework/Info.plist \
129129
mParticle-Apple-SDK.podspec \
130+
mParticle-Apple-SDK-ObjC.podspec \
130131
mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec \
131132
mParticle-Apple-SDK/MPIConstants.m \
132133
IntegrationTests/wiremock-recordings/mappings/*.json \

.github/workflows/release-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ jobs:
9393
if: env.DRY_RUN != 'true'
9494
env:
9595
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
96-
run: pod trunk push mParticle-Apple-SDK.podspec --allow-warnings --synchronous
96+
run: |
97+
set -euo pipefail
98+
PUSH_FLAGS=(--allow-warnings --synchronous)
99+
# Order matters: Swift pod → ObjC core (depends on Swift) → umbrella Swift (depends on ObjC).
100+
pod trunk push mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec "${PUSH_FLAGS[@]}"
101+
pod trunk push mParticle-Apple-SDK-ObjC.podspec "${PUSH_FLAGS[@]}"
102+
pod trunk push mParticle-Apple-SDK.podspec "${PUSH_FLAGS[@]}"
97103
98104
- name: Summary
99105
run: |

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You are a senior iOS SDK engineer specializing in customer data platform (CDP) S
4343
- Build: via Xcode scheme or `xcodebuild`.
4444
- Run unit tests: `Rokt_WidgetTests/` or via Xcode (Command + U).
4545
- Lint: `trunk check` (primary enforcement tool).
46-
- Pod lint: `pod lib lint mParticle-Apple-SDK.podspec`.
46+
- Pod lint: `pod lib lint mParticle-Apple-SDK.podspec --include-podspecs="{mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}"` (same as CI).
4747
- Size report: Check binary size impact via CI workflow.
4848
- Always validate changes with the full sequence in "Code style, quality, and validation" below before proposing or committing.
4949

@@ -104,7 +104,8 @@ You are a senior iOS SDK engineer specializing in customer data platform (CDP) S
104104
- `Scripts/` — Build, release, and utility scripts.
105105
- `xcframework.sh`, `check_coverage.sh`.
106106
- `Package.swift` — SPM manifest (swift-tools-version 5.5).
107-
- `mParticle-Apple-SDK.podspec` — CocoaPods spec (v8.41.1).
107+
- `mParticle-Apple-SDK.podspec` — CocoaPods umbrella (Swift sources; consumer-facing pod name `mParticle-Apple-SDK`).
108+
- `mParticle-Apple-SDK-ObjC.podspec` — CocoaPods ObjC core (`mParticle-Apple-SDK-ObjC`).
108109
- `PrivacyInfo.xcprivacy` — iOS privacy manifest.
109110
- `ARCHITECTURE.md` — Architecture documentation with sequence diagrams.
110111
- `CHANGELOG.md` — Release notes (extensive).
@@ -125,7 +126,7 @@ You are a senior iOS SDK engineer specializing in customer data platform (CDP) S
125126
1. `trunk check` — to lint, format-check, and catch style/quality issues.
126127
2. Build the SDK: via Xcode or `xcodebuild` for both iOS and tvOS.
127128
3. Run unit tests: both Objective-C and Swift test suites in `UnitTests/`.
128-
4. `pod lib lint mParticle-Apple-SDK.podspec` — verify CocoaPods spec is valid.
129+
4. `pod lib lint` with `--include-podspecs` for Swift + ObjC + umbrella (see Quick Start) — verify CocoaPods specs.
129130
5. If change affects code, assets, or dependencies: check coverage via `Scripts/check_coverage.sh`.
130131
- Only propose / commit changes if all steps pass cleanly.
131132
- If `trunk check` suggests auto-fixes, apply them first and re-validate.

Kits/adjust/adjust-5/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "AppDelegate.h"
2-
@import mParticle_Apple_SDK;
2+
#import <mParticle_Apple_SDK.h>
33
@import mParticle_Adjust;
44

55
@interface AppDelegate ()

Kits/adjust/adjust-5/Sources/mParticle-Adjust/include/MPKitAdjust.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#import <Foundation/Foundation.h>
2-
#if defined(__has_include) && __has_include(<mParticle_Apple_SDK/mParticle.h>)
3-
#import <mParticle_Apple_SDK/mParticle.h>
4-
#else
5-
#import "mParticle.h"
6-
#endif
2+
@import mParticle_Apple_SDK_ObjC;
73

84
extern NSString * _Nonnull const MPKitAdjustAttributionResultKey;
95
extern NSString * _Nonnull const MPKitAdjustErrorKey;

Kits/adobe/adobe-5/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "AppDelegate.h"
2-
#import "mParticle.h"
2+
#import <mParticle_Apple_SDK.h>
33
#import "MPKitAdobe.h"
44

55
@interface AppDelegate ()

Kits/adobe/adobe-5/Sources/mParticle-Adobe/MPIAdobe.m

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#import "MPIAdobe.h"
2-
#if defined(__has_include) && __has_include(<mParticle_Apple_SDK/mParticle.h>)
3-
#import <mParticle_Apple_SDK/mParticle.h>
4-
#else
5-
#import "mParticle.h"
6-
#endif
2+
@import mParticle_Apple_SDK_ObjC;
73

84
NSString *const MPIAdobeErrorKey = @"MPIAdobeErrorKey";
95

Kits/adobe/adobe-5/Sources/mParticle-Adobe/include/MPKitAdobe.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#import <Foundation/Foundation.h>
2-
#if defined(__has_include) && __has_include(<mParticle_Apple_SDK/mParticle.h>)
3-
#import <mParticle_Apple_SDK/mParticle.h>
4-
#else
5-
#import "mParticle.h"
6-
#endif
2+
@import mParticle_Apple_SDK_ObjC;
73

84
#pragma mark - MPIAdobeApi
95
@interface MPIAdobeApi : NSObject

0 commit comments

Comments
 (0)