Skip to content

feat: Support Apptentive Region Settings - #812

Merged
BrandonStalnaker merged 1 commit into
mainfrom
feat/Apptentive-Region-Support
Aug 11, 2026
Merged

feat: Support Apptentive Region Settings#812
BrandonStalnaker merged 1 commit into
mainfrom
feat/Apptentive-Region-Support

Conversation

@BrandonStalnaker

Copy link
Copy Markdown
Collaborator

Background

  • ApptentiveKit 7 supports region-specific API endpoints at registration (us, eu, au) for latency and data residency. mParticle event integrations can now pass a serviceRegion setting (US, EU, AU, CA) with the Apptentive key/signature.
  • The apptentive-7 kit previously registered without a region, so everything defaulted to US and customers could not use EU/AU residency from the mParticle configuration.

What Has Changed

  • Reads serviceRegion from kit configuration and persists it with credentials so delayed +registerSDK still applies it.
  • Normalizes config values to ApptentiveKit region raw values (us/eu/au), defaults to us when missing, and falls back to us with a warning for unsupported values including CA (not in the current Apptentive iOS SDK).
  • Sets ApptentiveConfiguration.region before registerWithConfiguration:completion:.
  • Adds unit tests for default, EU/AU mapping, case-insensitivity, and CA/unknown fallback.

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

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

@BrandonStalnaker BrandonStalnaker self-assigned this Aug 10, 2026
@BrandonStalnaker
BrandonStalnaker requested a review from a team as a code owner August 10, 2026 20:14
@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes which Apptentive API region is used at registration, which affects latency and data residency; behavior is additive with US defaults and tested normalization.

Overview
The apptentive-7 kit now honors mParticle serviceRegion so ApptentiveKit 7 can register against US, EU, or AU endpoints instead of always defaulting to US.

On startup the kit reads and stores serviceRegion with the Apptentive key/signature (including delayed registerSDK paths), normalizes values via MPKitApptentiveNormalizeServiceRegion (us / eu / au, case-insensitive), and sets ApptentiveConfiguration.region before registerWithConfiguration:. Missing or blank config defaults to us; CA and unknown values fall back to us with console warnings. MPKitApptentiveUtils is exported from the umbrella header, and unit tests cover defaults, supported regions, and fallbacks.

Reviewed by Cursor Bugbot for commit 6b1e990. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown

📦 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 1.79 MB 1.79 MB +N/A
Executable Impact 848 bytes 848 bytes +N/A
XCFramework Size 6.49 MB 6.49 MB +N/A

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1920,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1836,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6644}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1920,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1836,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6644}

thomson-t
thomson-t previously approved these changes Aug 10, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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 08af45e. Configure here.

@denischilik denischilik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@BrandonStalnaker
BrandonStalnaker merged commit 84f3bcb into main Aug 11, 2026
79 checks passed
@BrandonStalnaker
BrandonStalnaker deleted the feat/Apptentive-Region-Support branch August 11, 2026 14:44
@cursor cursor Bot mentioned this pull request Aug 14, 2026
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.

3 participants