Includes support for `UTType`-based `[Field]` in the generator as an
hundred (or so) of them were added. Unit test shows the field-based
properties are working as expected.
There are two method not bound due to a dependency on AVAudioSession that
does not seem to be exposed on Mac OS X.
Related issue: https://github.com/xamarin/maccore/issues/2257
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
We were using the managed name, e.g. `NSUrl`, instead of the native name,
e.g. `NSURL`, when dealing with categories.
To fix this we must resolve the type and this caused issues as other
assemblies (e.g. OpenTK) were not already loaded/cached and some type
could not be resolved (and this throw exceptions)
The runner now loads all assemblies before starting to visit them.
The fix solved a known issue (iOS-NetworkExtension.ignore), some API
that were already bound (common-Foundation.ignore) and also caught an
additional API where we missed a `[NullAllowed]` on a return value
* [arkit] Remove fields (from beta2) to fix introspection
* [tests][introspection] AVMutableMediaSelection is as bad as it's non mutable parent
* [tools] Update IsFrameworkBroken (remove CoreAudioTypes and MediaPlayer)
* [tests][monotouch-test] MKPinAnnotationView seems fixed in beta 2
* [tests][xtro] Update ARKit todo (with previous fix)
A number of APIs added and deprecated in the same release. We will see
that is that about.
The status property move to be a instance property in CLLocationManager,
we expose those and add a deprecation warning. That needs to be ignored in xtro due to issue https://github.com/xamarin/xamarin-macios/issues/9026
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Commits:
i
* [mlaunch] Don't throw if the DVTAnalyticsKit is missing. (#2243) 552919435e
* [mlaunch] Improve makefile to detect when the built app changes and re-install properly. cd37e4d638
* [mlaunch] Use SimDevice.LaunchApplicationAsync to launch applications like Xcode does. 1ad15edeb4
* [mlaunch] Launch watch apps directly in the watch simulator for watch iOS 7+. e57ca5b3c4
* [mlaunch] Fix makefile to work properly. (#2247) af172cdedf
* [mlaunch] Automatically set NSUnbufferedIO in more cases to get text to stdout/stderr without delay. (#2246) 2d025ab025
* [mlaunch] Disable any dock icons. (#2245) e6eed65b74
Complete diff: d4253786c0...e6eed65b74]
Add crash reports to a logs collection we care about, instead of to a logs
collection that's promptly forgotten.
This makes sure crash reports actually show up in the html report.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This will ensure the file isn't kept open until the GC runs, and then
sometimes it can prevent other tasks or targets from opening it if the GC
hasn't run.
Fixes this problem:
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 1 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 2 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 3 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 4 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 5 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 6 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 7 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 8 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 9 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): warning MSB3026: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Beginning retry 10 in 1000ms. Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): error MSB3027: Could not copy "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Exceeded retry count of 10. Failed.
/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4203,5): error MSB3021: Unable to copy file "obj/Debug/Fantas.dll" to "../../../lib/Debug/MonoGame/xamarinios/Fantas.dll". Sharing violation on path [...]/lib/Debug/MonoGame/xamarinios/Fantas.dll
Fixes https://github.com/xamarin/maccore/issues/2137.
Fixes https://github.com/xamarin/xamarin-macios/issues/8940.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* [mono] bump momo to match android
New commits in mono/mono:
* mono/mono@109b4b6f44 [jit] Fix the Activator.CreateInstance () intrinsic for primitive types. (#19989) (#19994)
* mono/mono@15782aa740 If there is a crash and the debugger is attached, we call mini_get_dbg_callbacks ()->send_crash(). That call ends up in mono_debugger_agent_send_crash which does all kinds of questionable stuff like trying to take the loader lock. Eventually it ends up calling socket_transport_send which tries to do a transition to GC Safe mode. I inserted a MONO_ENTER_GC_UNSAFE in mono_debugger_agent_send_crash function and this fixes the assert. (#19992)
* mono/mono@6ea4cbcee0 [2020-02] [merp] Add API methods for getting hashcode/reason of last crash (#19978)
* mono/mono@d45ff3af75 [merp] Add tests for crashing via POSIX signal (#19977)
* mono/mono@bc1dd071a7 [merp] Add a test for Mono.Runtime.SendExceptionToTelemetry() (#19966)
* mono/mono@87ef555701 Emit DWARF debug_abbrev offset for compile units as a label instead of 0 (#19794)
Diff: 8c085a99b3..109b4b6f44
* Bump mono
* Revert "Emit DWARF debug_abbrev offset for compile units as a label instead of 0"
Co-authored-by: Alex Soto <alex@alexsoto.me>
* [mono] bump momo to match android
New commits in mono/mono:
* mono/mono@109b4b6f44 [jit] Fix the Activator.CreateInstance () intrinsic for primitive types. (#19989) (#19994)
* mono/mono@15782aa740 If there is a crash and the debugger is attached, we call mini_get_dbg_callbacks ()->send_crash(). That call ends up in mono_debugger_agent_send_crash which does all kinds of questionable stuff like trying to take the loader lock. Eventually it ends up calling socket_transport_send which tries to do a transition to GC Safe mode. I inserted a MONO_ENTER_GC_UNSAFE in mono_debugger_agent_send_crash function and this fixes the assert. (#19992)
* mono/mono@6ea4cbcee0 [2020-02] [merp] Add API methods for getting hashcode/reason of last crash (#19978)
* mono/mono@d45ff3af75 [merp] Add tests for crashing via POSIX signal (#19977)
* mono/mono@bc1dd071a7 [merp] Add a test for Mono.Runtime.SendExceptionToTelemetry() (#19966)
* mono/mono@87ef555701 Emit DWARF debug_abbrev offset for compile units as a label instead of 0 (#19794)
Diff: 8c085a99b3..109b4b6f44
* Bump mono
* Revert "Emit DWARF debug_abbrev offset for compile units as a label instead of 0"
Co-authored-by: Alex Soto <alex@alexsoto.me>
* [generator] Avoid repetitive calls to GetSafeParamName (#8443)
as it can allocate memory (create string) in some cases
also a few other left over pieces from nullability work
* [generator] Remove non-required `needs_null_check` check (#8668)
This is already checked earlier in the `foreach` loop so we already know
it to be `true` at this later stage.
* [generator] Move optimization that skips required (warning) checks (#8712)
We're getting out of `GenerateArgumentChecks` too fast when
`null_allowed_override` is `true` so we miss the warning check for
exposing a `[Model]` type instead of the protocol/interface.
Sadly this uncovered a few mistakes in our existing bindings...
```
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStartHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStopHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
CSC [watch] Xamarin.WatchOS.dll
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStartHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStopHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter shadable in the method SceneKit.SCNBufferBindingHandler.Invoke exposes a model (SceneKit.SCNShadable). Please expose the corresponding protocol type instead (SceneKit.ISCNShadable).
CSC [tvos] Xamarin.TVOS.dll
STRIP Xamarin.WatchOS.dll
CSC [watch] MonoTouch.NUnitLite.pdb
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStartHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStopHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter shadable in the method SceneKit.SCNBufferBindingHandler.Invoke exposes a model (SceneKit.SCNShadable). Please expose the corresponding protocol type instead (SceneKit.ISCNShadable).
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStartHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStopHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter shadable in the method SceneKit.SCNBufferBindingHandler.Invoke exposes a model (SceneKit.SCNShadable). Please expose the corresponding protocol type instead (SceneKit.ISCNShadable).
CSC [mac/mobile-64] Xamarin.Mac.dll
CSC [mac/full-64] Xamarin.Mac.dll
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStartHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter receiver in the method SceneKit.SCNAnimationDidStopHandler.Invoke exposes a model (SceneKit.SCNAnimatable). Please expose the corresponding protocol type instead (SceneKit.ISCNAnimatable).
warning BI1106: bgen: The parameter shadable in the method SceneKit.SCNBufferBindingHandler.Invoke exposes a model (SceneKit.SCNShadable). Please expose the corresponding protocol type instead (SceneKit.ISCNShadable).
```
Those are fixed in a separate PR https://github.com/xamarin/xamarin-macios/pull/8716
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
* [linker] Fix infinite queue found with nullability PR (#8337)
and removed previous workaround
Replace previous attempt https://github.com/xamarin/xamarin-macios/pull/8336
* [linker] Remove code to deal with ExportedTypes (#8632)
This is now supported by upstream mono/linker
* [linker] Remove internal [NullablePublicOnly] attribute from apps (#8568)
I've only seen it with .net5 so far but it's better handled in master
and flow back into the branch
* [linker] Update custom attributes that can be removed (#8535)
Some are no longer part of the SDK (or converted into new ones
at build time), others were new (and missing).
A full list of attributes and their usage frequency in what we ship can
be seen in https://gist.github.com/spouliot/ca03c6da7d4d75670ca77749350eb8a2
Also update tests: no need to check for removals of stuff that does not
exists anymore.
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Fixes: https://github.com/xamarin/xamarin-macios/issues/8467
Fixes: https://github.com/xamarin/xamarin-macios/issues/8727
If you add this code to an `AppDelegate.cs`:
[Export ("f:")]
public void F (DateTime t) { }
This will cause an exception at runtime, on purpose.
Instead of the actual error string, you get:
System.Resources.MissingManifestResourceException:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Errors.mtouch.resources" was correctly embedded or linked into assembly "Xamarin.iOS" at compile time, or that all the satellite assemblies required are loadable and fully signed.
...
at Xamarin.Bundler.Errors.get_MT4102 () [0x00000] in tools/mtouch/Errors.Designer.cs:1582
In 00985a55, `mtouch/Errors.designer.cs` was added to various .NET
assemblies, so things would compile. Unfortunately, the `.resx` file
was not included as an `EmbeddedResource`.
*Compiled* `.resx` files are generated by MSBuild:
e3146f30df/src/Tasks/GenerateResource.cs
Or via `resgen.exe`:
https://docs.microsoft.com/dotnet/framework/resources/creating-resource-files-for-desktop-apps
Instead of using this, we could just generate `Errors.Designer.cs`
ourselves. I wrote a small `generate-errors.csharp` script that will
parse the `.resx` file generating `internal const` fields. This will
be more performant at runtime and work well with the linker. The `const`
strings will be compiled into the IL inline if done this way.
After doing this, I got the correct error message in VS for Mac:
Could not register the assembly 'brokenlocalization': ObjCRuntime.RuntimeException: The registrar found an invalid type `System.DateTime` in signature for method `brokenlocalization.AppDelegate.F`. Use `Foundation.NSDate` instead.
at Registrar.Registrar.ToSignature (System.Type type, Registrar.Registrar+ObjCMember member, System.Boolean& success, System.Boolean forProperty) [0x00380] in src/ObjCRuntime/Registrar.cs:2611
at Registrar.Registrar.ComputeSignature (System.Type declaring_type, System.Boolean is_ctor, System.Type return_type, System.Type[] parameters, System.Reflection.MethodBase mi, Registrar.Registrar+ObjCMember member, System.Boolean isCategoryInstance, System.Boolean isBlockSignature) [0x00113] in src/ObjCRuntime/Registrar.cs:2526
at Registrar.Registrar.ComputeSignature (System.Type DeclaringType, System.Reflection.MethodBase Method, Registrar.Registrar+ObjCMember member, System.Boolean isCategoryInstance, System.Boolean isBlockSignature) [0x00059] in src/ObjCRuntime/Registrar.cs:2492
at Registrar.Registrar+ObjCMethod.ComputeSignature () [0x00000] in src/ObjCRuntime/Registrar.cs:923
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* [AppKit] NSTextView allows passing nil to PasteAsPlainText and PasteAsRichText.
This is documented in Apple's documentation, their headers, and even proved
experimentally.
* Update xtro.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
instead use `Buffer.MemoryCopy`.
Currently only used from `CGDataProvider`. Added unit tests for the
public/indirect, usage of the API (we had none).
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
* [codeowners] Removing myself as code owner (#8529)
* [msbuild] Remove Jeff as a code owner. (#8688)
* [CODEOWNERS] Update ownership. (#8771)
Done against my will and due to peer pressure.
* [.gitignore] Ignore the json that is created on a device crash on xharness. (#8683)
Those files can be found when we test crashes locally and should not be
added to the project.
* Ignore *.binlog files. (#8704)
They're binary msbuild logs produced by 'msbuild /bl:msbuild.binlog'.
* [.gitignore] Ignore vscode settings dit. (#8747)
Co-authored-by: Vincent Dondain <vidondai@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>