Skip to content

Conversation

@mgray88
Copy link

@mgray88 mgray88 commented Jun 2, 2025

Summary

iOS does not allow presenting view controllers when one is already presented. The in-app-payments library does not handle the case of a developer trying to present the card entry form from an already presented view controller, and instead just crashes.

I have "fixed" it for the particular case for our app, however I apologize I do not have the time to flesh out the functionality for every case. Therefore this is a draft PR. Additionally, it's really only a bandaid, as the developer would still be expected to be presenting a UINavigationController for this to work (though I would imagine react-native-screens or whatever library is probably already doing that by default).

Another potential fix that I have seen used previously, is to create a separate UIWindow, layering it over top of the existing app. That would bypass the problem entirely, but require much more refactoring.

Changelog

  • fix: allow presenting from presented navigation controller in startCardEntryFlow

plinio-square and others added 3 commits April 11, 2025 12:57
* Add a github action to publish to NPM.js.
Fix dependency issues in package.json.

* Updating actions/cache to v4 since GH will reject older versions

* Fix package name
@CLAassistant
Copy link

CLAassistant commented Jun 2, 2025

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

3 participants