It was pointed out that without -fobjc-arc-exceptions flag this will
lead to memory leaks
http://clang.llvm.org/docs/AutomaticReferenceCounting.html#exceptions
Therefore, ARC-generated code leaks by default on exceptions, which
is just fine if the process is going to be immediately terminated
anyway. Programs which do care about recovering from exceptions
should enable the option.
Does anyone has any idea, how I can add -fobjc-arc-exceptions flag correctly, into my XCode?
These are the steps I am trying to do
Select the project at the top left of the project window.
Select the target.
Open the build phases pane.
Select "Compile Sources"
Now, there are around 500+ source code files. I was wondering, should I
Only add -fobjc-arc-exceptions flags, to files SwiftTryCatch.h and SwiftTryCatch.m ?
Only add -fobjc-arc-exceptions flags, to files SwiftTryCatch.h, SwiftTryCatch.m and any *.swift files which is using SwiftTryCatch ?
Add -fobjc-arc-exceptions flags to all 500+ files ?
I am using SwiftTryCatch as a workaround for a rare
NSInternalInconsistencyException
incident.Here's the code snippet.
In https://github.com/williamFalcon/SwiftTryCatch , it is mentioning
Does anyone has any idea, how I can add
-fobjc-arc-exceptions
flag correctly, into my XCode?These are the steps I am trying to do
Now, there are around 500+ source code files. I was wondering, should I
-fobjc-arc-exceptions
flags, to filesSwiftTryCatch.h
andSwiftTryCatch.m
?-fobjc-arc-exceptions
flags, to filesSwiftTryCatch.h
,SwiftTryCatch.m
and any *.swift files which is usingSwiftTryCatch
?-fobjc-arc-exceptions
flags to all 500+ files ?Thank you.