-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Referenced non-public APIs which caused AppStore rejection. #74
Referenced non-public APIs which caused AppStore rejection. #74
Conversation
I see that these methods are from mogenerator. I'm guessing that @apersaud didn't use mogenerator; and by not doing so - these methods have not been publicly declared in his project nor in Apple's Core Data framework. Hence Apple deems these calls as non-public, simply as they haven't been declared anywhere at all. Perhaps all you have to do is create a protocol in MagicalRecord, as below, to 'publicly declare' these methods. Then Apple might accept the rejected method calls.
Anyways, I'd also like to say thanks for writing this library. I've only been using Objective-C and the iOS-SDK for a week and have found MagicalRecord a pleasure to use. Keep up the good work! |
I followed the directions on how to include MagicalRecord files into my project. Should the be updated to show something different like using mogenerator? I would be nice to know if anyone else got the warning when submitting to AppStore. On Oct 16, 2011, at 11:45 AM, Simon Bartlettreply@reply.github.com wrote:
|
I think the problem can be solved simply, by the MagicalRecord team including the protocol I wrote above in their codebase, but that's just my hunch though. The protocol serves no purpose other than making the methods publicly declared. If my solution is acceptable, the installation instructions would stay the same. |
I've had the same warning totday when submitting to the AppStore. |
I talked with a contact at Apple recently, and the word is there have been some false positives in this area now that iOS5 is also being checked. I believe this was one of those false positives, as this is the first and only time I've heard of anyone being rejected from either AppStore for using MagicalRecord. I've shipped several apps with it myself. I'm not going to accept this change since this is basically a problem with the app review team's toolset at the moment. If this happens again, please send me an email, and we'll try to clear it up with Apple once and for all. |
I have the same issue today, I don't know why..... Is there anyone know how to fix it? This issue has been raised one year ago..... |
This happened to me as well. It seems other projects have faced this same problem, and decided to remove the calls to Mogenerator specific additions, e.g. It would make it much easier to integrate MR into apps that don't also use Mogenerator if the spirit of this patch were applied, e.g. use use the "fallback" logic already present in these two methods. |
I don't see any real downside to remove the mogenerator-specific code. You should not be doing managed object setup or customisation in either of those methods, so the only thing it's doing is saving us a little bit of boilerplate code. @magicalpanda/team-magicalrecord — any objections to dropping dependencies on mogenerator-derived NSManagedObject methods? In the worst case, we could provide our own prefixed versions of these methods and use those instead (although I think that's largely unnecessary). |
This warning shows up when submitting app for iOS7, using XCode 5. I modified Core Data files and removed usage of "performSelector" and made sure all of my model classes have "MR_entityName". I did exactly what @tonyarnold in his pull request and it passed validation, no problems. |
Thanks @tonyarnold. I changed MagicalRecord file as in the pull request and now my app is waiting for review. |
I just got the same warning when submitting my iOS7 app from Xcode 5: "The app references non-public selectors entityInManagedObjectContext: insertInManagedObjectContext:" I'm using MR release 3.0, without mogenerator. |
Wow, @koenvanderdrift you're very, very keen. MagicalRecord 3.0 is very early in it's development — I wouldn't be comfortable shipping it in any of my own apps just yet. As has been stated a few times before, they're just warnings. All of the apps that have seen this warning have been approved without fanfare, so there's no immediate issue to worry about here (although I'd like to see if we can solve the problems before MR 3 is released). |
Thanks @tonyarnold, I didn't realize release 3.0 is still very early in development. I guess I got confused since it is called 'release'. Anyway I'll sit and wait and see what happens and post back here. |
Yeah, that's our mistake with the naming — sorry about that. I think @casademora is going to move the branch to a more appropriate location shortly. It's early days, and Saul is playing with a bunch of really interesting ideas but he needs to be able to do that without worrying about backwards compatibility or breaking people's builds. If you're happy to work with an influx API, go for it — we can definitely use the help testing things — but it's not really fit to ship in your apps yet. |
Yes same here, I went back to 2.2, and still got the warnings as well. I'm submitting it anyway, and we'll see. On Oct 4, 2013, at 11:10 AM, emielvdveen notifications@github.com wrote:
|
Same here, just submitted to Apple with those warnings. |
I got the same issue, don't know how to fix properly, for the time being i have commented out both the methods which were causing warnings. If anyone know the best solution please let me know.
|
FYI, my app was just approved with these warning. |
I got MR 2.2 installed with CocoaPods and I'm getting 8 warnings for undeclared selectors in iOS 7 app. Is there anything wrong with my configuration or how to get rid of those warnings? They are described below:
|
I have the same issue - a boatload of warnings regarding undeclared selectors in iOS7 |
Hi, see "New compiler warnings after updating CocoaPods from 0.25 to 0.26" You can switch this also off if you set the compiler warnings: |
For now, you can try the following "fix" if the warnings really bug you. Update the MagicalRecord line in your Podfile like so:
I think I got the syntax right for that… |
Please do not write ignore warning techniques as a solution. They are there for a reason. The compiler warnings are not CocoaPod's fault, but MagicalRecord. The pod must be updated to get rid of the warnings. |
"For now…" If you'd like to contribute a fix for this issue, please feel free. Right now, I don't have time — so what I've suggested is a workaround for the moment. The warnings are harmless in this context. |
I will deploy the fix, if you will verify that my code does not break anything else (I did not yet do a deep down check how MR works). And of course deploy it. Edit: Created pull request #598 - Added protocols to get rid of Xcode 5 warnings. |
Also using 2.2 with the same issues. Will try to submit the app today. |
I can confirm that my application was approved even with these warnings. |
Many thanks. I will use the ability to set "undeclared selector" to NO. |
So... what do actually those 2 methods do?
and it was forking without any warnings. Now I use 2.2 version and this protocol is not working any more. So I was thinking that the problem is because the methods are not declared anywhere ... why not declare them?
But this might not be a good idea. So instead I found a new solution and you have to change this:
to this
Do similar also for entityInManagedObjectContext. The warnings in validation are gone. Unfortunately you will see a semantic issue in xCode: "PerformSelector may cause a leak because its selector is unknown". It is a just workaround. So no solution yet. |
The methods are defined by mogenerator, not by MagicalRecord. We make use of them if they exist on your entity subclasses so that you guys don't have to double up on implementing things (although you really shouldn't need to subclass There's no easy answer to this — implementing a protocol doesn't force people to adopt it, and your second answer is not a good idea: you're effectively registering the method with the runtime, regardless of it's existence. Can I ask if you guys are defining |
No, I don't use MR_SHORTHAND. |
I use the MR_SHORTHAND, but it does not change anything apparently. |
|
Magicalrecord doesn't rely on those methods..it does check if they exist and use them rather than the default methods. The reason for this is that your entity name and the actual class name can be different. Mogenerator sees this in your model file and maps the two with the methods in question. If you have core data code without mogenerator, do the warnings still appear? Sent from my iPad
|
Yes, I am facing the same issue myself. I can confirm that even if you don't use mogenerator, the warnings still appear. I just submitted my app for review and am crossing my fingers that it would be approved. |
Same for me today. I've just submitted my app and crossing my fingers too ;-) (with MagicalRecord 2.2) |
BTW, mine got approved without any problems. Good luck to you. Sent from my iPhone
|
lol. Grepped Popped it open in Hopper. Turns out PhotoLibraryServices uses mogenerator to generate its classes. Doesn't matter if I rename these methods, they're just show up again in the next version of PhotoLibraryServices (assuming Apple upgrades to the latest version of mogenerator) and will be erroneously flagged as non-public all over again. |
Oh geez. Thanks mate. |
So a little birdy appears to have let @rentzsch know that the mogenerator methods have (finally) been whitelisted! These warnings should disappear automatically. 👍 💣 🍷 |
Thats great to hear. Although we've pushed many apps to App Store without rejection. |
First of all, great work on MagicalRecord. Coming from a ruby background, it made CoreData a whole lot easier.
I had issues submitting my application this weekend and Apple's ApplicationLoader (the new one which scans private APIs) flagged the methods in this commit as issues (which caused rejection of binary). The error from Apple was:
The app references non-public selectors in PocketSalsa.app/ PocketSalsa: entityInManagedObjectContext:, insertInManagedObjectContext
.After editing my fork and making sure my edits worked, I resubmitted it and the binary it was finally accepted. There is probably a better fix for this, but I'm not an expert on MagicalRecord as you are.
Thanks.