### Presenting WishKit FeedbackListView from UIViewController Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Use UIHostingController to wrap the SwiftUI view when presenting from a UIKit-based controller. ```swift import UIKit import SwiftUI import WishKit class HomeViewController: UIViewController { @objc func buttonTapped() { let feedback = UIHostingController(rootView: WishKit.FeedbackListView().withNavigation()) present(feedback, animated: true) } } ``` -------------------------------- ### Configure WishKit API Key Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Initialize WishKit with your unique API key within the initializer of your root view. ```swift import SwiftUI import WishKit struct ContentView: View { init() { WishKit.configure(with: "your-api-key") } ... } ``` -------------------------------- ### Implement FeedbackListView Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Display the feedback list view within your SwiftUI view hierarchy. ```swift import SwiftUI import WishKit struct ContentView: View { init() { WishKit.configure(with: "your-api-key") } var body: some View { WishKit.FeedbackListView() } } ``` -------------------------------- ### Configure WishKit UI Elements Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Adjust feature request list behavior, visibility of UI components, and debug logging settings. ```swift // Allow user to undo their vote WishKit.config.allowUndoVote = true // Shows full description of a feature request in the list. WishKit.config.expandDescriptionInList = true // Hide comment section WishKit.config.commentSection = .hide // Show the status badge of a feature request (e.g. pending, approved, etc.). WishKit.config.statusBadge = .show // Hide the segmented control. WishKit.config.buttons.segmentedControl.display = .hide // Show internal debug logs in the console (network requests, errors, etc.). // Off by default so production builds stay quiet. WishKit.config.showDebugLogs = true ``` -------------------------------- ### Update User Revenue Information Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Provide payment details to help prioritize feature requests based on user revenue. ```swift // How much a user is paying per week or month or year. // WishKit supports weekly, monthly and yearly payments. WishKit.updateUser(payment: .monthly(7.99)) ``` -------------------------------- ### Theme WishKit UI Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Customize primary, secondary, and tertiary colors to match your application's design. ```swift // Accent color for primary actions (Save button, active Vote-Button, comment send). // Defaults to your app's accent color so WishKit blends in natively. WishKit.theme.primaryColor = .yellow // Set the secondary color (this is for the cells and text fields). WishKit.theme.secondaryColor = .set(light: .orange, dark: .red) // Set the tertiary color (this is for the background). WishKit.theme.tertiaryColor = .set(light: .gray, dark: .black) ``` -------------------------------- ### Update Additional User Information Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Share optional user details like email, name, or custom IDs to enhance user tracking. ```swift // Email WishKit.updateUser(email: "jobs@apple.com") // Name WishKit.updateUser(name: "Steve") // If you manage user IDs yourself you can let WishKit prioritize it. WishKit.updateUser(customID: "8AHD1IL03ACIP") ``` -------------------------------- ### Add WishKit Dependency Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md The repository URL for adding WishKit as a Swift Package dependency in Xcode. ```text https://github.com/wishkit/wishkit-ios.git ``` -------------------------------- ### WishKit.updateUser Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Updates user information including payment details, email, name, and custom IDs to enable revenue-based feature prioritization. ```APIDOC ## WishKit.updateUser ### Description Updates user metadata to assist in feature request prioritization based on revenue and user identity. ### Parameters - **payment** (enum) - Optional - The user's payment tier (e.g., .monthly(7.99)) - **email** (String) - Optional - The user's email address - **name** (String) - Optional - The user's name - **customID** (String) - Optional - A custom identifier for the user ``` -------------------------------- ### Override WishKit localization strings Source: https://github.com/wishkit/wishkit-ios/blob/main/README.md Customize UI text by assigning new values to the localization configuration. Supports both static strings and NSLocalizedString for dynamic localization. ```swift // Override the segmented control text to the german word for "Requested". WishKit.config.localization.requested = "Angefragt" // You can also assign NSLocalizedString. WishKit.config.localization.cancel = NSLocalizedString("general.cancel", comment: "") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.