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...
Hi,
Does NSLog executes in iPod/iPhone ? i have googled it .. could'nt find anything..
...
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...
I find NSLog() statements really hard to read because of the verbose date.
Is there a way to suppress the date on NSLog?
...
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...
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...
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...
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 ...
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...
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:
...
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...
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...
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 ;)
...
when we want to release app on iPhone
if I disable (comment NSLog();) it will get more advantage?
...
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 ...
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...
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 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...
...
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 ...
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.
...