- Home /
Can I enable null reference checking in production code on iOS
Can I enable null reference checking in production code on iOS? I don't want my app crashing with exc_bad_access when I coud catch the exception and recover cleanly. Performance is not an issue - the development build is plenty fast enough.
Answer by Claytonious · May 18, 2012 at 08:56 AM
Yes, in player settings, set Script Call Optimization to "Slow and Safe". It's still up to you to use try/catch to catch all exceptions, but you can simply try/catch in all of your Update() or wherever your code might run.
I already have that set but (on iOS at least) I still get an exc_bad_access ins$$anonymous$$d of a null reference exception...
Your answer
Follow this Question
Related Questions
Null exception for public variable 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
IOS Xcode crash only when connected to Xcode 0 Answers
NullReferenceException il2cpp 0 Answers