0

I googled and couldn't find anything which might mean the answer is no, but if i accidentally leave nslog on logging incoming internet messages (chat) can i assure my testers that that is private info or is there a way i would be able to retrieve it. When i googled it seemed you needed to plug the device in and run it to see that data. I don't think anyone has that confidential info, its just a game server but i want to be able to let people know if they have questions how private their use of the app is even though i don't intend to go out and look for anyone's chat logs myself.

Mike

LanternMike
  • 664
  • 1
  • 5
  • 16

3 Answers3

3

Anything you log is best considered as automatically made public. Never log potentially private information, especially not in production environments. It doesn't even matter whether it can be retrieved (which it can).

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
0

NSLog would write to the syslog on their device. From the docs on NSLogv:

Logs an error message to the Apple System Log facility (see man 3 asl). If the STDERR_FILENO file descriptor has been redirected away from the default or is going to a tty, it will also be written there.

The data is therefore stored on their device in cleartext. If there is sensitive data, this is not the best practice. As the developer, it would not be trivial for you to retrieve this but still, not great that it's there. I'd recommend disabling NSLog in your release builds (are you sure it is not? Have you looked at your console in Xcode while running the release on your own device?)

Ben Flynn
  • 18,524
  • 20
  • 97
  • 142
  • this is only for builds for testers, and i only have a few testers. what i'm logging is incomming chat in a chat console for debugging the parser. i do turn it off but sometimes if i was using it i've left it on. really there is nothing sensitive no financial or sensitive info but i want to respect my testers privacy and not let them think i can read their private chats if they have any while conencted ( as opposed to public chat) – LanternMike Feb 23 '13 at 01:18
  • also does it delete on next run of program of if i left it on they are storing all their chat logs on their device which of course is not ideal. i dont think were tallkign huge security concerns unless they gave sensitive info out in chat but i should make a better point of having it off if i needed to turn it on for debugging. part of this is when i'm making many builds in a week one might have it on now and then. – LanternMike Feb 23 '13 at 01:23
  • and i'm just logging incoming chat not outgoing what is said when i do log because outgoing isn't as important to me. i dont have to parse it unless its incoming. – LanternMike Feb 23 '13 at 01:25
  • Are you making their builds straight off your machine, or distribution an ipa? Normally I'd make an ipa with release setting and do something like this: http://stackoverflow.com/questions/2025471/do-i-need-to-disable-nslog-before-release-application Try testing on your own device with build you are sharing (look at the console in the organizer, or use a console app on the device). I'm not sure how large the console log buffer is, but it does not seem to reset between runs. – Ben Flynn Feb 23 '13 at 01:25
  • There are plenty of ways to ensure that it's off, such as turning on `-Werror` in release builds and using something like `#warning "Dev logging"` next to the code which does the log. – tc. Feb 23 '13 at 01:26
  • i will look into that. this question isn't so much an admission that i didn't think i could manage it, i can and i can make a point of having it off. but the question was just so i would know why it would matter so i can force myself to address the issue and make a consistent policy. the app only recently developed enough to attract much use from testers. thanks everyone. – LanternMike Feb 23 '13 at 01:30
0

The logs can be seen after the fact by plugging the device in. I believe this works even if the device is passcode-locked.

The limited length suggests that logs might be only in-memory, but there's no guarantee — Apple might persist them to flash for crash-reporting purposes.

There's also no guarantee that they can't be read by other processes.

tc.
  • 33,468
  • 5
  • 78
  • 96
  • 1
    They definitely could be read by other processes, since there are console apps out there on the AppStore that do just this. – Ben Flynn Feb 23 '13 at 01:32
  • all good to know. with what my app logs i think its low risk even if the logs were fully exposed but i can definitely seeing someone get annoyed at me if they see on their device their incoming chat is logged. – LanternMike Feb 23 '13 at 01:41