As I said in the title, I am writing an app for iPhone which runs perfectly in debug mode but when I build it as release and install it via TestFlight, it crashes.
Due to the crash log it might have to do something with this lines:
let path = NSBundle.mainBundle().pathForResource("PrinterList", ofType: "plist")
if path != nil {
let printerDic = NSDictionary(contentsOfFile: path!)
let printerList = NSArray(array: printerDic.allKeys)
printerNames = printerList as [String]
}
I am using an framework from Brother to print without AirPrint, but I think thats not the problem because the app crashes before doing something with the framework.
It crashes only in this ViewController where I execute these lines. I need the framework only in this ViewController as well.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…