0

I updated the storage methodes of my app from a simple write to file to CoreData. To save all data from previous version I wrote an migration method which the app delegate calls in

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [self checkForPreCoreDataFilesAndMigrate];
    //normal launching 
}

The checkForPreCoreDataFilesAndMigrate method migrates all files from previous version in the CoreData Database.

My Problem now is that I want to stop the appdelegate from doing other thing like loading the Main ViewController with an empty database(which basically works but messes up the migration process).

How can I achieve this? Is there a solution where I still can show an UIAlterView with UIProgressView which were set up by the migration method.

4

1 に答える 1

1

you can use following method for it

[self performSelector:@selector(checkForPreCoreDataFilesAndMigrate) onThread:[NSThread mainThread] withObject:nil waitUntilDone:YES];
于 2013-03-25T12:34:51.197 に答える