Question

I have a app code that sends in request only when the app opens. However I need to have a continuos access to the file in the server which will be updated every second.

-(void)viewDidLoad
{
    [super viewDidLoad];

    NSURL *myurl = [NSURL URLWithString:@"URL"];
    NSString *mystring = [NSString stringWithContentsOfURL:myurl encoding:NSASCIIStringEncoding error:nil];
    //myTextView.text = realtime;
    //NSLog(mystring);

    NSString *stripped1 = [mystring stringByReplacingOccurrencesOfString:@"\r" withString:@""];

    NSArray *rows = [stripped1 componentsSeparatedByString:@"\n"];
}

Is there a way that I can keep checking on my server file to load the data? Currently I can load it only once when I open the application. But its a live update application. Thank you.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top