Bug 27456 - App rejected, using Private API _NSGetEnviron
Summary: App rejected, using Private API _NSGetEnviron
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.6.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 8.6.x (services rel)
Assignee: Bugzilla
Depends on:
Reported: 2015-02-26 08:25 UTC by Luzanne
Modified: 2015-02-26 16:41 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Luzanne 2015-02-26 08:25:57 UTC
iOS apps get rejected today (26 february 2015) with this message:

Non-public API usage:
* The app references non-public symbols in ApplicationName: _NSGetEnviron

When I use the nm tool on the binary, it matches.

MacOSX:ApplicationName.app user$ nm ApplicationName | grep NSGetEnviron
U __NSGetEnviron

When create a new project in Xamarin Studio, it also matches on _NSGetEnviron.

Xamarin.iOS Version:
It is a Unified project.

See also: http://forums.xamarin.com/discussion/33972/app-get-rejected-nsgetenviron
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-02-26 08:35:52 UTC

maccore/master: 51ef9a7074bc3bb26f0407c4578776156bc76ee4

Leaving open since we should get this out in a service release asap as well.

This only occurs with ARM64, so a potential workaround (for app upgrades) is to disable ARM64 in the project's build options.
Comment 2 Luzanne 2015-02-26 08:39:28 UTC
When do you expect the service release? Today, tomorrow, a week?
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-02-26 09:21:25 UTC
We're trying to get something out today.
Comment 4 Sebastien Pouliot 2015-02-26 09:53:39 UTC
Backported to monotouch-8.6.0-branch to be included in the service release
Comment 5 Mohit Kheterpal 2015-02-26 12:48:20 UTC
I have tried to verify this issue but I am not sure about the steps.

I have used X.iOS

I have followed following steps : 
1. Create Unified template application 
2. Build for device

Now using command nm ApplicationName | grep ApplicationName. 

Output : https://gist.github.com/Mohit-Kheterpal/feb3b6623d781bf5966e

still getting "_"  before application name 

Please let me know if I have to check something else to verify this issue.
Comment 6 Rolf Bjarne Kvinge [MSFT] 2015-02-26 12:52:45 UTC
@Mohit, you need to use this command:

    nm ApplicationName | grep _NSGetEnviron

if nothing is printed, the bug is fixed
Comment 7 Luzanne 2015-02-26 12:57:39 UTC
No, you are in the right directory, but you should use this:

nm texr | grep NSGetEnviron

If the fix is correct, this should not return 'U __NSGetEnviron' when the ARM64 build is enabled.
Comment 8 Mohit Kheterpal 2015-02-26 13:15:00 UTC
Thanks Rolf & Thanks Luzanne.

I am able to reproduce this issue with X.iOS : http://www.screencast.com/t/fYqAlIPbgVBt

and the issue is fixed in X.iOS : http://www.screencast.com/t/Z85Z4NZJvh

Hence closing this issue.
Comment 9 Sebastien Pouliot 2015-02-26 16:41:08 UTC
XI is now be in the beta channel (and should be on stable next Monday).