Summary
AccountOnboardingControllerDelegate.accountOnboardingDidExit(_:) is not called after the first automatic or manual dismissal of the onboarding flow.
accountOnboardingDidExit(_:) is invoked inconsistently. In most cases it is called correctly, but occasionally it is not called even though the onboarding UI has been dismissed. This has been observed after both automatic dismissal (after pressing Confirm) and manual dismissal using the close button.
If the onboarding flow is opened again, the delegate callback works correctly on every subsequent dismissal.
Manual dismissal using the close ("X") button always triggers accountOnboardingDidExit(_:).
Code to reproduce
let session = try await networkLayer.getVerificationAccountSession()
let apiClient = STPAPIClient(
publishableKey: session.publishableKey
)
let componentManager = EmbeddedComponentManager(apiClient: apiClient) {
try await networkLayer.getVerificationAccountSession().clientSecret
}
self.componentManager = componentManager
let onboardingController = componentManager.createAccountOnboardingController()
onboardingController.delegate = self
onboardingController.title = "Verification"
onboardingController.present(from: self)
Delegate:
extension ViewController: AccountOnboardingControllerDelegate {
func accountOnboardingDidExit(_ accountOnboarding: AccountOnboardingController) {
print("EXIT")
}
func accountOnboarding(
_ accountOnboarding: AccountOnboardingController,
didFailLoadWithError error: Error
) {
print(error)
}
}
Reproduction steps
- Present
AccountOnboardingController.
- Complete the onboarding flow.
- Press Confirm.
- Stripe automatically dismisses the onboarding UI.
- Observe that
accountOnboardingDidExit(_:) is not called.
- Present the onboarding controller again.
- Complete or close the onboarding.
accountOnboardingDidExit(_:) is now called correctly.
iOS version
iOS 18.5
Installation method
Swift Package Manager (SPM)
SDK version
Stripe iOS SDK 26.2.0
Other information
- The delegate is assigned before calling
present(from:).
- The presenting
UIViewController remains the same.
- No errors are reported.
- The application does not enter the background during the onboarding flow.
- The issue only happens on the first automatic/manual dismissal after pressing Confirm or pressing Close.
- Manual dismissal using the navigation bar close button always invokes
accountOnboardingDidExit(_:).
- Subsequent presentations of
AccountOnboardingController work as expected.
Summary
AccountOnboardingControllerDelegate.accountOnboardingDidExit(_:)is not called after the first automatic or manual dismissal of the onboarding flow.accountOnboardingDidExit(_:) is invoked inconsistently. In most cases it is called correctly, but occasionally it is not called even though the onboarding UI has been dismissed. This has been observed after both automatic dismissal (after pressing Confirm) and manual dismissal using the close button.
If the onboarding flow is opened again, the delegate callback works correctly on every subsequent dismissal.
Manual dismissal using the close ("X") button always triggers
accountOnboardingDidExit(_:).Code to reproduce
Delegate:
Reproduction steps
AccountOnboardingController.accountOnboardingDidExit(_:)is not called.accountOnboardingDidExit(_:)is now called correctly.iOS version
iOS 18.5
Installation method
Swift Package Manager (SPM)
SDK version
Stripe iOS SDK 26.2.0
Other information
present(from:).UIViewControllerremains the same.accountOnboardingDidExit(_:).AccountOnboardingControllerwork as expected.