0

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.

Stewbob
  • 16,759
  • 9
  • 63
  • 107
Siddharthan Asokan
  • 4,321
  • 11
  • 44
  • 80

1 Answers1

1

You may use apple notification to notify the user new data.

But I'm not sure if this is what you want.

ciphor
  • 8,018
  • 11
  • 53
  • 70
  • The data being generated is later plotted on a graph using core plot. Its more like accessing the server continuously and load the new datas – Siddharthan Asokan Jan 22 '12 at 15:48