I am creating a framework right now that can work with CoreData if you would like. The framework has functionality outside of CoreData as well. How can I wrap all the CoreData specific code in IfDef's, checking if the CoreData framework is available?
Checking for Presence of Objective-C Framework
What you will want to do is use a weak link to the CoreData foundation. Once you do that you can use runtime checks to make sure that CoreData is available. Constant variables can be checked for existence at runtime as well. If you were to use preprocessor (#if
#ifdef
) checks you would then have two separate framework versions to distribute with each release.
© 2022 - 2024 — McMap. All rights reserved.
#ifdef _COREDATADEFINES_H
? – Fraudulent