• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best Way to Access Separate Core Data Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Way to Access Separate Core Data Document


  • Subject: Re: Best Way to Access Separate Core Data Document
  • From: mmalcolm crawford <email@hidden>
  • Date: Sat, 21 May 2005 22:27:41 -0700


On May 21, 2005, at 10:05 PM, mmalcolm crawford wrote:

    addPersistentStoreWithType:configuration:URL:options:error:

You may care to ensure it's read-only:

NSPersistentStoreCoordinator *psc = [[self managedObejctContext]
    persistentStoreCoordinator];

NSDictionary *readOnlyOption =
[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES]
forKey:NSReadOnlyPersistentStoreOption];


NSError *error = nil;
sharedStore = [psc addPersistentStoreWithType:NSXMLStoreType
                                configuration:nil // or custom config
                                          URL:sharedStoreURL
                                      options:readOnlyOption
                                        error:&error];

although it shouldn't strictly be necessary if the application logic is correct...

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Best Way to Access Separate Core Data Document (From: Marc Blatt <email@hidden>)
 >Re: Best Way to Access Separate Core Data Document (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Best Way to Access Separate Core Data Document
  • Next by Date: Re: Strategy for using common classes in multiple Cocoa
  • Previous by thread: Re: Best Way to Access Separate Core Data Document
  • Next by thread: Re: Strategy for using common classes in multiple Cocoa
  • Index(es):
    • Date
    • Thread