Log method entry and exit Objective C [duplicate] - ios

This question already has answers here:
How to log all methods used in iOS app
(8 answers)
Closed 10 years ago.
I have used NSObjCMessageLoggingEnabled for logging the method entry and exit at run time for an application. THe logs has been saved in /tmp/msgSends-pid. Whre pid is process ID.
I want to save same logs while running an app on the iPhone device instead of running app on emulator using Xcode.
Please let me know if you require more details to help me out.

NSObjCMessageLoggingEnabled appears in Apple's technical note about Mac OS X debugging magic, but not the one about iOS debugging magic. It appears that it is unavailable on iOS.
Apparently, you can log Objective-C method entries and exits using a DTrace probe in Instruments.

Related

Is there a way to read the crash log of an app at runtime [duplicate]

This question already has answers here:
iOS crash log catch, debug info.. Catch and send via email to the Dev team
(9 answers)
Closed 8 years ago.
Is there a way to read the crash log of an app at runtime?
What I mean is this, have some method running at the first beginning of an app that will monitor if the app crashed last time. If so, it will read the crash log, attach it to an email and send it to me.
I know apple has that functionality on iTC but it just shows crashes for a large amount of users and I want to know about all crashes that may be happening without my knowledge. You know, users don't give a crap and will never warn you.
Is this possible?
You could try using the TestFlight SDK. If the app crashes a crash report can be read on the website.
https://testflightapp.com/sdk

How to kill an app in iPhone using objective C [duplicate]

This question already has answers here:
Proper way to exit iPhone application?
(24 answers)
Closed 9 years ago.
In my app I am having a continuous communication with TCP server , now if
server sends a command to close the app, i want to close the app completely
and when user taps the app again, it should start with Application launch method itself.
I have tried using exit(0) in the code, using this application goes into background.But it doesn't kill the app. How can i do that?
There isn't a way. Apple doesn't allow it. The solution is: Just accept the fact that you are unable to do this and work around that fact.

Xcode stuck on "Your Application is Being Uploaded"? [duplicate]

This question already has answers here:
"Your application is being uploaded" forever to iTunes Connect
(4 answers)
Closed 9 years ago.
I am trying to upload an iOS application to the App Store on Xcode, but for some reason after it passes validation the application is stuck on "Your Application is Being Uploaded". It's only 1.7mb, and there are no errors in the project. I've cleaned, analysed, re-archived, restarted the application, seemingly everything. But for some reason it just won't uploaded. Any thoughts?
Try using Application Loader instead.
Not the most well-named app, I know, but it still works.

Send app crash logs/regular app logs [duplicate]

This question already has answers here:
How to get iPhone crash log from customers?
(4 answers)
Is there a way to have our own app to upload its crash repot?
(4 answers)
Closed 9 years ago.
I want to implement "Report a problem" button in my app, which sends me the logs of the user's app as a text file (by email), so I can see what is the problem.
Is there any way to do so?
Thanks in advance!
I have used QuincyKit to capture and retrieve crash logs from customers. It takes a bit of time, but once you get it set up, it works very well.
Crashlytics is definitely the way to go with crash logs. It is by far the easiest to implement and provides excellent information for solving problems as well as allows remote logging. It also means you will get the crash logs even without your users emailing them to you.
I'd still include a report a problem button that simply allows the user to email you if they have a problem specifically, but generally they won't for crashes.

iOS purgeIdleCellConnections [duplicate]

This question already has an answer here:
purgeIdleCellConnections: found one to purge conn = 0x1d57ba00
(1 answer)
Closed 9 years ago.
I'm getting a list of purgeIdleCellConnections shortly after downloading a lot of png images from the internet from a model class in the app.
Is this a threat to the application? It doesn't freeze up. Should I manually be closing connections?
Thanks!
xcode 4.2.1, ARC, deploying to ios 5.0+
EDIT: I'm seeing the list in my console. Also, I only see it when testing from my phone on a 3G network, not on wifi. Doesn't happen in simulator either.
I have no idea where you're seeing "a list of purgeIdleCellConnections".
If you mean in the Organizer console, it's probably normal: You've just stopped downloading stuff, so presumably there are now a bunch of idle cell network connections which can be turned off to save power (that's my take on it, anyway).

Resources