Skip to content

Conversation

@jamesnrokt
Copy link
Collaborator

Background

  • Updates workstation 9 with latest changes from main

What Has Changed

  • Merge main onto workstation 9

Screenshots/Video

  • N/A

Checklist

  • I have performed a self-review of my own code.

Additional Notes

  • N/A

Reference Issue (For employees only. Ignore if you are an outside contributor)

  • Closes N/A

jamesnrokt and others added 28 commits December 10, 2025 11:05
* refactor: Remove specific line numbers from test comments

- Made comments more maintainable by removing hardcoded line references
- Comments now reference source methods without specific line numbers

* Add integration test for getUserAudiences API

- Tests retrieving user audience memberships via Identity API
- Covers successful audience retrieval with mock data
- Verifies getAudiencesWithCompletionHandler method
- Includes enabled AudienceAPI flag in config for testing

* Add integration test for timed events

- Add testLogTimedEvent function to test begin/end timed event flow
- Test uses fixed 2-second delay for deterministic behavior
- Add WireMock recordings for timed event API call
- Verify event duration is properly calculated and sent

* Add integration test for logError

- Tests error logging with custom event info dictionary
- Verifies error events are properly sent with attributes (cause: slippery floor)
- Covers error severity level and exception handling attributes
- Adds iba (instruction base address) and el (event length) to dynamic fields list
- Fixes timed event mapping to ignore variable event length values

* Add integration test for logException

- Tests NSException logging functionality
- Covers exception name, reason, and SDK handling
- Based on ViewController.m logException method
- Fixes dynamic 'is' field in mapping-log-error.json to use ${json-unit.ignore}

* feat: Pass API keys via environment variables in integration tests

- Read MPARTICLE_API_KEY and MPARTICLE_API_SECRET from environment variables in main.swift
- Pass environment variables to simulator using SIMCTL_CHILD_ prefix in common.sh
- Add documentation for required environment variables in README.md
- Validate that environment variables are set before launching tests

* Add integration test for setUserAttribute

- Tests setting predefined user attributes (Age, Gender)
- Covers custom user attributes (Achieved Level)
- Verifies attributes are properly sent in events batch
- Related to SDKE-632

* Add integration test for incrementUserAttribute

- Tests incrementing a numeric user attribute by a specified value
- Covers setting initial attribute value and incrementing it
- Verifies both SET and INCREMENT operations are properly handled
- Related to user attribute management functionality

* - decrease timeout

* Add mapping for Rokt identify request

* Auto-create/remove proxy mappings in recorder/verification scripts

- Add create_proxy_mappings() function to common.sh
- Add remove_proxy_mappings() function to common.sh
- Call create_proxy_mappings in run_wiremock_recorder.sh
- Call remove_proxy_mappings in run_clean_integration_tests.sh
- Remove static proxy mapping files (now generated dynamically)

* Allow running verification tests without API keys

- Use fake keys (us1-00000000...) when env vars not set
- Real keys only required for recording mode
- Update README.md to document this behavior
- Add key validation in run_wiremock_recorder.sh

* Add integration test for setSessionAttribute

- Test sets session attribute 'Station' with value 'Classic Rock'
- Session attributes are sent in session end message (dt: se)
- Calls endSession() to trigger sending the attribute
- Added corresponding WireMock mapping and body files

* Add integration test for incrementSessionAttribute

- Test increments session attribute 'Song Count' by 1 (initial value 5 → 6)
- Requires beginSession() since previous test ends session
- Session attributes are sent in session end message (dt: se)
- Added two mappings: session start (ss) and session end (se)
- Based on ViewController.m lines 348-351

* Add integration test for CCPA consent state

Test 14: Toggle CCPA Consent
- Sets CCPA consent state on current user with all fields (consented, document, timestamp, location, hardwareId)
- Logs event to trigger upload that includes consent data in request body
- Verifies CCPA data is transmitted in 'con.ccpa.data_sale_opt_out' field

Based on ViewController.m toggleCCPAConsent method (lines 357-386)

* Add integration test for toggleGDPRConsent

- Test sets GDPR consent state on the current user
- Based on ViewController.m toggleGDPRConsent method (lines 388-416)
- Creates MPGDPRConsent with consented=true, document, timestamp, location, hardwareId
- Adds GDPR consent with purpose 'My GDPR Purpose' to MPConsentState
- Preserves existing CCPA consent state
- Logs event to trigger upload with consent state in 'con' field
- Uses static timestamp for deterministic testing

* Add integration test for logIDFA (modify iOS Advertiser ID)

- Test modifies user identity to add/update the iOS Advertiser ID via Identity API
- Uses static IDFA value for deterministic testing
- Based on ViewController.m logIDFA method (lines 418-429)
- Added corresponding WireMock mapping and body files

* Add integration test for setATTStatus (App Tracking Transparency)

- Test sets ATT status to 'authorized' with static timestamp
- Based on ViewController.m requestIDFA method (lines 431-476)
- ATT status is sent in device info ('atts' field)
- ATT timestamp is sent in device info ('attt' field)
- Added corresponding WireMock mapping and body files
* Manual APIs: To allow customers to manually forward these calls to mParticle in case they don’t want it to proxy.
* Backward Compatibility: We should maintain full support for AppDelegate-based apps while adding SceneDelegate support.

Co-authored-by: Denis Chilik <[email protected]>
* Update max parrallel

* chore: Change setup xcode to use 3rd party action

* Setup specified simulator

* Add fail fast false so all tests run and we can see failures
* chore(ci): add GitHub Actions workflow for integration tests

- Add integration-tests.yml workflow with Colima/Docker setup
- Support headless simulator mode for CI environments
- Upload artifacts (WireMock logs, requests) on test failures

* fix(ci): use Java WireMock instead of Docker for macOS runners

- Replace Colima/Docker with standalone WireMock JAR
- Add run_integration_tests_ci.sh for CI-specific execution
- Use sudo for binding to privileged HTTPS port 443

* - update ranches

* fix(mappings): make timezone field dynamic for CI compatibility

* fix(mappings): make timezone name field dynamic for CI compatibility

* test: change events API version to v3 (intentional break)

* - revert test commit

* - run for all PRs

* Fix testIncrementSessionAttribute timing issue in CI

Replace sleep(1) with uploadWaiter.wait() after beginSession() to ensure
session start is uploaded as a separate request before session end.
This prevents SDK from batching both messages into one request in CI
where execution is faster.

* - address github comments
* chore: Align concurrency and branch rules

* Use same simulator setup in secondary platform tests

* Add timeout for native tests
* chore: Replace CPP Kit Bracket code

* Update max parrallel

* Use setup-xcode action

* Revert "Use setup-xcode action"

This reverts commit 0ffa2c9.
…nException (#469)

fix: handle NSInvalidUnarchiveOperationException on SDK upgrade
* fix: Rokt User Attribute Mapping

* code improvements suggested by Nick

* feat: Add IDFA and IDFV Support for FilteredMParticleUser

* fix: Simulator not found failing CI

* Update .github/workflows/native-tests.yml

Co-authored-by: Nickolas Dimitrakas <[email protected]>

---------

Co-authored-by: Nickolas Dimitrakas <[email protected]>
fix: Use awk for Changelog
* chore: Trunk fixes

* Manual fixes
* fix: Quotes and braces

* Quotes

* Fix sudo and regex quotes
* chore: Release 8.41.0

* Exclude CHANGELOG.md from linting

* fix Integrations Tests
* ci: Add Manual Release Workflow

* Improvements from CR
chore(release): 8.41.0

Updates version to 8.41.0 in:
- CHANGELOG.md
- Framework/Info.plist
- Package.swift
- mParticle-Apple-SDK.podspec
- mParticle-Apple-SDK/MPConstants.swift
- mParticle-Apple-SDK/MPIConstants.m
- mParticle_Apple_SDK.json
chore(release): 8.41.1

Updates version to 8.41.1 in:
- CHANGELOG.md
- Framework/Info.plist
- Package.swift
- mParticle-Apple-SDK.podspec
- mParticle-Apple-SDK/MPConstants.swift
- mParticle-Apple-SDK/MPIConstants.m
- mParticle_Apple_SDK.json
* chore: Fix common trunk issues

* Update version number in test

* Bump integration test versions

* Bump integration test versions

* Correct all versions
chore: Fix CHANGELONG.md entry for 8.41.0

Co-authored-by: James Newman <[email protected]>
* ci: Generate size reports

* Cleanup

* Add temp push trigger

* Change output

* Update to report impact

* Build from source

* Correct swift-tools-version

* Remove temporary push trigger

* Create README.md

* Add comment ID so comments are correctly updated

* Report xcframework size

* Remove duplication of report data

* Remove usage of head ref

* Add diagram to explain the flow
* chore: bump actions/checkout from 5 to 6

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Trunk fixes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Newman <[email protected]>
* - we should update mappings during the release process

* - formatting

* - address trunk checks

* - move mappings update into the separate file and verify that it works correctly

* - apply trunk fixes
* chore: bump actions/upload-artifact from 5 to 6

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: bump actions/upload-artifact from 5 to 6

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update integration-tests.yml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Newman <[email protected]>
@jamesnrokt jamesnrokt requested a review from a team as a code owner January 20, 2026 21:46
@github-actions
Copy link

github-actions bot commented Jan 20, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact N/A 1.67 MB N/A (new baseline)
Executable Impact N/A 896 bytes N/A (new baseline)
XCFramework Size N/A 9.12 MB N/A (new baseline)

ℹ️ Size test app not found on target branch. This is the new baseline.

Raw measurements

Target branch (workstation/9.0-Release):

{"sdk_impact_kb": 0, "sdk_executable_impact_bytes": 0, "xcframework_size_kb": 0}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1792,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1708,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9336}

Copy link
Contributor

@nickolas-dimitrakas nickolas-dimitrakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jamesnrokt jamesnrokt merged commit 20a9bc4 into workstation/9.0-Release Jan 21, 2026
12 of 13 checks passed
@jamesnrokt jamesnrokt deleted the chore/update-workstation-9.0-from-main branch January 21, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants