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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:34:49+00:00 2026-06-13T16:34:49+00:00

Not having used Core Data on the Xcode simulator before I am curious as

  • 0

Not having used Core Data on the Xcode simulator before I am curious as to why execution seems to stop at the following line (See below). This works just fine on the device but on the simulator [[self managedDocument] documentState] returns (null). I would suspect that this is because the simulator uses the Mac and is not creating the database on disk, but I just wanted to check to make sure that something is not happening that I am missing when running on the actual device.

if([[self managedDocument] documentState] == UIDocumentStateNormal) {
    [self scanDataFromServer:kALL_REACTOR_TEMPS];
}

NOTE:

I don’t need to run on the simulator, I just wanted to check how the application ran with the larger iPhone5 screen whilst Apple get round to shipping the actual device to me.

ALSO:

  1. The simulator is set to retina 4-inch, the device I am using is an
    iPhone4.
  2. The application first creates and populates Core Data, so
    its not a case of a missing file.
  • 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-13T16:34:51+00:00Added an answer on June 13, 2026 at 4:34 pm

    First off, UIDocumentState is an NSInteger enum — it can never be nil or null. It can be uninitialized (garbage) or it can be zero.

    I am not sure what you mean by this:

    I would suspect that this is because the simulator uses the Mac and is
    not creating the database on disk

    The simulator uses the computer’s hard drive as it’s disk and the storage system is no different between the simulator and the device. Of course your application has a different root folder path on the simulator than it does on the device, but that doesn’t matter. You can find the database file within your apps folder on your mac, which will be somewhere in ~/Library/Application Support/iPhone Simulator/.

    I would double check your UIDocument after it is created and make sure it is not nil. Also, log the fileURL of the document and locate that file on your computer to make sure it exists.

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

Sidebar

Related Questions

I have often heard complaints against Java for not having unsigned data types. See
I'm not too used to ORM mapping, having come from a PHP background. I'm
I am having usues with performance when inserting 2000 records in my Core Data
Im new to using core data and having really basic problems. Im trying to
I used the default template provided by Apple with Core Data (managedObjectContext is in
I'm not having much success when attempting building pgmagick on OS X Lion with
I'm not having much luck centering vertically the label I'm adding to the TitleView
What is the advantage with not having a build path in eclipse? Why is
Having searched for a way to enforce immutability of custom types and not having
I've got serious troubles with Windows 7 not having a case-sensitive file system. I'm

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.