It's a bit complicated but here's a start:
You would set up a website. You could use a free Google 'sites' website. You would post something on that website like "the current version is 3.2". In your app you would do something like:
-(void)checkVersion{
NSURLSession *theConnection=[NSURLSession sessionWithConfiguration:
[NSURLSessionConfiguration defaultSessionConfiguration]
delegate:self delegateQueue:nil];
[[theConnection dataTaskWithURL:
[NSURL URLWithString:@"h ttps://sites.google.com/site/mySiteOnGoogleSites"]] resume];
if(theConnection) {
receivedData = [[NSMutableData alloc] init];
[receivedData setLength:0];
}
}
-(void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data{
[receivedData appendData:data];
}
-(void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error{
dispatch_async(dispatch_get_main_queue(), ^{
if(!error){
BOOL detectedDeviceCode=NO;
NSString *temp=[[NSString alloc] initWithData:self->receivedData encoding:NSUTF8StringEncoding];
// NSLog(@"the string is %@",temp2);
NSScanner *theScanner = [NSScanner scannerWithString:temp];
// here you parse the website looking for your phrase "the current website is".
// Check it's value against something stored in your app and if they don't agree issue an alert