NeoDay iOS SDK
/// Makes the Rewardshop screen.
///
/// - parameter completion: Returns the Rewardshop or an Error.
public func makeRewardShop(
_ completion: @escaping (Result<UIViewController, Error>) -> Void
)
/// Makes the Rewardshop Order history screen.
/// This contains all the orders made inside the Rewardshop
///
/// - parameter completion: Returns the Rewardshop Order History screen or an Error.
public func makeRewardShopOrderHistory(
_ completion: @escaping (Result<UIViewController, Error>) -> Void
)
Directly requesting a Reward Shop screen
The NeoDaySDK factory methods are executed asynchronously in order to fetch the data and return a UIViewController.
sdk.makeRewardShop { [weak self] result in
guard let self = self else {
return
}
switch result {
case let .success(viewController):
// Display the viewController
case let .failure(error):
// Handle the error
}
}