Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3306994
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:21:15+00:00 2026-05-17T21:21:15+00:00

in my app i am unzipping a zip file(in splash view controller) later i

  • 0

in my app i am unzipping a zip file(in splash view controller) later i am displaying an image and firing a timer with 4 secs to change image of the previous image view. and later in view did appear i am firing another timer with 10 secs to call next view controller(home view controller).. and there i have a button to go Story view controller…in this i am using the unzipped data…its taking some time to unzip in this case. so the images r displaying later a few seconds…it fine here

the problem is… i called the unzipping on background thread so its displaying the images quickly and its moving to home view controller..while going to next view controller by clicking a button its crashing on device but its working fine in simulator..

can any body help me out please

Thanks.

code…

-(void)viewWillAppear:(BOOL)animated{
    [self performSelectorInBackground:@selector(unXip) withObject:nil]; 
    CGRect imageFrame = CGRectMake(0,20,320,460);
    splashView.frame = imageFrame;
    splashView.image = [UIImage imageNamed:@"Default.png"];
    [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(changeImg) userInfo:nil repeats:NO];
    [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(changeImg2) userInfo:nil repeats:NO];


}

-(void)unXip{
    self.fileManager = [NSFileManager defaultManager];
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
    self.documentsDir = [paths objectAtIndex:0];
    NSString *filePath = [NSString stringWithFormat:@"%@/temp", self.documentsDir];
    NSString *filePathbmlg = [NSString stringWithFormat:@"%@/temp/bmlg", self.documentsDir];

    NSString *updateURL = [[NSBundle mainBundle] pathForResource:@"bmlg" ofType:@"zip" inDirectory:@"res"];

    [fileManager createDirectoryAtPath:filePath 
           withIntermediateDirectories:NO
                            attributes:nil
                                 error:nil];


    if([fileManager fileExistsAtPath:filePath]) {
        NSLog(@"File exists at path: %@", updateURL);
    } else {
        NSLog(@"File does not exists at path: %@", updateURL);
    }

    NSLog(@"Checking update at : %@", updateURL);
    NSLog(@"Checking filepath at : %@", filePath);

    if(![fileManager fileExistsAtPath:filePathbmlg]) {  

        ZipArchive *zipArchive = [[ZipArchive alloc] init];

        if([zipArchive UnzipOpenFile:updateURL]) {

            if ([zipArchive UnzipFileTo:filePath overWrite:YES]) {
                //unzipped successfully
                NSLog(@"Archive unzip Success");
                //[self.fileManager removeItemAtPath:filePath error:NULL];
            } else {
                NSLog(@"Failure To Unzip Archive");             
            }

        } else  {
            NSLog(@"Failure To Open Archive");
        }

        [zipArchive release];
    }
}   

- (void)changeImg{

    splashView.image = [UIImage imageNamed:@"screen2.png"];

}

- (void)changeImg2{

    splashView.image = [UIImage imageNamed:@"screen3.png"];
}

- (void)viewDidAppear:(BOOL)animated{   
    [NSTimer scheduledTimerWithTimeInterval:15 target:self selector:@selector(pushCVC) userInfo:nil repeats:NO];
}

- (void)pushCVC{
    homeViewController = [[HomeViewController  alloc] initWithNibName:@"HomeView" bundle:nil];
    [self presentModalViewController:homeViewController animated:YES];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:21:16+00:00Added an answer on May 17, 2026 at 9:21 pm

    thanks for your comments and answers….

    The problem is the unzipping process is taking a long time…so if i click start button on the home screen before the completion of the unzipping the file, its crashing…because i have to use the data from unzipped file…

    Thanks again..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App has 4 view controllers; Menu, A, B and C, and a singleton class
My app allows user to reorder rows in a table view, but I want
I want to download a 90MB sqlite file to my iphone app from the
my app downloads a zip with about 350 files. A mix of JPG and
i am trying to unzip a file in my iphone app, i searched it
I have a requirement where a zip file is sent to the ROR application
My app has a login screen before a user goes into the main view.
App.Views.VideoView = Backbone.View.extend({ initialize: function() { _.bindAll(this, 'render'); this.model = this.options.model; this.render(); }, render:
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
My app has many controls on its surface, and more are added dynamically at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.