Skip to main content

MarketEdge View UI Guide

The Entrupy iOS SDK provides displayMarketEdgeViewForItem(withEntrupyID:withConfiguration:) to present the SDK's built-in MarketEdge screen for an authentication result. The screen shows MarketGrade, MarketValue, MarketMatch, disclaimer, and optional region selection. The SDK owns the screen and its lifecycle; your app provides the Entrupy ID and visibility configuration.

Overview

  • Presents a full-screen MarketEdge experience (MarketGrade, MarketValue, MarketMatch, region) hosted by the SDK.
  • You control which sections are visible via EntrupyMarketEdgeViewConfiguration.
  • Lifecycle and user actions are reported through EntrupyMarketEdgeViewDelegate.

Before presenting the MarketEdge view:

  • Initialize the SDK and ensure entrupyApp.isAuthorizationValid() returns true.
  • Have the target authentication’s entrupy_id available.
  • Implement EntrupyMarketEdgeViewDelegate on the presenting view controller (or another object you assign as the delegate).

Presenting the MarketEdge View

import EntrupySDK

final class YourViewController: UIViewController, EntrupyMarketEdgeViewDelegate {

func presentMarketEdge(for entrupyID: String) {
guard EntrupyApp.sharedInstance().isAuthorizationValid() else {
print("User not authorized. Cannot display MarketEdge view.")
return
}

let configuration = EntrupyMarketEdgeViewConfiguration(
displayMarketGrade: true,
displayMarketValue: true,
displayMarketMatch: true,
displayRegionSelection: true
)

EntrupyApp.sharedInstance().marketEdgeViewDelegate = self
EntrupyApp.sharedInstance().displayMarketEdgeViewForItem(withEntrupyID: entrupyID, withConfiguration: configuration)
}

// MARK: - EntrupyMarketEdgeViewDelegate

func didDisplayMarketEdgeViewForItem(withEntrupyID entrupyID: String) {
// SDK presented the view
}

func didDismissMarketEdgeViewForItem(withEntrupyID entrupyID: String) {
// User closed the view
}

func didDisplayMarketEdgeViewFailWithError(
_ errorCode: EntrupyErrorCode,
description: String,
localizedDescription: String,
forEntrupyID entrupyID: String
) {
// Failed to present (e.g. auth, network, invalid ID)
}
}

The SDK presents and dismisses the view; your app does not push or pop view controllers for this screen.

EntrupyMarketEdgeViewConfiguration

PropertyTypeDefaultMeaning
displayMarketGradeBooltrueShow MarketGrade section. Details about the item's condition, a condition rating, and an item report.
displayMarketValueBooltrueShow MarketValue section. Best estimate of the item's value based on recent market data.
displayMarketMatchBooltrueShow MarketMatch section. Recent marketplace listings similar to the submitted item.
displayRegionSelectionBooltrueShow region selection for market data.
  • Default: EntrupyMarketEdgeViewConfiguration() — all sections visible.

Delegate callback summary

CallbackWhen it fires
didDisplayMarketEdgeViewForItem()The MarketEdge view was presented.
didDismissMarketEdgeViewForItem()The user closed the view.
didDisplayMarketEdgeViewFailWithError()The view failed to present (e.g. auth, network, invalid ID).