Closed ohsnapitscolin closed 10 months ago
@ohsnapitscolin i found a solution for this, i explicitly set the parents fragment factory along with the child fragment. https://github.com/ticketmaster/ReactNative-TicketmasterDemoIntegration/pull/10
Closing this since there's a discussion happening on the issue mentioned above.
Hey all,
I filed an issue in the React Native demo repo as well, but essentially I'm trying to create a Purchase Fragment using the example code here. The problem is the app crashes with the following error when trying to open checkout:
It looks like in the Fragment demo code, we use the
childFragmentManager
instead of thesupportFragmentManager
that's used in this activity-based demo (which I believe is necessary, since we're creating aPurchaseFragment
, not aPurchaseActivity
).The problem seems to be the following lines in
com.ticketmaster.purchase.internal.ui.ticket.PurchaseFragment$setupNavigationObserver$1
(which I when I dug into them look something like this):In this case the
requireActivity().getSupportFragmentManager().getFragmentFactory()
is not aTMPurchaseFragmentFactory
, because the factory was set on thechildFragmentManager
instead.Is it possible to support the Fragment use case? Or do I need to use a separate activity entirely? Is is possible to pull the
childrenFragmentManager
from thePurchaseFragment
in the code above?