SuperRecord icon indicating copy to clipboard operation
SuperRecord copied to clipboard

Nil pointer Exception if target contains a space

Open PGLongo opened this issue 9 years ago • 1 comments

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.

PGLongo avatar Apr 27 '15 14:04 PGLongo

Tackling this as part of the Stack refactor.

michaelarmstrong avatar Oct 21 '15 13:10 michaelarmstrong