Skip to content

Demo hashed IDs, identify-from-URL and profile id/neighbors in the Objective-C app - #94

Open
jrosendahl-opt wants to merge 3 commits into
masterfrom
demo/objc-feature-demos
Open

jrosendahl-opt wants to merge 3 commits into
masterfrom
demo/objc-feature-demos

Conversation

@jrosendahl-opt

@jrosendahl-opt jrosendahl-opt commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Why

The Objective-C counterpart of #93. The usage guide documents hashed identifiers, tryIdentifyFromURL:error: and profile id/neighbors, but the Objective-C demo showed none of them.

…jective-C app

The Objective-C counterpart of #93, minus async/await (not callable from Objective-C):

- Identify screen: "Identify (hashed email)" sends OptableSDKIdentifierType_HEM, and a URL field
  plus "Identify from URL" calls tryIdentifyFromURL:error:.
- GAM and Prebid banner screens: profile calls pass id "c:demo-user-1234" and a hashed-email neighbor.
- AppDelegate: OptableDemoSHA256Email() helper (CommonCrypto), normalizing the email as the SDK does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jrosendahl-opt
jrosendahl-opt requested review from a team as code owners November 3, 2026 22:39

NSError *error = nil;
[OPTABLE identify: @[
[OptableSDKIdentifier identifierWithType:OptableSDKIdentifierType_HEM value:OptableDemoSHA256Email(_identifyInput.text ?: @"")],

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.

Add a check for empty hashed email. Will send hash of empty string otherwise

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 5623811: the Email is trimmed and an empty one shows a message instead of calling identify. Same check added to the Swift demo in #93 (6d40cd7).

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