Addresponse - 仅添加到内存(XCode) [英] Addresponse - adding to memory only (XCode)

查看:140
本文介绍了Addresponse - 仅添加到内存(XCode)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将我的项目连接到一个php文件,但每次显示:

  ADDRESPONSE  - 添加到内存ONLY 

我从来没有见过。
这是代码i使用:

  //获取php 
FindURL = [NSString stringWithFormat: @http://domain.com/Myfile.php?username=%@,Username.text];
//执行php代码
URLData = [NSData dataWithContentsOfURL:[NSURL URLWithString:FindURL]];

//接收returend值
DataResult = [[NSString alloc] initWithData:URLData encoding:NSUTF8StringEncoding];

NSLog(@%@,DataResult);

我能做什么?



更新代码:

   - (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){
//连接
} else {
//错误
}

}

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

NSLog(@%@,DataResult);

}


解决方案

ve有同样的问题 - 检查以下,这可能会帮助你:
日志消息我没有要求在Xcode 4.5与iOS 6.0



我到目前为止还没有找到解决方案,但由于我现在知道这个日志是由操作系统生成的,我不再在源中找到它的起源)。


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);

}

解决方案

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 :)

这篇关于Addresponse - 仅添加到内存(XCode)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆