-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename +entityName ? #196
Comments
see also #195 |
I'm not sure — entityName is perfect, but if you run the following in a vanilla app without anything but the CoreData and Foundation frameworks imported, you get a return of NSLog(@"Responds to entityName: %i", [NSManagedObject instancesRespondToSelector:NSSelectorFromString(@"entityName")]);
NSLog(@"Responds to entityName: %i", [NSManagedObject respondsToSelector:NSSelectorFromString(@"entityName")]); It's definitely in there somewhere — I'm not sure where it's coming from though (a wayward category in the SDK?). Perhaps |
We've also had reports of users getting warnings for Seems awfully odd that the |
Ooo, I bet +entityName may be coming from when EOF support was pushed into Foundation in the Stone Ages. Even a Foundation tool with NSObject passes the test:
Nice detective work. I like |
Perfect, I'll work up a PR! |
And amend my snarky radar… 😒 |
For the record, NSObject doesn't respond to |
Odd — I could have sworn we had a few reports from iOS users. Oh well, it's good that it's not a problem there. So what's the plan? You mentioned on twitter that you have an idea for a workaround. I assume given some of the eyeballs on our conversation and your post, the whitelist will probably be updated for the validator soonish. |
I'm expecting to know more on Monday. So holding position until then. |
@rentzsch can't we close this issue out now? |
Yeah, I think so. Closing. |
@tonyarnold mentions in #170:
Thoughts:
class-dump
-ed CoreData.framework for both 10.9.2 and iOS 7.1 and couldn't find+[NSManagedObject entityName]
. There's not even an-[NSManagedObject entityName]
. I haven't seen this warning myself, does it actually point the finger atNSManagedObject
?+entityName
just to avoid this warning. We've performed these types of work-arounds in the past.What's a good, non-conflicting name? I'd like to avoid simple prefixing like
+mo_entityName
since the other methods aren't currently prefixed like that.Perhaps something like
+entityNameString
(ugh) or+modelEntityName
(still ugh, but better to my eyes)?The text was updated successfully, but these errors were encountered: