5

I'm trying to connect my project to a php file but every time this shows:

ADDRESPONSE - ADDING TO MEMORY ONLY

I have never seen it before. this is the code i Use:

//Gets the php
FindURL = [NSString stringWithFormat:@"http://domain.com/Myfile.php?username=%@", Username.text];
// to execute php code
URLData = [NSData dataWithContentsOfURL:[NSURL URLWithString:FindURL]];

// to receive the returend value
DataResult = [[NSString alloc] initWithData:URLData encoding:NSUTF8StringEncoding];

NSLog(@"%@",DataResult);

What can i do?

Thanks in advance

Update code:

- (IBAction)UpdateList:(id)sender{



    NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://domain.com/Myfile.php"]
        cachePolicy:NSURLRequestUseProtocolCachePolicy
        timeoutInterval:15.0];
    NSURLConnection *Connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
    if (Connection) {
        //Connect
    }else{
        //Error
    }

}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
    DataResult = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

    NSLog(@"%@", DataResult);

}
noamtm
  • 12,435
  • 15
  • 71
  • 107
  • please have a look at this link - http://stackoverflow.com/questions/12547490/log-messages-i-didnt-asked-for-in-xcode-4-5-with-ios-6-0 – βhargavḯ Feb 04 '13 at 05:51

2 Answers2

2

I've had the same issue - check out the following, this might help you: Log Messages I didn't asked for in Xcode 4.5 with iOS 6.0

I haven't found a solution so far, but since I now know that this Log is produced by the OS, I no longer look for its origin in my source :)

Community
  • 1
  • 1
Toubey
  • 199
  • 3
  • 14
0

I got this log by making an NSURLRequest to an invalid URL. My app is supposed to show a UIAlertView when it catches an error on the server side, so I asked our system admin to take our entire site down so I can see what happens. He declined my request, so I typed random letters and put a .com at the end of the request URL.

Turns out we have an internal test server that doesn't seem to be accessible from my WiFi connection, so when I changed the URL to that instead, the log stopped appearing.

Matthew Quiros
  • 13,385
  • 12
  • 87
  • 132
  • 4
    “so I asked our system admin to take our entire site down so I can see what happens. He declined my request”. LOL. – mxcl Oct 19 '13 at 21:24