How can you get React Native logging to appear in the iPhone console (instead/in addition to the Xcode console) - react-native

If you have a console.log("some logging) code line in a React Native app (i.e. in Javascript) and run the app on an iPhone then you can see the logging appear inside what I'm going to call the Xcode console, or if you shake the app then in a browser.
However you cannot see that logging appear in what I'm going to call the iPhone console.
My question is - is there a way of adding logging to React Native code where the output is visible in the iPhone console in addition to the Xcode console.
Further information on what I mean by iPhone console:
If you interactively run an iOS app using Xcode, then there is a logging console displayed. What I am terming here as the Xcode console.
But if from within Xcode you choose the menu option Window | Devices and Simulators | Open Console" Then you can see full iPhone logging (i.e. what the system is logging in addition to what your app is logging.
This is what I'm calling the iPhone console.
Viewing it via XCode is not the only way of viewing or obtaining the iPhone logs, there are other ways too.
When you do iPhone native development and use NSLog() then it will log to both the Xcode console and the iPhone console, however when logging using React Native console.log() the logging only appears in the Xcode console.
I want logging code added to React Native Javascript code to additionally appear in the iPhone console.

First shake your Iphone then you can see this screen.
Then click Debug JS remotely button.
After you might see React Native Debugger page like this.
And then open your inspector[f12], and go to console tab debug it! :)

Related

How can I symbolicate a call stack in react-native (expo, metro, storybook)

ios simulator screenshot - console warning
When running my react-native application on the iOS Simulator, in the Console Warning, I cannot view the source as the message says:
This call stack is not symbolicated. Some features are unavailable such as viewing the function name or tapping to open files.
The react-native docs on symbolication are not really helpful in my case, as I cannot see how they relate (react-native/symbolication)
What I need, is a view of the source of the problem like in this attached screenshot
iOS Simulator with readable source (source: github/react-native-community/issue-69 😏)
Is there anything I can change in my configs/project or is that just wishful thinking?
Many thanks!

Firebase Crash Reporting automatically generates reports for fatal errors in android phone but not for iPhones?

I have setup firebase in my react native app.
But currently exceptions are not handled means not added any crashlytics logs or recorded errors
But for android app I am getting crashes in firebase but not for IOS.
Can someone explain this in detail?
Crashlytics may only be able to upload the data once the app starts again. Did you restart the app?
This can happen if you are testing while the Xcode debugger is attached.
Check this document, it explains how to test this in iOS.
If that doesn't work, enable debug logging and check if something is causing issues. For this:
After enabling debug mode, run the app.
Then hit "stop" in Xcode.
Run the app in the device and crash it
Run the app again from Xcode
Collect the output from Xcode

Screenshot Lock not working in React native app on iOS devices

We want to lock screenshot on app screens in React Native app so that user is not allowed to take the screenshot. The feature is implemented successfully in android version of the same React Native app. But it is not working in iOS app which is published to app store. I have also tried react-native-prevent-screenshot plugin but that is also not locking screenshot in iOS version. I even implemented blurred view on appDelegate.m file to prevent screenshot capture in app, but even this did not have any impact. Can someone tell if Apple has banned this feature completely or there is possibility of some issue in coding. But I rule that out because it is working successfully in android apk. Please help

Debugging React Native IOS Version in Mac (NOT AN EXPO but react-native run-ios)

My React Native app works properly on Android. However for the iOS side/version of my React Native app, the SPLASH SCREEN shows up and gets stuck there.
I have put a console.log output on the componentDidMount of the First Screen of my App.
I have tried to use the SHAKE option on the iOS Simulator but for some reason the debug screen does not show up.
I would like to check why the app freezes but I don't even get any error showing on the simulator. I'm guessing that there might a error/feedback from the system in the console output but I don't know how to go to the debugging screen where the console.log will show up when one runs react-native run-ios.
How to display the screen/console where the console.log("WHATEVER") I put on the code will display its output????

How can I see why titanium app crashes on Blackberry simulator

I do a Titanium application that woks on iOS and android. Now, I want to create the Blackberry version.
I've tried with a simple app and it's launched well at simulator, but when I've tried my app it doesn't work.
It launches splash screen and begins to load the elements, but I think the app crash because simulator returns to main screen, there isn't any alert (like on android when app stop unexpectedly), it only returns to main screen.
My problem is that I don't know what happen and I can't find any error logs...
I connect by telnet to the simulator, and there I can see the first traces of my app, but any error.
Do you know what can be happened? How can I know if I have an error? How can I know if my app has crashed?
Sorry, if it's an easy question, I'm newbie at Blackberry.
I'm using Titanium SDK 3.2.2 and Blackberry SDK 10.02
Thank you very much
I've created a new project (with Titanium SDK 3.1.3 instead of Titanium SDK 3.2.2) and copy all files there. I've tried to launch the app many times, and one of them, the app launches.
Maybe it was a computer or simulator problem.