Skip to content

Conversation

NidhiDixit09
Copy link
Collaborator

@NidhiDixit09 NidhiDixit09 commented Oct 2, 2024

Reference

SDK-2493 - Add unique id and timestamp to iOS SDK events
https://branch.atlassian.net/browse/SDK-2493

Summary

  • Added following parameters in body of all requests generated from SDK
    -- branch_sdk_request_creation_time_stamp - Timestamp when the request object was created.
    -- branch_sdk_request_uuid - unique identifier for request. It includes a UUID + Date in GMT locale. Date part is appended to match the format Gateway uses.
    Format : UUID + YYYYMMDDHH
    Sample:
    "branch_sdk_request_creation_time_stamp" : 1727927969748, "branch_sdk_request_uuid" : "40991413-1CF5-4B23-90B6-698204582872-2024100303",
  • When request objects are archived to disk, above two parameters will be archived too.
  • Added Unit tests

Motivation

These fields will help in debugging and in uniquely identifying requests generated from SDK.

Type Of Change

  • New feature (non-breaking change which adds functionality)

Testing Instructions

  • Verify all unit tests pass.

  • Send Following Requests using SDK -
    * INSTALL / OPEN ( v1/open , v1/install )
    * STANDARD / CUSTOM EVENTS ( v2/event )
    * GENERATE SHORL URL (v1/url)
    Verify All Requests body contain following params -
    branch_sdk_request_creation_time_stamp
    branch_sdk_request_uuid
    Verify branch_sdk_request_uuid is unique for all requests.
    * QR Code( v1/qr-code)
    * Share Sheet (v1/url)

  • Verify Caching -
    * Before Sending an event, turn off WIFI (internet).
    * Note down branch_sdk_request_uuid and branch_sdk_request_creation_time_stamp of the request
    * Quit App, tune on WIFI cold-launch it again.
    * App will re-send request which was failed in previous launch. Verify request has same branch_sdk_request_uuid and branch_sdk_request_creation_time_stamp

  • Verify branch_sdk_request_uuid and branch_sdk_request_creation_time_stamp are persisted for all request types (Unit Tests - testUUIDANDTimeStampPersistence )

cc @BranchMetrics/saas-sdk-devs for visibility.

@NidhiDixit09 NidhiDixit09 changed the title [IN PROGRESS] Duplicate Events fix - Add request ID and creation timestamp Duplicate Events fix - Add request ID and creation timestamp Oct 3, 2024
@NidhiDixit09 NidhiDixit09 merged commit 146bf4e into master Oct 4, 2024
13 of 14 checks passed
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.

2 participants