Merged
Conversation
staging to main for 5.5.2
* Implement event history insert and insertIfNotExists consequence support (#1121) * Implement event history insert and insertIfNotExists consequence support * Add method stubs * Update API dump * Clean up TestableExtensionRuntime * Add early exit check for schema consequence, update log messages and levels * Dispatch consequence event for insert and insertIfNotExists success * Add Event to EventHistoryRequest conversion support and remove eventExists API and update usages * Add nil case handler calls for recordHistoricalEvent and getHistoricalEvents * Add weak self to closures and update LOG_PREFIX to static instance * Update log levels from error to warning * Extract strings from dictionary access logic into constants * Add method call and result configuration support for recordHistoricalEvent method in TestableExtensionRuntime * Fix early exit case for no keys specified to record in consequence * Remove support for the `keys` property * Add back content empty check early exit, improve logging detail * Extract repeated log info into variable * Update eventHistoryOperation logic to align with Android, clean up unused constants (#1133) * Create protocols for EventHistory and EventHistoryDatabase and update EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one # Conflicts: # AEPCore.xcodeproj/project.pbxproj # AEPCore/Mocks/PublicTestUtils/MockEventHistoryDatabase.swift # AEPCore/Tests/EventHubTests/EventHubEventHistoryTests.swift # AEPCore/Tests/TestHelpers/MockEventHistory.swift * Fix merge * Fix event history operation `insertIfNotExists` logical error and race with insert operation (#1134) * Fix insertIfNotExists escaping closure operation race with insert operation * Remove max time deadline for getHistoricalEvents in historical event consequence processing Add check for database error value in CONSEQUENCE_EVENT_HISTORY_OPERATION_INSERT_IF_NOT_EXISTS logic and improve logging around this value * Remove unused constant * Split log lines * Update EventHub's eventHistory reference from var to let * Update protocol names and add storage property to EventHistoryProvider Update EventHistory init to accommodate this read only access to the backing storage * Delete incorrectly renamed file * Pod update * Add test coverage and support implementation for EventHub EventHistory related method tests * Add test coverage for new Event toEventHistoryRequest * Add documentation notes to keep initializers consistent * Create protocols for EventHistory and EventHistoryDatabase and update EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one * Fix merge * Fix merge * Fix merge - remove old EventHistoryDatabaseService.swift and EventHistoryService.swift * Update MockEventHistory to conform to EventHistoryProvider * Fix rebase errors * Update Event_EventHistoryRequestTests to better test nested structures * Update EventHubEventHistoryTests to clean up event names and descriptions * Run pod update * Create rules engine test base class and implement test cases for historical event operation # Conflicts: # AEPCore.xcodeproj/project.pbxproj * Clean up code * Add event record, dispatch, and payload validation * Clean up comments * Update insertIfNotExists test to check the database error case Remove unneeded getHistoricalEvents delay helper in mock * Fix project file inclusion post rebase * Run pod update * Implement the mostRecent search type handler * Fix logical error in description * Create tests for most recent condition cases * Add functional tests for mostRecent condition working in rules engine * Add test cases to EventHistoryTests to improve coverage for the "more than one" event case Update MockEventHistoryDatabase to enable this testing * Update test case to differentiate return values * Update search type logic to handle setting value more elegantly and remove default value logging Replace search type operand handling with switch Refactor getHistoricalEventCount with switch instead of nested if else and add early exit guard for unsupported type Fix doc error * Create unit tests for JSONCondition's getHistoricalEventCount method * Add back added test file * Fix missing dispatch schema consequence event for non-historical event operation * Fix project structure * Add support for array flattening and add and update tests * Add ability for all_url to not use the new array flattening logic for backwards compatibility * Update examples for clarity * Apply swift formatting * Add dictionary shape test and update test case comment * Add test cases for flattenArrays false, tighten test case expectations for some cases * Fix NSNull values filtering in the FNV1A32 hash generation and test parity with Android * Update historical condition consequence to use the generateConsequenceEvent method to dispatch consequence Update test cases * Update test cases to validate new recorded and dispatched events * Update event history getEvents logs to trace * Add resource class to install_dependencies * Update to Xcode 15.3 * Update iOS/tvOS devices to 17.4 * Fix missing Xcode version upgrade * Fix files lost in merge --------- Co-authored-by: Steve Benedick <sbenedic@adobe.com>
Co-authored-by: timkimadobe <timkimadobe@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
cdhoffmann
approved these changes
Jul 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This will bump Core's version from 5.5.2 -> 5.6.0 and AEPTestUtils from 5.2.3 -> 5.6.0 (breaking change from Core that needs to be supported, and this aligns their versions)
Description
Merges
dev-v5.6.0tostaging. Contains:Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: