Skip to main content
Version: Next 🚧

User Management

Call user methods on the Fedo singleton. We recommend calling them after Fedo.initialize so the SDK can route them correctly. Before initialization they are silent no-ops on both platforms — the calls are simply discarded.

The identity API is the same on both platforms:

Fedo.setUserID("user-abc-123")
Fedo.setUserDisplayName("Jane Doe")
Fedo.setUserEmail("jane@example.com")
Fedo.setUserProperty("plan", "enterprise")
Fedo.logout()

Anonymous User​

If setUserID is not called, and the Feedback UI is opened (via FedoFeedbackScreen() / FedoCreateFeedbackSheet() on Android, or FedoFeedbackView() / .presentFedoCreateFeedback(isPresented:) on iOS), anonymous user will be created with random id, and cached. So, next app session will keep using the same anonymous id created before.

Once the user authenticates to your app, you can call setUserID and all interactions (feedbacks created, comments, votes) done by the anonymous user will be migrated to the newly authenticated user. Then the anonymous user is permanently deleted.

info

Data migration only happens when moving from anonymous user to authenticated user

Methods:​

info

All methods below can be called synchronously. An internal queue will handle calling them one by one in the right order. A failing operation is skipped and the queue continues with the next one.

warning

Currently there is no retry or offline support. If any of these calls fails, it will not be retried automatically — you must call it again. Offline support is planned for a future version.

setUserID​

warning

We recommend against calling setUserID for anonymous visitors to your app.

Call setUserID when you know the identity of the current user, passing in their user ID as an argument. This is typically at account registration and at log in.

Calling setUserID with the same id is a no-op.

Fedo.setUserID("user-abc-123")

setUserDisplayName​

Display name shown on feedback and comments created by this user.

Fedo.setUserDisplayName("Jane Doe")

setUserEmail​

Fedo.setUserEmail("jane@example.com")

setUserProperty​

Attach custom key-value metadata to the user (e.g. plan tier, team, beta cohort).

Fedo.setUserProperty("plan", "enterprise")
Fedo.setUserProperty("team", "design")

Applying the same key again will override previous assignments.

Fedo.setUserProperty("tier", "gold")
Fedo.setUserProperty("tier", "silver") // overrides the line before

Predefined User Properties​

The SDK automatically attaches device information to each user. These properties are collected during initialization and updated on each app session.

PropertyTypeAndroidiOSDescription
_platformString✅✅Platform name (Android/iOS)
_manufacturerString✅✅Device manufacturer
_brandString✅—Device brand
_modelString✅✅Device model
_deviceString✅✅Device name
_osVersionString✅✅OS version string
_sdkVersionString✅✅Fedo SDK version
_localeString✅✅User locale
_timeZoneString✅✅Device timezone
_appVersionNameString✅✅App version name
_appVersionCodeLong✅—App version code
_appBuildString—✅App build number (CFBundleVersion)
info

These properties are automatically collected and cannot be disabled.

logout​

Logs out the currently authenticated user, clear all user cached data (token, ID, name, email, properties), then immediately creates a new anonymous user. If the current user is anonymous, nothing happens.

Fedo.logout()