If a project has already been created with ARC disabled, how do I enable it and vice versa?
Swift uses Automatic Reference Counting (ARC) to track and manage your app's memory usage. In most cases, this means that memory management “just works” in Swift, and you don't need to think about memory management yourself.
Automatic Reference Counting (ARC) is a memory management option for Objective-C provided by the Clang compiler. When compiling Objective-C code with ARC enabled, the compiler will effectively retain, release, or autorelease where appropriate to ensure the object's lifetime extends through, at least, its last use.
Open your project and select Edit -> Refactor -> Convert to Objective-C ARC. This will start checking your code if it is ready for the conversion.
See also Clang documentation: Objective-C Automatic Reference Counting (ARC)
How to disable ARC has been answered here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With