forced update

we are trying to add an option to for our app user to update the app whenever there is a new build available on the app store. Can we have tried to look for this option in the help center but did not find any reference to it. Can someone direct us in the right direction on how to accomplish this function?

Replies

Seen this previous thread?

https://forums.developer.apple.com/message/329832#329832


Note you may want to move this to the 'App Store' forum...

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