GNOME Bugzilla – Bug 723632
NSGetEnviron() in use by glib's genviron for iOS / arm
Last modified: 2014-02-04 21:24:29 UTC
I've run nm on the GStreamer framework (1.2.x) and it appears to include the use of NSGetEnviron(): GStreamer(libglib-2_0_a_armv7_-libglib_2_0_la-genviron.o) (for architecture armv7): U __NSGetEnviron for the arm architecture in glib's genviron. This is true of the prebuilt libraries and building via cerbero. Unfortunately this call will cause a private API use rejection upon submitting an iOS app to Apple. NSGetEnviron() is an OS X thing that's not supported on iOS to the best of my knowledge (at least officially). The issue appears to lie in cerbero/sources/ios_universal/armv7/glib-2.38.0/glib/genviron.c: #ifdef HAVE__NSGETENVIRON #define environ (*_NSGetEnviron()) #else /* According to the Single Unix Specification, environ is not * in any system header, although unistd.h often declares it. */ extern char **environ; #endif I don't know whether HAVE__NSGETENVIRON should be defined differently somewhere for iOS arm builds or the file should be patched such that it calls a dummy function?
This should fix it, it's not 100% clear to me if accessing the environ array is allowed on iOS or not though :/ commit 868421616a9eb79ca1aea29250300ffcbed8ad51 Author: Sebastian Dröge <sebastian@centricular.com> Date: Tue Feb 4 22:14:24 2014 +0100 ios: Don't use _NSGetEnviron(), it is private API on iOS https://bugzilla.gnome.org/show_bug.cgi?id=723632