Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuperCoreDataStack has no flexibility and doesn't support multi-threading #22

Open
michaelarmstrong opened this issue Mar 13, 2015 · 1 comment
Assignees

Comments

@michaelarmstrong
Copy link
Owner

SuperCoreDataStack assumes your backing store is named the same as your App name. Additionally it uses the Apple boiler-plate and does not support any CoreData configuration other than a single main thread context.

Calls also require an explicit mention of either defaultStack or inMemoryStack... this pattern needs improving to a single line of setup in the AppDelegate on app launch.

It should firstly allow the user to specify which stack to use. Something like:

SuperCoreDataStack.setup(type: SuperRecordStackType, storeURL: NSURL = someDefault)

So you can do...

SuperCoreDataStack.setup(.inMemoryStore)

or something like the following.

 //let sharedURLForAppGroup = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("com.someidentifier")

let sharedURLForCloud =      NSFileManager.defaultManager().URLForUbiquityContainerIdentifier("com.someidentifier")

SuperCoreDataStack.setup(.persistentStore, sharedURLForAppGroup)

which gives the user much more flexibility.

This will also make the stack: property in all related calls purely optional and an override of this setting.

I will begin this part of the work today.

The threading model i'll open a separate issue for as I have some ideas which i'd like to share and get commentary back on.

@PGLongo
Copy link
Collaborator

PGLongo commented Mar 19, 2015

Add a delegate to handle error saving context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants