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
18 changes: 14 additions & 4 deletions .github/workflows/build-kits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,25 @@ 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"
INCLUDES=""
if [ "${{ matrix.kit.pod_lint_standalone }}" != "true" ]; then
INCLUDES="mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec"
fi
if [ -n "${{ matrix.kit.pod_lint_include_podspecs }}" ]; then
INCLUDES="${INCLUDES},${{ matrix.kit.pod_lint_include_podspecs }}"
if [ -n "$INCLUDES" ]; then
INCLUDES="${INCLUDES},${{ matrix.kit.pod_lint_include_podspecs }}"
else
INCLUDES="${{ matrix.kit.pod_lint_include_podspecs }}"
fi
fi
INCLUDE_ARGS=()
if [ -n "$INCLUDES" ]; then
INCLUDE_ARGS=(--include-podspecs="{${INCLUDES}}")
fi
INCLUDES="{${INCLUDES}}"
for attempt in 1 2 3; do
pod lib lint "${{ matrix.kit.podspec }}" \
--allow-warnings \
--include-podspecs="$INCLUDES" \
"${INCLUDE_ARGS[@]}" \
&& break
[ $attempt -lt 3 ] && echo "Attempt $attempt failed, retrying in 60s..." && sleep 60 || exit 1
done
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 @@ -94,6 +94,8 @@ jobs:
Kits/rokt-sdk-plus/rokt-sdk-plus-ios/Sources/RoktSDKPlus/RoktSDKPlus.swift
sed -i '' 's/^let version = "[^"]*"/let version = "'"${VERSION}"'"/' \
Kits/rokt-sdk-plus/rokt-sdk-plus-ios/Package.swift
sed -i '' 's/^let version = "[^"]*"/let version = "'"${VERSION}"'"/' \
Kits/rokt-payment-extension/rokt-payment-extension-ios/Package.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 @@ -166,7 +168,7 @@ jobs:
- Kit source version strings (Rokt \`kMPRoktKitVersion\`, RoktSDKPlus \`RoktSDKPlus.version\`, CleverTap \`kLibVersion\`, Branch \`registerPluginName\`)
- \`Framework/Info.plist\`
- Integration test mappings
- Kit \`Package.swift\`: \`let version\` for \`Kits/rokt-sdk-plus/rokt-sdk-plus-ios\` on every release; other kits’ \`let version\` only on **major** bumps (core SDK SPM pin)
- Kit \`Package.swift\`: \`let version\` for \`Kits/rokt-sdk-plus/rokt-sdk-plus-ios\` and \`Kits/rokt-payment-extension/rokt-payment-extension-ios\` on every release; other kits’ \`let version\` only on **major** bumps (core SDK SPM pin)

---

Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ jobs:
id: push
run: |
DEST_URL="https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/${{ env.DEST_ORG }}/${{ matrix.kit.dest_repo }}.git"
git push "$DEST_URL" "split/${{ matrix.kit.name }}:main"
if [ "${{ matrix.kit.mirror_force_push_main }}" = "true" ]; then
git push --force "$DEST_URL" "split/${{ matrix.kit.name }}:main"
else
git push "$DEST_URL" "split/${{ matrix.kit.name }}:main"
fi
echo "sha=$(git rev-parse split/${{ matrix.kit.name }})" >> $GITHUB_OUTPUT

- name: Create GitHub release on mirror
Expand Down Expand Up @@ -389,6 +393,13 @@ jobs:
. Scripts/pod_push.sh
wait_for_pod_version_on_trunk mParticle-Rokt "$VERSION"

- name: Wait for RoktPaymentExtension 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 RoktPaymentExtension "$VERSION"

- name: Publish to CocoaPods
if: matrix.kit.podspec != ''
env:
Expand Down
22 changes: 21 additions & 1 deletion Kits/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,17 +393,37 @@
}
]
},
{
"name": "rokt-payment-extension-ios",
"local_path": "Kits/rokt-payment-extension/rokt-payment-extension-ios",
"podspec": "Kits/rokt-payment-extension/rokt-payment-extension-ios/RoktPaymentExtension.podspec",
"dest_repo": "rokt-payment-extension-ios",
"dest_org": "ROKT",
"mirror_force_push_main": true,
"pod_lint_standalone": true,
"spm_package_only": true,
"skip_xcframework": true,
"skip_example_builds": true,
"schemes": [
{
"scheme": "RoktPaymentExtension",
"module": "RoktPaymentExtension",
"destination": "iOS"
}
]
},
{
"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",
"mirror_force_push_main": true,
"spm_package_only": true,
"skip_xcframework": true,
"skip_example_builds": true,
"skip_spm_tests": true,
"pod_lint_include_podspecs": "Kits/rokt/rokt/mParticle-Rokt.podspec",
"pod_lint_include_podspecs": "Kits/rokt/rokt/mParticle-Rokt.podspec,Kits/rokt-payment-extension/rokt-payment-extension-ios/RoktPaymentExtension.podspec",
"schemes": [
{
"scheme": "RoktSDKPlus",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.DS_Store
/.build
Package.resolved
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
.idea

# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa

# Bundler
.bundle

# CocoaPods
Pods/

aws/
vendor/
repositories
checkouts
workspace-state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
default: true
MD013: false
MD040: false
117 changes: 117 additions & 0 deletions Kits/rokt-payment-extension/rokt-payment-extension-ios/.swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
--swiftversion 5.9
--acronyms ID,URL,UUID
--allman false
--anonymousforeach convert
--assetliterals visual-width
--asynccapturing
--beforemarks
--binarygrouping none
--callsiteparen default
--categorymark "MARK: %c"
--classthreshold 0
--closingparen balanced
--closurevoid remove
--commas inline
--complexattrs preserve
--computedvarattrs preserve
--condassignment after-property
--conflictmarkers reject
--dateformat system
--decimalgrouping none
--doccomments before-declarations
--elseposition same-line
--emptybraces no-space
--enumnamespaces always
--enumthreshold 0
--exponentcase lowercase
--exponentgrouping disabled
--extensionacl on-extension
--extensionlength 0
--extensionmark "MARK: - %t + %c"
--fractiongrouping disabled
--fragment false
--funcattributes preserve
--generictypes
--groupedextension "MARK: %c"
--guardelse auto
--header ignore
--hexgrouping none
--hexliteralcase uppercase
--ifdef no-indent
--importgrouping alpha
--indent 4
--indentcase false
--indentstrings false
--initcodernil false
--lifecycle
--lineaftermarks true
--linebreaks lf
--markcategories true
--markextensions always
--marktypes always

# Wrap lines that exceed the specified maximum width.
--rules wrap
--maxwidth 130

--modifierorder
--nevertrailing
--nilinit remove
--noncomplexattrs
--nospaceoperators ...,..<,/
--nowrapoperators
--octalgrouping none
--onelineforeach ignore
--operatorfunc spaced
--organizationmode visibility
--organizetypes actor,class,enum,struct
--patternlet inline
--ranges spaced
--redundanttype infer-locals-only
--self remove
--selfrequired
--semicolons never
--shortoptionals except-properties
--smarttabs enabled
--someany true
--storedvarattrs preserve
--stripunusedargs closure-only
--structthreshold 0
--tabwidth unspecified
--throwcapturing
--timezone system
--trailingclosures
--trimwhitespace always
--typeattributes preserve
--typeblanklines remove
--typedelimiter space-after
--typemark "MARK: - %t"
--voidtype void
--wraparguments preserve
--wrapcollections preserve
--wrapconditions preserve
--wrapeffects preserve
--wrapenumcases always
--wrapparameters default
--wrapreturntype preserve
--wrapternary default
--wraptypealiases preserve
--xcodeindentation disabled
--yodaswap always
--rules blankLinesAroundMark
--rules isEmpty
# Replace consecutive blank lines with a single blank line.
--rules consecutiveBlankLines

# Replace consecutive spaces with a single space.
--rules consecutiveSpaces
--rules spaceAroundOperators
--operatorfunc spaced

# Add or remove space around parentheses.
--rules spaceAroundParens
--rules spaceInsideParens

# Mark unused function arguments with _.
--rules unusedArguments
--stripunusedargs closure-only
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
disabled_rules:
- identifier_name
- force_cast
- weak_delegate
- function_parameter_count
- file_length
- type_body_length
- cyclomatic_complexity
- function_body_length

nesting:
type_level:
warning: 3
error: 6

line_length:
warning: 130
error: 160
ignores_comments: true
ignores_urls: true

type_name:
min_length: 1
max_length: 40

excluded:
- Tests
- .build
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
extends: default

rules:
truthy:
check-keys: false
document-start: disable
line-length:
max: 200
comments:
min-spaces-from-content: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# License

Copyright 2024 Rokt Pte Ltd

Licensed under the Rokt Software Development Kit (SDK) Terms of Use
Version 2.0 (the "License")

You may not use this file except in compliance with the License.

You may obtain a copy of the License at <https://rokt.com/sdk-license-2-0/>
Loading
Loading