-
Notifications
You must be signed in to change notification settings - Fork 32
[FSSDK-11454] Swift - Add SDK Multi-Region Support for Data Hosting #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
…com/optimizely/swift-sdk into esra/FSSDK-11454_swift_data_hosting
Summary
Test plan
Issues