Skip to main content
The feedback service lets your users submit feature requests, vote on ideas, and open support tickets — all from within your app. Access it via grantiva.feedback.

Feature requests

List feature requests

let requests = try await grantiva.feedback.getFeatureRequests(
    status: .open,       // Optional: filter by status
    sort: "votes",       // "votes", "newest", "oldest"
    page: 1,
    perPage: 20
)
Results are cached for 2 minutes. Force a refresh:
grantiva.feedback.refreshFeatureRequests()
let fresh = try await grantiva.feedback.getFeatureRequests()

Get a single feature request

let feature = try await grantiva.feedback.getFeatureRequest(id: featureId)

Submit a feature request

let request = try await grantiva.feedback.submitFeatureRequest(
    title: "Dark Mode Support",
    description: "Please add a dark mode option to reduce eye strain at night."
)
FieldConstraints
title3–200 characters
description10–5,000 characters

Vote

Each user/device can vote once per feature request.
// Cast a vote
try await grantiva.feedback.vote(for: featureId)

// Remove a vote
try await grantiva.feedback.removeVote(for: featureId)

Comments

// List comments
let comments = try await grantiva.feedback.getComments(for: featureId)

// Add a comment
try await grantiva.feedback.addComment(to: featureId, body: "Great idea!")

FeatureRequest model

feature.id           // UUID
feature.title        // String
feature.description  // String
feature.status       // FeatureRequestStatus
feature.voteCount    // Int
feature.hasVoted     // Bool — whether current user voted
feature.commentCount // Int
feature.createdAt    // Date

FeatureRequestStatus

pending | open | planned | in_progress | shipped | declined | duplicate

Support tickets

Submit a ticket

let ticket = try await grantiva.feedback.submitTicket(
    subject: "App crashes on launch",
    body: "After updating to v2.1, the app crashes immediately on iPhone 15...",
    email: "user@example.com"  // Optional — for reply notifications
)
FieldConstraints
subject3–200 characters
body10–5,000 characters

List user’s tickets

let tickets = try await grantiva.feedback.getUsersTickets()
If grantiva.identify() has been called, returns tickets for that user across all devices. Otherwise returns device-only tickets.

Get ticket with messages

let (ticket, messages) = try await grantiva.feedback.getTicket(id: ticketId)

for message in messages {
    print("\(message.authorType): \(message.body)")
    // authorType is .user or .admin
}

Reply to a ticket

try await grantiva.feedback.reply(to: ticketId, body: "Thanks for looking into this!")

SupportTicket model

ticket.id           // UUID
ticket.subject      // String
ticket.status       // TicketStatus: open, awaitingReply, resolved, closed
ticket.priority     // TicketPriority: low, normal, high, urgent
ticket.messageCount // Int
ticket.createdAt    // Date