I am trying to do a data transfer to CheckoutViewController that was coded programmatically. Before I connected the CheckoutViewController to storyboards, the view was loading perfectly fine and my initializers weren't causing any issues. This is the block of code I had in the CheckoutVC.
Now when I try to load the vc after setting it up in storyboard, it crashes with a fatal error, how can I fix this?
Code Block let paymentContext: STPPaymentContext let config: STPPaymentConfiguration let customerContext = STPCustomerContext(keyProvider: MyAPIClient()) init() { let config = STPPaymentConfiguration() let paymentContext = STPPaymentContext(customerContext: customerContext, configuration: config, theme: .defaultTheme) config.requiredBillingAddressFields = .name self.paymentContext = paymentContext self.config = config super.init(nibName: nil, bundle: nil) self.paymentContext.delegate = self self.paymentContext.hostViewController = self } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
Now when I try to load the vc after setting it up in storyboard, it crashes with a fatal error, how can I fix this?