objective c - How to send NSLogs when a user presses a button or does something -


I am applying for someone, and for some of the things that I want to monitor, I have to take NSLogs There are sets, but I want to be able to send them the console or some things, there is no way to do this? Apart from this, I do not want to know the user about this, I am monitoring this because I have given the user a password for the account that he has to manage, and I have to see that he has to ensure that What is doing is that he is not breaking any rules.

I do not get enough of what you want here; NSLog () is the standard function to output to the console - at least in debug mode, typically NSLog () is removed from the release code (a big generalization I know, but usually true)

Is there a user on your machine? Are you connected to a network etc .. There are some questions you have left.

Besides, why are you giving users the option of doing things that break the rules? I think this should be the biggest point of your post. User has clearly the functionality to break the rules; How about changing that functionality instead of spying on them?

If I thought the software I was using was being "logged", then the developer could see what I was doing, I would immediately start looking for alternatives.


EDIT: This is that I am trying to explain in the comments of this answer. I am not claiming to compile this code, I am just trying to explain how such solutions should work. It can not be the best, nor fast - though this work will be completed. I still personally believe that the user should not have that kind of functionality, if he does not have any reason for this, and to see if you have the source code for the application, then to remove that functionality To be trivial - even temporarily too.

PHP Script - This will mail you an error;

  & lt ;? Php / * get specified event * / $ event = $ _GET ['event']; $ App = $ _GET ['app']; $ Email = ''; // Send your e-mail address / * $ app, ** and "event as message" * / if (mail ($ email, $ app, $ event)), "echo" Success ";}? & Gt;  

Then, to call it in Objective-C - implement a quick wrapper function to use the string of NSString withContentsOfURL method functionality In this way ..

  - (BOOL) userRuleBreak: (NSString *) event {/ * do we need to generate a URL of http: //xxxxxx/perm.php? Event = ???? and Apple Cache = ???? * / NSUrl * warning = [NSUrl initWithString: [NSString initWithFormat: @ "http://www.xxxxxx.xxx/perm.php?incident=%s&app=%s", event, @ "APPNAME" "]; NSString * Position = [NSString stringWithContentsOfURL: Warning, encoding: NSASCIIStringEncoding]; if (status! = Zero) {return yes;} and {return not;}}  

obviously , If the statement is in the end which will actually check the contents of NSString, this code probably can not be compiled - I have not tried, but even if I suggest you to solve your own, like Procedure was written after a while after a while!

Look, the real issue with this application is not that you are waiting for the user to do this so that he should not do anything - the fact is that you You are giving the ability to do something that should not be done if you do not want to do anything to a user - do not give them functionality. After the user has done something before then it is a bad idea to wait for the email - by the time, it is too late - stop it before doing so - do not give them the option to do so. Be pro-active and not reactionary, because if the user does something, then it should not be; It's all right and is saying well, "but I told you not to do this! You are not allowed" - but you are trying to get back what you have done.


Comments