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 9095497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:36:57+00:00 2026-06-16T23:36:57+00:00

Changed code and released. Now app is timing-out at launch while updating persistent store

  • 0

Changed code and released. Now app is timing-out at launch while updating persistent store coordinator to new model. Want to know if the migration is transactional so I can work out what to do to fix. Migration would have got x% through migration before timing out.

If transactional I just need to launch app first and then migrate. If not transactional I’m concerned users will have a schema that is only partially migrated.

Background

Code used to call

persistentStoreCoordinator_ = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];

It fails when newer model of database exists, as expected. Previously user would be prompted to update database via a UIAlertView. Then the following statement would be called.

[persistentStoreCoordinator_ addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:optionsDictionary error:&error]

I decided to run the second line of code if initWithManagedObjectModel failed. Not so stupid except this statement is run within the `- (NSPersistentStoreCoordinator *)persistentStoreCoordinator ‘ method so the app now times-out when launching, sometimes.

At this stage I don’t know what to do. Will the database be half-mapped to the new model or will it still represent the previous model?

  • 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-06-16T23:36:59+00:00Added an answer on June 16, 2026 at 11:36 pm

    Core Data migration is transactional in the respect that migration is done in memory and the old database is replaced with the new version, in memory, once completed.

    So the time-out problem I was having trying to migrate while launching was resolved when the migration process was removed from the didFinishLaunchingWithOptions method. The new update fixed the problem for those who had timed-out with the previous upgrade.

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

Sidebar

Related Questions

I have changed a lot of things in a java code but now I
I recently released a new version of my iPhone app that was built for
I changed the code shown below into ARC compatible. I just changed it as
I have the following code (changed object names, so syntax/spelling errors ignore). public class
This code used to work. Then, maybe I changed something, somewhere (or if I
I wrote some code today and It was changed by another developer who said
This code was working earlier today, then randomly stopped, something must of changed, but
The other day this code was working. I changed some things and re-ran it
I've changed from Git to SVN the folders which contains the project's code, but
I am using generic code (from the iOS Fireworks demo) in a slightly changed

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.