Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 46 additions & 17 deletions .github/workflows/build-kits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ jobs:
- name: Pod Lib Lint
run: |
echo "Linting: ${{ matrix.kit.podspec }}"
INCLUDES="mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec"
if [ -n "${{ matrix.kit.pod_lint_include_podspecs }}" ]; then
INCLUDES="${INCLUDES},${{ matrix.kit.pod_lint_include_podspecs }}"
fi
INCLUDES="{${INCLUDES}}"
for attempt in 1 2 3; do
pod lib lint "${{ matrix.kit.podspec }}" \
--allow-warnings \
--include-podspecs="{mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}" \
--include-podspecs="$INCLUDES" \
Comment thread
cursor[bot] marked this conversation as resolved.
&& break
[ $attempt -lt 3 ] && echo "Attempt $attempt failed, retrying in 60s..." && sleep 60 || exit 1
done
Expand Down Expand Up @@ -69,35 +74,57 @@ jobs:
- name: Resolve SPM dependencies
run: |
SCHEME=$(echo '${{ toJson(matrix.kit.schemes) }}' | jq -r '.[0].scheme')
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/*.xcodeproj | head -1)"

xcodebuild -resolvePackageDependencies -project "$PROJECT" \
-scheme "$SCHEME" -derivedDataPath DerivedData
LOCAL_PATH="${{ matrix.kit.local_path }}"
if compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
xcodebuild -resolvePackageDependencies -project "$PROJECT" \
-scheme "$SCHEME" -derivedDataPath DerivedData
else
# Swift package without .xcodeproj (see rokt-sdk-plus-ios).
(cd "$LOCAL_PATH" && xcodebuild -resolvePackageDependencies -scheme "$SCHEME" -derivedDataPath "$OLDPWD/DerivedData")
fi

- name: Build kit schemes
run: |
LOCAL_PATH="${{ matrix.kit.local_path }}"
echo '${{ toJson(matrix.kit.schemes) }}' | jq -c '.[]' | while IFS= read -r ENTRY; do
SCHEME=$(echo "$ENTRY" | jq -r '.scheme')
DEST=$(echo "$ENTRY" | jq -r '.destination')

if [ -d "${{ matrix.kit.local_path }}/$SCHEME.xcodeproj" ]; then
PROJECT="${{ matrix.kit.local_path }}/$SCHEME.xcodeproj"
if [ -d "$LOCAL_PATH/$SCHEME.xcodeproj" ]; then
PROJECT="$LOCAL_PATH/$SCHEME.xcodeproj"
XB=(xcodebuild build -project "$PROJECT" -scheme "$SCHEME")
elif compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
XB=(xcodebuild build -project "$PROJECT" -scheme "$SCHEME")
else
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/*.xcodeproj | head -1)"
XB=(xcodebuild build -scheme "$SCHEME")
fi

xcodebuild build -project "$PROJECT" -scheme "$SCHEME" \
-destination "generic/platform=$DEST" \
-derivedDataPath DerivedData \
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

xcodebuild build -project "$PROJECT" -scheme "$SCHEME" \
-destination "generic/platform=$DEST Simulator" \
-derivedDataPath DerivedData \
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
if compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
"${XB[@]}" \
-destination "generic/platform=$DEST" \
-derivedDataPath DerivedData \
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
"${XB[@]}" \
-destination "generic/platform=$DEST Simulator" \
-derivedDataPath DerivedData \
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
else
# Package.swift only (e.g. rokt-sdk-plus-ios): xcodebuild must run from the package root; no -project.
(cd "$LOCAL_PATH" && "${XB[@]}" \
Comment thread
BrandonStalnaker marked this conversation as resolved.
-destination "generic/platform=$DEST" \
-derivedDataPath "$OLDPWD/DerivedData" \
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO)
(cd "$LOCAL_PATH" && "${XB[@]}" \
-destination "generic/platform=$DEST Simulator" \
-derivedDataPath "$OLDPWD/DerivedData" \
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO)
fi
done

- name: Build SPM-Swift-Example
if: ${{ matrix.kit.skip_example_builds != true }}
run: |
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/Example/SPM-Swift-Example/*.xcodeproj | head -1)"
xcodebuild build -project "$PROJECT" -scheme SPM-Swift-Example \
Expand All @@ -106,6 +133,7 @@ jobs:
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

- name: Build SPM-Objc-Example
if: ${{ matrix.kit.skip_example_builds != true }}
run: |
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/Example/SPM-Objc-Example/*.xcodeproj | head -1)"
xcodebuild build -project "$PROJECT" -scheme SPM-Objc-Example \
Expand All @@ -114,6 +142,7 @@ jobs:
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

- name: Run SPM tests
if: ${{ matrix.kit.skip_spm_tests != true }}
run: |
cd ${{ matrix.kit.local_path }}
PACKAGE=$(grep -E '^\s*name:' Package.swift | head -1 | sed 's/.*"\([^"]*\)".*/\1/')
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ jobs:
run: |
sed -i '' "s/kMPRoktKitVersion = @\"[^\"]*\"/kMPRoktKitVersion = @\"${VERSION}\"/" \
Kits/rokt/rokt/Sources/mParticle-Rokt/MPKitRokt.m
sed -i '' 's/public static let version = "[^"]*"/public static let version = "'"${VERSION}"'"/' \
Kits/rokt-sdk-plus/rokt-sdk-plus-ios/Sources/RoktSDKPlus/RoktSDKPlus.swift
sed -i '' "s/kLibVersion = @\"[^\"]*\"/kLibVersion = @\"${VERSION}\"/" \
Kits/clevertap/clevertap-7/Sources/mParticle-CleverTap/MPKitCleverTap.m
sed -i '' "s/registerPluginName:@\"mParticleKit\" version:@\"[^\"]*\"/registerPluginName:@\"mParticleKit\" version:@\"${VERSION}\"/" \
Expand Down Expand Up @@ -157,7 +159,7 @@ jobs:
### Files updated
- All podspecs (core, Swift, kits) → \`${VERSION}\`
- \`mParticle-Apple-SDK/MPIConstants.m\`
- Kit source version strings (Rokt \`kMPRoktKitVersion\`, CleverTap \`kLibVersion\`, Branch \`registerPluginName\`)
- Kit source version strings (Rokt \`kMPRoktKitVersion\`, RoktSDKPlus \`RoktSDKPlus.version\`, CleverTap \`kLibVersion\`, Branch \`registerPluginName\`)
- \`Framework/Info.plist\`
- Integration test mappings
- Kit \`Package.swift\`: \`let version\` → core SDK SPM pin (major bumps only)
Expand Down
49 changes: 27 additions & 22 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ jobs:

if [ -d "$LOCAL_PATH/$SCHEME.xcodeproj" ]; then
PROJECT="$LOCAL_PATH/$SCHEME.xcodeproj"
else
elif compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
else
PROJECT=""
fi

ARCHIVE_DEVICE="archives/${MODULE}-${DEST}"
Expand All @@ -184,10 +186,19 @@ jobs:
;;
esac

xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
-destination "$PLATFORM_DEVICE" -archivePath "$ARCHIVE_DEVICE" $BUILD_SETTINGS
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
-destination "$PLATFORM_SIM" -archivePath "$ARCHIVE_SIM" $BUILD_SETTINGS
REPO_ROOT="$PWD"
if [ -n "$PROJECT" ]; then
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
-destination "$PLATFORM_DEVICE" -archivePath "$ARCHIVE_DEVICE" $BUILD_SETTINGS
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
-destination "$PLATFORM_SIM" -archivePath "$ARCHIVE_SIM" $BUILD_SETTINGS
else
# Package.swift only: archive from package root; archive paths stay under repo $REPO_ROOT.
(cd "$LOCAL_PATH" && xcodebuild archive -scheme "$SCHEME" \
Comment thread
BrandonStalnaker marked this conversation as resolved.
-destination "$PLATFORM_DEVICE" -archivePath "$REPO_ROOT/$ARCHIVE_DEVICE" $BUILD_SETTINGS)
(cd "$LOCAL_PATH" && xcodebuild archive -scheme "$SCHEME" \
-destination "$PLATFORM_SIM" -archivePath "$REPO_ROOT/$ARCHIVE_SIM" $BUILD_SETTINGS)
fi

XCFRAMEWORK_ARGS+=" -archive ${ARCHIVE_DEVICE}.xcarchive -framework ${MODULE}.framework"
XCFRAMEWORK_ARGS+=" -archive ${ARCHIVE_SIM}.xcarchive -framework ${MODULE}.framework"
Expand All @@ -210,7 +221,7 @@ jobs:
runs-on: macOS-latest
needs: [load-matrix, build-kits, release-core-sdk]
env:
DEST_ORG: mparticle-integrations
DEST_ORG: ${{ matrix.kit.dest_org || 'mparticle-integrations' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -242,7 +253,7 @@ jobs:
with:
client-id: ${{ secrets.SDK_RELEASE_GITHUB_CLIENT_ID }}
private-key: ${{ secrets.SDK_RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ env.DEST_ORG }}
owner: ${{ matrix.kit.dest_org || 'mparticle-integrations' }}
Comment thread
BrandonStalnaker marked this conversation as resolved.
repositories: ${{ matrix.kit.dest_repo }}
permission-contents: write

Expand Down Expand Up @@ -359,21 +370,15 @@ jobs:
- name: Wait for core SDK on CocoaPods CDN
run: |
VERSION=$(head -n 1 VERSION | tr -d '\r\n ')
echo "⏳ Polling CocoaPods for mParticle-Apple-SDK $VERSION..."
MAX_ATTEMPTS=30
for i in $(seq 1 $MAX_ATTEMPTS); do
FOUND=$(curl -sf "https://trunk.cocoapods.org/api/v1/pods/mParticle-Apple-SDK" \
| jq -r --arg v "$VERSION" '.versions[] | select(.name == $v) | .name' 2>/dev/null || true)
if [ "$FOUND" = "$VERSION" ]; then
echo "✅ mParticle-Apple-SDK $VERSION confirmed on CocoaPods trunk"
echo "⏳ Waiting 5 minutes for CDN propagation before publishing kits..."
sleep 300
exit 0
fi
[ "$i" -eq "$MAX_ATTEMPTS" ] && echo "❌ Timed out after 30 minutes" && exit 1
echo " Attempt $i/$MAX_ATTEMPTS: Not yet available. Retrying in 60s..."
sleep 60
done
. Scripts/pod_push.sh
wait_for_pod_version_on_trunk mParticle-Apple-SDK "$VERSION" 300

- name: Wait for mParticle-Rokt on CocoaPods CDN (RoktSDKPlus)
if: matrix.kit.name == 'rokt-sdk-plus-ios'
run: |
VERSION=$(head -n 1 VERSION | tr -d '\r\n ')
. Scripts/pod_push.sh
wait_for_pod_version_on_trunk mParticle-Rokt "$VERSION"

- name: Publish to CocoaPods
if: matrix.kit.podspec != ''
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ For each release, **Core** (main SDK) changes are listed first, followed by **Ki

### Kits

#### Added

- **Rokt SDK+ (`RoktSDKPlus`)** — Umbrella Swift package and CocoaPods pod at `Kits/rokt-sdk-plus/rokt-sdk-plus-ios`, versioned with the core SDK and mirrored to [ROKT/rokt-sdk-plus-ios](https://github.com/ROKT/rokt-sdk-plus-ios).

#### Rokt

##### Changed
Expand Down
18 changes: 18 additions & 0 deletions Kits/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,24 @@
}
]
},
{
"name": "rokt-sdk-plus-ios",
"local_path": "Kits/rokt-sdk-plus/rokt-sdk-plus-ios",
"podspec": "Kits/rokt-sdk-plus/rokt-sdk-plus-ios/RoktSDKPlus.podspec",
"dest_repo": "rokt-sdk-plus-ios",
"dest_org": "ROKT",
"spm_package_only": true,
"skip_example_builds": true,
"skip_spm_tests": true,
"pod_lint_include_podspecs": "Kits/rokt/rokt/mParticle-Rokt.podspec",
"schemes": [
{
"scheme": "RoktSDKPlus",
"module": "RoktSDKPlus",
"destination": "iOS"
}
]
},
{
"name": "singular-12",
"local_path": "Kits/singular/singular-12",
Expand Down
Loading
Loading