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

[BUG] Crash when presenting UIPopoverPresentationController on an iPad #2671

Open
nalexn opened this issue Jun 19, 2023 · 1 comment
Open

Comments

@nalexn
Copy link

nalexn commented Jun 19, 2023

Summary

Stripe identity verification SDK crashes for iPads with the following message:

NSGenericException · Your application has presented a UIAlertController (<UIAlertController: 0x10d0a7000>) of style UIAlertControllerStyleActionSheet from StripeIdentity.IdentityFlowNavigationController (<StripeIdentity.IdentityFlowNavigationController: 0x10d08da00>). The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.

Call stack:

0
CoreFoundation
___exceptionPreprocess
1
libobjc.A.dylib
_objc_exception_throw
2
UIKitCore
-[UIPopoverPresentationController presentationTransitionWillBegin]
3
UIKitCore
___80-[UIPresentationController _initViewHierarchyForPresentationSuperview:inWindow:]_block_invoke
4
UIKitCore
___56-[UIPresentationController runTransitionForCurrentState]_block_invoke_3
5
UIKitCore
-[_UIAfterCACommitBlock run]
6
UIKitCore
-[_UIAfterCACommitQueue flush]
7
UIKitCore
__runAfterCACommitDeferredBlocks
8
UIKitCore
__cleanUpAfterCAFlushAndRunDeferredBlocks
9
UIKitCore
__UIApplicationFlushCATransaction
10
UIKitCore
__UIUpdateSequenceRun
11
UIKitCore
_schedulerStepScheduledMainSection
12
UIKitCore
_runloopSourceCallback
13
CoreFoundation
___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
14
CoreFoundation
___CFRunLoopDoSource0
15
CoreFoundation
___CFRunLoopDoSources0
16
CoreFoundation
___CFRunLoopRun
17
CoreFoundation
_CFRunLoopRunSpecific
18
GraphicsServices
_GSEventRunModal
19
UIKitCore
-[UIApplication _run]
20
UIKitCore
_UIApplicationMain
21
myapp
AppDelegate.swift:17:13
main
22
dyld
start

iOS version

iOS 16. Most notably, only iPad devices are affected.

Installation method

SPM

SDK version

23.9.1

@nalexn
Copy link
Author

nalexn commented Sep 3, 2024

It's been 1 year, the issue is still present. The fix is literally 1 line of code and is carefully described by Apple inside the crash report itself. w t f?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants