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

Nil pointer Exception if target contains a space #36

Open
PGLongo opened this issue Apr 27, 2015 · 1 comment
Open

Nil pointer Exception if target contains a space #36

PGLongo opened this issue Apr 27, 2015 · 1 comment
Assignees
Labels

Comments

@PGLongo
Copy link
Collaborator

PGLongo commented Apr 27, 2015

If the target as a name with space like "Super Record" iOS replace the space with an "_" so the correct name for the model become "Super_Record.momd"

I have solved temporarily changing:

let infoDictionary = NSBundle.mainBundle().infoDictionary as NSDictionary?
let stackName = (infoDictionary!["CFBundleName"] as! String)
let storeName = stackName + ".sqlite"

with

let infoDictionary = NSBundle.mainBundle().infoDictionary as NSDictionary?
let stackName = (infoDictionary!["CFBundleName"] as! String).stringByReplacingOccurrencesOfString(" ", withString: "_")
let storeName = stackName + ".sqlite"

@michaelarmstrong you should considering it if you are writing the new stack.

@michaelarmstrong
Copy link
Owner

Tackling this as part of the Stack refactor.

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

No branches or pull requests

2 participants