Skip to content

Conversation

esrakartalOpt
Copy link

Summary

  • Add Multi-Region Support for Data Hosting

Test plan

  • Created and added new test cases

Issues

@esrakartalOpt esrakartalOpt requested a review from Copilot August 21, 2025 17:18
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds multi-region support for data hosting in the Optimizely Swift SDK, allowing events to be sent to different regional endpoints based on configuration.

  • Add Region enum with US and EU support to Project and ProjectConfig models
  • Update event building and dispatching to include region information and use appropriate endpoints
  • Modify user context creation to accept an optional region parameter

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
BatchEventBuilderTests_Region.swift Comprehensive test suite covering region functionality for impression/conversion events
OptimizelyUserContext.swift Add optional region parameter to user context initialization
OptimizelyUserContext+ObjC.swift Update Objective-C wrapper to support region parameter with US default
BatchEventBuilder.swift Include region information in event creation and encoding
ArrayEventForDispatch+Extension.swift Add region validation to event batching logic
ProjectConfig.swift Add computed property to get region with US default
Project.swift Add Region enum and region field to Project model
EventForDispatch.swift Add region-based endpoint selection and region parameter to initializer
BatchEvent.swift Add region field to batch event structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

pvcraven
pvcraven previously approved these changes Aug 25, 2025
Copy link

@pvcraven pvcraven left a comment

Choose a reason for hiding this comment

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

Adds region support. Might want to add a test case for what happens if a country other than "US" and "EU" is specified.

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