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?
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.
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