Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this class is not key value coding-compliant for the key emptyView.' terminating with uncaught exception of type NSException #538

Open
dickygeraldi123 opened this issue May 25, 2021 · 0 comments

Comments

@dickygeraldi123
Copy link

After generating the token , the view is unable to present and the app is getting crashed throwing an error

this class is not key value coding-compliant for the key emptyView.' terminating with uncaught exception of type NSException

The source code to present the view is like this

func openSnapMidtransWithToken(viewController: BaseViewController, token: String) {
      MidtransConfig.shared()?.callbackSchemeURL = "sample://"
      MidtransConfig.shared()?.shopeePayCallbackURL = "sample://"

      MidtransMerchantClient.shared().requestTransacation(withCurrentToken: token) { (response, error) in
          if (response != nil) {
              self.openMidtransPayment(viewController: viewController, response: response!)
          } else {
             print("ERROR: \(error)")
          }
      }
  }

  fileprivate func openMidtransPayment(viewController: BaseViewController,
                                       response: MidtransTransactionTokenResponse) {
      if let controller = MidtransUIPaymentViewController.init(token: response) {
          controller.paymentDelegate = self
          viewController.navigationController?.present(controller, animated: true, completion: nil)
      }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant