I have some problem with dispatch_queue_t queue. I tried to found perfect solution for my problem but i found solution for load UIImage or another elements but not for NSURL. So i have simple NSURL with simple site:
NSURL *url = [NSURL URLWithString:@"site.ch"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
I need that my NSURL (This code which up)will reboot after for example 10 min, so for time i put NSTimer, but for update this NSURL i tried to used this code but i have error also..
dispatch_queue_t queue = dispatch_get_global_queue(0,0);
NSError* error = nil;
NSString* text = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"site.ch"]
// checking if error == nil would be appropriate
SO i need to put NSURL With Request to this code with dispatch. Not NSString only NSURL
How this made?Thanks.
If I understand you correctly you have error because of incorrect encoding. Try to use NSUTF8StringEncoding instead.