Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
We got the following comment after an upload in Apple Store (iTunes):
We found the following non-public API/s in your app:
With "strings" & "tool" we find those references in the following dll:
After a long try and error we came up with the following diagnose:
Compiling and building an IOS App with "Don't Link" option will create the existence of those non-public API/s
Compiling and building an IOS APP with "Link SDK assemblies only" will remove those non-public API/s
The problem is however that we have an App with external dll's were we have to set the option "Don't Link" when building the App. Also setting the build option to "Don't Link" in a random project (already in the App store - not using any external dll's) will create the same references to those non-public API/s.
How can we fix/avoid this?
It is not recommended to not link your app, since the app size will be significantly bigger than when you're linking (either all assemblies or just sdk assemblies).
The recommended way to fix this is to be more fine-grained when specifying what you want to keep in the app, and this process is described under "Custom Linking" here: http://docs.xamarin.com/guides/ios/advanced_topics/linker.
Note that video:didFinishSavingWithError:contextInfo: shows up in Apple's documentation here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UIImageWriteToSavedPhotosAlbum - so it is odd that Apple flags this selector as non-public. The other two are non-public.
I understand exactly what you mean by "It is not recommended to not link your app", but we are in the middle of a situation were we have to use a 3rd party Lib on which we do not have any control.
It is still odd though that those non-public API/s are not sitting in the 3rd party library, but in monotouch.dll itself. Even a build with almost nothing in the application then "Hello World" is generating this.
> we have to use a 3rd party
That should not be an issue. Link SDK (default) won't modify 3rd party code (only the code that Xamarin provides).
> on which we do not have any control.
You still have some control. E.g. if the 3rd party library depends on something (e.g. thru reflection) removed from the SDK assemblies then it can be preserved using other methods (like an XML file).
Using "Don't link" should *only* be used to debug issues (e.g. confirm if something is related to the linker) and never to release applications. You're missing tons of optimizations (in the bindings) that slows down your application and make it a lot larger that it needs to be,
> Even a build with almost nothing in the application then "Hello World" is generating this.
That's normal. If you select "Don't link" then monotouch.dll won't be processed (it's an SDK assembly) and you'll be using the "full" monotouch.dll.
Now monotouch.dll contains *all *the bindings for iOS API that Apple provides. If one of Apple's ObjC selectors is changed to be "private" then it will be part of the final executable.
Seams that everything is working as designed then!
Message understood, Loud and clear.
In the meantime... We are working on a build were we can use the 3rd party library in a "Link SDK assemblies only", as they will never be able to use their lib on IOS anyway in "Don't Link" mode!
Txs for the support!
This has been fixed.
monotouch master: b3c67fa2194fc0106335eeb9bbef0779701e036c and 3f5242994c0a0abaee48e289b4677120ae9987a4.
Unfortunately I can't say right now which version of Xamarin.iOS will include these fixes.