the error message
2023-04-17 17:05:40.480808+0800 App[50867:2284976] [error] warning: dynamic accessors failed to find @property implementation for 'name' for entity 'User' while resolving selector 'setName:' on class 'Framework.User'. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
the failing codes
If I uncomment the load() function below, the save() function can be executed correctly. It doesn't matter if the load() function is executed or not. It does matter if the codes in load() function exist.
Xcode: 14.3 macOS: 13.0.1
I cannot attach zip files here (dunno why) but the project can be found in [https://github.com/tuist/tuist/tree/main/projects/tuist/fixtures/ios_app_with_coredata_in_static_framework]
I did a little research. The key for CoreData to work is to have User.fetchRequest()
presented in the code.