It's way too easy to forget that attributes like `[NoiOS]` means the code
is not generated (for bindings) on that platform but that they will be
compiled for _manual_ bindings (not run thru the generator).
This can expose types (and API) that are not usable on some platforms.
This new test checks that the `[No*]` and `[Unavailable]` attributes
are not in their respective platform assemblies.
For compatibility (existing mistakes) we ignore the check on API that
are decorated with `[Obsolete]` attributes.
Changes in the bindings are fix such mistakes - mostly adding the
`[Obsolete]` attribute.
Fix https://github.com/xamarin/xamarin-macios/issues/4835
* Replace `memcpy` with `Buffer.MemoryCopy`
* Add cecil-based test to make sure we're not p/invoke into it again (nor any other MS banned API)
* Remove `memcpy` from xtro ignore file
inside the product assemblies [1]. The latter brings a lot [2] of the BCL
into the application for, eventually, ending up back to `NSLog` anyway
Also include a, cecil-based, test to ensure we don't regress.
[1] except for Xamarin.Mac.dll since there's a workaround for a
Sierra (only) bug
[2] https://gist.github.com/spouliot/c63343c1a76f4e49248be3a2c7aa25ed
Only one to start... it's been discussed before but we generally
found other ways to do them. Let's continue to pick the best place
but we now have more options :)