nslog

NSLog with CGPoint data

I have a CGPoint called point that is being assigned a touch: UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:self]; I want to get the x coordinate value into my console log: NSLog(@"x: %s", point.x); When I use this, log output for this is: x: (null) I have verified that point is not null when this i...

Does NSLog executes in ipod / iphone ?

Hi, Does NSLog executes in iPod/iPhone ? i have googled it .. could'nt find anything.. ...

Is there any danger in leaving NSLog statements when building an app for distribution?

For some reason, during my development cycle I find myself deleting NSLog statements that I had inserted to aid in debugging. I don't really know why I have this habit, I just do it. On occasion, during development I'll find that I'll run into a problem I've had before, and then wind up re-adding an old NSLog statement. And then deletin...

NSLog suppress date

I find NSLog() statements really hard to read because of the verbose date. Is there a way to suppress the date on NSLog? ...

%d doesn't show integer properly

As I try to write NSLog(@"%d", myObject.myId); where myId is int, console gives some hight number like 70614496. And when I use @"%@", I get exception -[CFNumber respondsToSelector:]: message sent to deallocated instance 0x466c910. Why is it so? Here's definition of myObject: @interface myObject : NSObject { int myId; NSString *titl...

Where are an iPhone app's NSLog statements recorded on Windows?

Hi I am trying to debug an issue one of my testers is facing. The tester is on a Windows and I have put in some NSLog statements in my code to analyze the issue at hand. On a Mac, when I sync my device with iTunes, I can see the NSLog statements in Console.app. But where does in show up on a PC? I know where to find the crash logs. Bu...

iphone compare   with NSString

Hi, i was comparing A string coming from XML with another String and results were showing that they are not equal. but in NSLog() both were same ( e.g. Valore Books ). then i checked the Source of the XML and i came to know that the actual string is "Valore Books" and   is infact a space. but the problem is this when i am co...

How to understand about Xcode error message log

objc[1372]: FREED(id): message respondsToSelector: sent to freed object=0x43be3f0 that error when i try to click on UITableViewCell and Play some move and then press back to select another index of UITableViewCell and play some movie, i repeat this step very fast and it will get some application terminate but i dont understand about ...

NSLog output to file, or logging function for iPhone

I want to be able to write the contents of NSLog to a file I specify, or I need a function that writes a log to a file, for example: WriteLog(@"some activity by the user"); WriteLog(@"some more activity by the user"); but I want the output to look like this: 12-25-2009 1:30:00PM some activity by the user 12-25-2009 1:35:00PM some mor...

NSLog, NSError, bad access

I was doing a rather ordinary addPersistentStore to an NSPersistentStoreCoordinator, and it generated an &error code. So I went to NSLog it, and got an access error when I did this: NSLog(@"Unresolved error %@, %@", error, [error userInfo]); which seems to be the common idiom. When I reformatted the error statement as follows: ...

NSLog makes iPhone App crash during Apple App Review

hi, I submitted my app to iTunesConnect and Apple give me back the following crash report: Thread 2 Crashed: 0 libobjc.A.dylib 0x00003eb8 objc_msgSend + 16 1 Foundation 0x0004c3aa _NSDescriptionWithLocaleFunc + 24 2 CoreFoundation 0x0003d52e _CFStringAppendFormatAndArgumentsAu...

program not displaying simple side values for my triangle object properly in nslog

Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on the book "programming in Objective c 2.0" and working on exercise 8.5, where you have to build a bunch of classes and subclass a homemade abstract class into a square class a triangle class and a circle class. you also have to calculate the a...

if-query: if (Nslog isEqualtoString @"...") - How can I make this??

Hello, I want my app to do something when the last NSLog has a certain string. I thought I could realize this with an if-query and isEqualtoString, but how can I make this? Sorry for my bad English ;) ...

Do I need to disable NSLog before release Application?

when we want to release app on iPhone if I disable (comment NSLog();) it will get more advantage? ...

NSString function

Hello I get a null return when i try out my NSString function. //Track.m static NSString* trackUrl; //static NSString* getTrackNumberUrl; @implementation Track - (NSString*)trackUrl { return @"http://site.com/?a="; } - (NSString*)setTrackNumberUrl:(NSString*)trackNumberUrl { if (trackUrl != trackNumberUrl) { return ...

Trying to NSLog an NSNumber ivar in an instance method

Hello, I'm working on a console app that is tracks different songs. I'm working on getting the song class up off the ground first and have run into a snag trying to log an nsnumber which has been allocated for the song duration into an nslog statement: // // Song.h // MusicCollection.15.9 // // Created by Nicholas Iannone on 1/11...

iPhone: Once I have redirected NSLog to a file, how do I revert it to the console?

I'm using: #if TARGET_IPHONE_SIMULATOR == 0 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *logPath = [documentsDirectory stringByAppendingPathComponent:@"console.log"]; freopen([logPath cStringUsingEncodin...

How to log an long long value with NSLog?

How can I do that? What's the format specifier? For example, I have: long long veryLong = // assume value here NSLog(@"%f", veryLong); // of course wrong... ...

periodic read from iPhone stderr

I'm working on a class that I will use for my own debugging purposes. I intend it to be an on device version of the debugger console. Mostly I care about capturing NSLog() statements. No matter what I log to the console, I'm only getting 0xFF from fgetc(). What I expect to see from fgetc() is a character that was sent to stderr since ...

Is it ok to submit the iPhone app binary with NSLog statements ?

Hello all , I am just about to submit my first iPhone app. I have put lots of NSLog statements to test and debug the application . So my question is " Is it ok to keep the NSLog statements in the source code " and I have a doubt that whether the nslog statements slows down the total execution time or not . thanks. ...