You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I've read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide
The problem
On iOS, when paymentRequestWithCardForm() is called and returns a promise upon filling the form, the Promise is being returned before the Modal actually fully disappears. As a side-effect to this, due to popular bug in react-native is it then impossible to open another RN Modal right after paymentRequestWithCardForm is resolved.
^^ if openMyModal would trigger opening new Modal, such modal will never gets displayed because its being opened while paymentRequestWithCardForm modal is still being closed (animation still hasn't finished).
Ideally, paymentRequestWithCardForm() should return promise only when its modal is fully closed (animation has finished) = equivalent to RN Modal onDismiss()
Currently the only somewhat dirty workaround is to manually delay opening new modal e.g. something like this:
2019-09-24 21:08:55.037926+0200 nativeapp[39073:1658965] Warning: Attempt to present <RCTModalHostViewController: 0x7fa152d46850> on <UIViewController: 0x7fa14cf02280> while a presentation is in progress!
Before I have submitted the issue
[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I've read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using
tipsi-stripe
I need to set options for my app as described in usage guideThe problem
On iOS, when paymentRequestWithCardForm() is called and returns a promise upon filling the form, the Promise is being returned before the Modal actually fully disappears. As a side-effect to this, due to popular bug in react-native is it then impossible to open another RN Modal right after paymentRequestWithCardForm is resolved.
e.g.
paymentRequestWithCardForm().then(data => openMyModal())
^^ if openMyModal would trigger opening new Modal, such modal will never gets displayed because its being opened while paymentRequestWithCardForm modal is still being closed (animation still hasn't finished).
Ideally, paymentRequestWithCardForm() should return promise only when its modal is fully closed (animation has finished) = equivalent to RN Modal onDismiss()
Currently the only somewhat dirty workaround is to manually delay opening new modal e.g. something like this:
paymentRequestWithCardForm().then(data => setTimeout(function() { openMyModal(); )}.bind(this), 250)
.. but its not ideal ;)
Environment
tipsi-stripe
version: 8.0.0-beta.8tipsi-stripe
version where the issue was not reproduced (if applicable): no ideacom.google.firebase:firebase-core
version: n/acom.google.android.gms:play-services-base
version: n/aLinks to logs and sources
from Xcode logs:
2019-09-24 21:08:55.037926+0200 nativeapp[39073:1658965] Warning: Attempt to present <RCTModalHostViewController: 0x7fa152d46850> on <UIViewController: 0x7fa14cf02280> while a presentation is in progress!
See also: facebook/react-native#10471
The text was updated successfully, but these errors were encountered: