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

Native module can not be null. for ios #141

Closed
deepanshuRustagi opened this issue Dec 26, 2018 · 35 comments
Closed

Native module can not be null. for ios #141

deepanshuRustagi opened this issue Dec 26, 2018 · 35 comments

Comments

@deepanshuRustagi
Copy link

deepanshuRustagi commented Dec 26, 2018

With IOS it is giving me error native module is not null

screen shot 2018-12-26 at 11 52 24 am

I have deleted the node module folder from the react-native-razorpay
would you please help asap..

@iThink32
Copy link
Contributor

@deepanshuRustagi are you using expo by any chance? This is because we do not support it.

@deepanshuRustagi
Copy link
Author

deepanshuRustagi commented Dec 26, 2018

No, I am not using Expo. Firstly i was but after reading ur documentation i shifted it from expo but it is still not working.
@iThink32

@iThink32
Copy link
Contributor

@deepanshuRustagi ok can you provide more details as in which version of our package are you using , which react version , react-native version and Xcode version?

@deepanshuRustagi
Copy link
Author

deepanshuRustagi commented Dec 27, 2018

Ok
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-razorpay": "^2.0.17",
Xcode version :10.1
@iThink32

@iThink32
Copy link
Contributor

iThink32 commented Dec 27, 2018

@deepanshuRustagi everything looks fine , try deleting the derived data , stopping the metro bundler and try again. If you still can't get it to run try the example in this repo , before you run it place it in a different directory and run npm i on it.

@deepanshuRustagi
Copy link
Author

I have tried that thing also but it is not working at all in ios @iThink32

@iThink32
Copy link
Contributor

@deepanshuRustagi did you try running the example repo? Its working fine for me.Also please refer the integration videos here
https://razorpay.com/docs/ios/integration-videos/#integrating-the-sdk-using-react-native

@deepanshuRustagi
Copy link
Author

hi @iThink32 i have checked ur video. In my node modules folder i got razorpay package but in that node_modules folder is also present but in urs it is not.

@iThink32
Copy link
Contributor

iThink32 commented Jan 3, 2019

@deepanshuRustagi yes , ideally react-native-razorpay should not contain node_modules.Please refer the example in this repo.Run npm i on it , and blacklist/remove node_modules folder if it exists in react-native-razorpay.

@iThink32
Copy link
Contributor

iThink32 commented Jan 7, 2019

closing due to inactivity.Reopen if required.

@iThink32 iThink32 closed this as completed Jan 7, 2019
@deepanshuRustagi
Copy link
Author

Hi @iThink32. No error is producing now but button click doesn't perform any action like in android razorpay screen us opening but not in ios

@iThink32
Copy link
Contributor

iThink32 commented Jan 8, 2019

@deepanshuRustagi please check the example repo in this folder , run npm i , delete the node-modules folder in react-native-razorpay / blacklist it and try.

@deepanshuRustagi
Copy link
Author

ok

@iThink32
Copy link
Contributor

iThink32 commented Jan 8, 2019

@deepanshuRustagi comment changed , please check the updated one.

@deepanshuRustagi
Copy link
Author

deepanshuRustagi commented Jan 8, 2019

Where i can find them?
@iThink32

@iThink32
Copy link
Contributor

iThink32 commented Jan 8, 2019

@deepanshuRustagi as in the example repo?

@deepanshuRustagi
Copy link
Author

deepanshuRustagi commented Jan 8, 2019

@iThink32
RazorpayCheckout.open(options).then((data) => {
// handle success
this.setState({
paymentDialog:false,
loading: true,
})

        this.bookingInitiated();

    }).catch((error) => {
        // handle failure
        alert(`Error: ${error.code} | ${error.description}`);
    });

i am using this for both i copied it from the example

@iThink32
Copy link
Contributor

iThink32 commented Jan 8, 2019

@deepanshuRustagi please read the above comments , I updated it.

@iThink32 iThink32 reopened this Jan 8, 2019
@iThink32
Copy link
Contributor

closing due to inactivity.

@deepanshuRustagi
Copy link
Author

@iThink32 I have linked the razorpay react native in the project but checkout is not opening in the project

@deepanshuRustagi
Copy link
Author

RazorpayCheckout.open(options).then((data) => {

this is not working in ios

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@deepanshuRustagi what is the issue you are facing?

@iThink32 iThink32 reopened this Feb 6, 2019
@deepanshuRustagi
Copy link
Author

That screen which opens after clicking button is not opening

@deepanshuRustagi
Copy link
Author

It is opening in android but not in ios @iThink32

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@deepanshuRustagi what error are you receiving?

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@deepanshuRustagi can you please cross verify with the example project in our repo?
It will help you figure out the difference , run npm i on it , delete/blacklist node_modules in react-native-razorpay if it creates a prob.

@deepanshuRustagi
Copy link
Author

deepanshuRustagi commented Feb 6, 2019

let options = {
description: 'Advance booking amount payment',
image: 'https://cabbazar.com/assets/img/logo/cabbazar.png',
currency: 'INR',
key: 'rzp_test_6KeUReJYTLhPt0',
amount:data.amount ,
name: 'Cab Bazar LLP',
notes:data.notes,
prefill: {
email: data.email,
contact: data.phone,
name: data.name
},
theme: {color: '#000000'}
};
console.log("Options for RazorPay :",options)
RazorpayCheckout.open(options).then((data) => {
// handle success
this.setState({
paymentDialog:false,
loading: true,
})

        this.bookingInitiated();

    }).catch((error) => {
        // handle failure
        alert(`Error: ${error.code} | ${error.description}`);
    });

It is working till console.log but not after that
I am using this but it not working in ios
@iThink32

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@deepanshuRustagi are you getting any error in the console and did you cross check with the example?

@deepanshuRustagi
Copy link
Author

@iThink32 I have crossed check with the example i am not getting any error in the console. it is behaving differently in android and ios

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@deepanshuRustagi I have just updated the master of this branch with an example that is built with the latest version of react-native and have also cross checked with the options that you are using.It is working fine , please cross check again.

@deepanshuRustagi
Copy link
Author

Ok Thnks @iThink32

@iThink32
Copy link
Contributor

closing due to inactivity.

@atitpatel
Copy link

Getting the same error

@pronav
Copy link
Contributor

pronav commented May 22, 2019

Please make sure that Razorpay.framework is present in embedded libraries section of your build settings and libRazorpay.a should be there in linked libraries.

@deepanshuRustagi
Copy link
Author

deepanshuRustagi commented May 23, 2019 via email

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

No branches or pull requests

4 participants