razorpay / razorpay-ios-sample-app

:iphone: Sample app demonstrating integration of Razorpay iOS Framework
MIT License
14 stars 13 forks source link

RazorPay not launching #17

Closed skygaikwad closed 5 years ago

skygaikwad commented 5 years ago

I working on a ObjC project and recently added Swift RazorPay Framework as per suggested by razorpay Technical team. But after adding its not launching. I have tried everything from swift header to embeded binaries to allow swift framework still not launching.

By default and in demo this method [razorpay open:options] i am using. But this not working after poking in razorpay framework header file, I found another method [razorpay open:options displayController:self].

Now its working. But I dont know if its proper way or not

iThink32 commented 5 years ago

@skygaikwad don't worry , it's just another way of initialising Razorpay , I suggest you to read about displayController in this link https://razorpay.com/docs/ios/ - search for displayController.

Now coming to the reason as to why it is not working using the normal method , if you do not specify the displayController , it uses the rootController of your application and checks if it is a navigation controller, if so it pushes onto it else presents on the rootController.If you already have a presented controller , Razorpay's controller will be pushed/presented onto the rootController which will be at the bottom of your navigation stack and hence won't be visible.Another possibility is trying to present a navigation controller on an already presented navigation controller which iOS prevents.Check your console for more info.

iThink32 commented 5 years ago

closing due to inactivity.