CupThread React Native & Expo SDK - v0.1.0
    Preparing search index...

    Function resolveAllowedPlatform

    • Resolves an outgoing feedback platform against the application's configured allowlist.

      • When allowed is empty or undefined, requested ?? fallback is returned unchanged (preserving legacy behavior where the server remains authoritative).
      • When requested is present and contained in allowed, requested is returned.
      • When requested is absent or not in allowed, the first entry of allowed (or fallback if allowed is empty) is returned, and a warning is logged via console.warn in development builds so hosts learn of the configuration/allowlist mismatch.

      Parameters

      • requested: FeedbackPlatform | undefined

        The platform requested on the feedback draft or client configuration.

      • allowed: FeedbackPlatform[] | undefined

        Target platforms enabled for this application (PublicAppConfig.allowedPlatforms).

      • fallback: FeedbackPlatform

        Fallback runtime platform to use when no allowlist is configured or allowlist is empty.

      Returns FeedbackPlatform

      The resolved platform conforming to the allowlist when provided.