John Murphy
John Murphy

Reputation: 975

React Native Debug iOS Component in XCode

I am using React Native to build an iOS application. I have created a bridge to a Native component. This component was working so I decided to take the next step and enhance the component by adding additional code. Now, the component appears to no longer work. I have enabled debugging through React Native and I can debug my JavaScript code with no problem, so I know the issue lies in my iOS native code. Is there a way to debug the iOS code while running the React Native project? If this isn't possible, are there any recommendations about the best way to troubleshoot the issues in XCode? My thinking is creating a separate test project, but if there's a more elegant way to do this, I'm all ears. Thanks very much.

Upvotes: 1

Views: 520

Answers (1)

John Murphy
John Murphy

Reputation: 975

So, after creating a new React Native project and just running the project directly from XCode, I got debugging with no configuration. I also get the console logs from the JavaScript side as well, which is really cool.

Hope this helps somebody. If you can't debug the React Native project via XCode, I would consider re-making the project and then just running XCode. Worked for me.

Upvotes: 1

Related Questions