How to view magazines from iPhone?

I have several NSLog () in my iOS application, is it possible to view all the logs later on my Mac that were generated when the application was launched on the iPhone, even when the iPhone was not connected to the Mac. Thanks

+6
source share
7 answers

Not. However, you can redirect NSLog to a file using something like this: http://blog.coriolis.ch/2009/01/09/redirect-nslog-to-a-file-on-the-iphone/

You can then access the file through Xcode or download it using your application. Files and privacy issues are used.

Keep in mind that NSLog must be disabled in published applications, so you can use another logging application. A number of NSLog alternatives are available.

+2
source

You can view crash logs from your iPhone in the organizer.

If you want to view your own log entries, you can consider TestFlight ( http://testflightapp.com ). They offer an SDK that includes features for remote logging.

+2
source

Unfortunately this is not possible. The only thing you can get is Crash Log. If you need a better logging system, I suggest taking a look at CocoaLumberjack , a very powerful logging structure that gives you the opportunity to save on registering files and, ultimately, sending them to the server. You also have many different levels, such as: log information, log error, log warning, etc.

+2
source

I am sure this is not possible. The device must be connected to the Mac to run in Xcode debug mode, and you need to be in debug mode to view the console that contains your NSLogs.

+1
source

There is a crash log for every crash that occurs on the phone, which can be read after connecting to your mac. These NSLogs do not appear in this log and do not appear anywhere in a (semi) permanent order.

0
source

It is possible to use custom macros and a custom class that will write each message to the document directory in a file. If file sharing is enabled in the app, you can download it later in iTunes.

0
source

Viewing logs on mac may not be possible. But you can send the log to testflight using TFLog (). But you will need to distribute your application through testflightapp. And integrate sdk. I think this is what you are looking for. try it - testflightapp.com

0
source

Source: https://habr.com/ru/post/914235/


All Articles