App Rejected due to "usage of Private API"

We just received word back from Apple that our app was rejected because we used the following non-public APIs:

_NSGetEnviron
exc_server

I only use Unity; we don’t make any external calls, etc. So I have no idea why these calls are made, or where these calls are made.

Can Unity confirm if the engine makes calls to these APIs?

Anybody have this same issue, or know how I can track these down in code (ie, what in Unity invokes these calls, etc.)?

UPDATE:

I used the nm tool to dump the symbols for the app and found references to both _NSGetEnviron and exc_server.

I then did the same thing with another Unity app, and the references were there too. (This particular app was approved).

Finally, I did the same thing with our non-Unity apps in the App Store and there are not any references to those two methods.

It appears that Unity does reference them, though I don’t know if they are actually invoked.

Can Unity comment on their inclusion and whether or not they are invoked? I’m not sure what to tell Apple at this point.

Hello,
_NSGetEnviron is used by Mono runtime to provide implementation of .NET core API method: Environment.GetEnvironmentVariable().
exc_server is also used by Mono runtime to provide graceful NULL reference exception handling.

Both these references do present in all applications built with Unity iPhone and it never was a cause for application rejection.

If negotiation with Apple gets too slow or becomes obviously fruitless I would recommend just resubmit the same application as new one. Many users solved their rejection problems in a such way.

This concerns me a little, when I submit an app, I have to wait 2 weeks before it gets rejected only to resubmit and wait another 2 weeks? Is Unity breaking a rule by calling these or not? Can we find documentation from Apple that state calling these are ok? Or is there documentation stating the opposite?

UPDATE

I have an update, and it ain’t pretty…

I got off the phone with Apple, who stands by the rejection saying that the two calls they referred to as private APIs cannot be used. He said for our game to pass, we would need to have them removed from the binary. Unfortunately, we cannot do that as they are part of the Unity engine. He implied that they are scrutinizing things more and if the app fails the check it will be rejected.

Obviously, it doesn’t appear many Unity games are getting rejected over this. But that could start. Most of us are familiar with how arbitrary and subjective that whole process is (so much so, that people at Apple have called it arbitrary and subjective).

Would appreciate it if Unity could comment on the possibility of not referencing private APIs in a build. I certainly don’t blame them, especially since games built on their engine have been approved without problems (our past Unity games have been approved); I feel this is just another way Apple passive aggressively demonstrates their hatred for developers :slight_smile: Still, if the engine does make use of those methods and Apple is being more diligent about searching for them, I need to know I am not spending months on a gamble.

Would love it if Unity did a port for Android too; I’m tired of this Apple BS.

Thanks

As a new Unity iPhone developer, I want to see an answer to this also. This makes the tool useless to me, if I can’t sell my apps.

please let us know what happens when you resubmit your app.

This concerns me too because I make a game for a company and I don’t want get problems with they.
A important point for us.

My latest game iStarForceFighter is already on AppStore, but it’s created with unity 1.4. I don’t know if it includes this API call.

We just received a rejection notice for this very reason.

  • Jason

This is a giant load of bullcrap and we need to get this public. Any tips on how to get this seen by a lot of eyes? Apple has a history of relenting on their stupidity after people complain about it. Here’s one example:

I think we could use some big players who are willing to come forward. Who has actually made a lot of money for Apple with their game other than the Zombieville people?

Has this been reported as a bug using the bug reporter? I think since we have word of multiple developers having this issue that Unity needs to either get on the phone with Apple about this issue, or they need to modify how the engine operates.

I realize that it’s not really Unity that’s at fault but the ever-moving target of the black box known as App Store approval. But unfortunately, the only ones who can do anything about this is Unity at this point.

edit: A client of ours will be submitting a game we developed for them using Unity tonight. I’ll post back here if they run into any issues. It’s wonderful that Apple decides now’s the time to start doing this when we’ve got lots of projects all getting finished up.

@JasonAsbahr: Sorry to hear that. You seem pretty calm about it. We were discouraged. And pissed.

@Jessy @jerrodputman: Totally agree. We need to do both; complain to Apple (which rarely works) and ask Unity to (a) contact Apple to figure out what’s going on and (b) get us an update that doesn’t include the offending methods (and any others Apple will complain about).

This sucks for Unity because there was no reason to assume any problems. But…with rejections now occurring based on these methods, every submission is a gamble. We need this fixed yesterday; we were in review for over 3 weeks before getting the rejection notice.

Friggin’ Apple. Our last app was rejected because we decided to forgo running ads and instead endorsed a charity. Apparently, you can’t endorse a charity, so heads up to those looking to do the same.

Terrifying. I submitted Ravensword a week ago, and I have just barely enough money to carry me 60 days until I start getting paid.

My partner would absolutely freak if he heard this.

Know just how you feel. It seems like this is a test Apple is just starting to apply, and as with all things App Review related it seems hit or miss, so hopefully you get through safely.

There isn’t any version 1.4…there’s 1.0, 1.0.1, 1.0.2, 1.0.3, and 1.5. The latest version of my game was submitted with 1.1 (now known as 1.5), and had no issues, but that was a few months ago. Also it was an update and not a new game.

–Eric

Did you email Unity Support on this?

Yup, emailed support earlier.

I submitted a game two months ago and didn’t run into this problem. My latest submission wasn’t so fortunate.

Yep, this is first rejection for such reason. There are more than 300 Unity iPhone applications existing on Appstore and having these references, but none was rejected for this before. We are working on fix and if everything goes well it will be included into Unity iPhone 1.5.1, which is entering RC phase next week.

sorry, I meant the version 1.0.3.

We have not been rejected for this reason, but on occasion for other similar technical reasons. Simple resubmission usually does the trick. It seems that there is quite a bit of variability in terms of how thorough the approvers are. I would imagine the job at Apple is about a step above being a customer service rep and is done by legions of people who are a couple of months into their first job out of college. These people are working out of manual with no experience and therefore will do, frankly, stupid things because page 47 in the manual says so (consistency being the hobgoblin of simple minds, of course).

The good news, though, is that by not knowing what they are doing, they also let a lot of stuff through, which is why resubmission usually does the trick. Of all the rejections we have received, we have done nothing other than simply resubmit them, and almost all went through the second time, and 100% by the third time. I think this also debunks the notion that they will scrutinize rejected apps more thoroughly if resubmitted. I think that is probably only true if objectionable content is involved, and then because the second and subsequent looks get kicked to more senior approvers. There couldn’t possibly be enough senior approver resources, to arbitrarily flag resubmits for more scrutiny.

Is there a way to receive this RC build before it’s released? I was intending on submitting my product in about two weeks time but this issue will probably delay my submission.