Add support for blocks in static protocol members by adding another field to
the [ProtocolMember] attribute that specifies the block proxy type.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=41226.
* [monotouch-tests] Adds mono's WeakAttribute tests
* Embrace watchOS
Unfortunately this revealed that WeakAttribute is not working for watchOS
* Port mono's WeakAttribute test to our test runner
Test Ported:
5bdaef7e5f/mono/tests/weak-fields.cs
* Fix object leaks and implement suggested approach from 4b9ade0c59
* Remove debug spew and fix formating on header
* Move tests out of MMPTests meta-class that were split into other files already
* Move smoke tests out of MMPTest.cs
* Reorganize MMP registrar tests
* Move assembly references tests out
- Add new `BiometryAny` and `BiometryCurrentSet` enum values.
- Add `[Advice]` attribute on old values with message suggesting the use of "biometric" values.
- Add comments explaining why we didn't use newer availability attributes on new APIs.
* [mtouch] Don't build libmonotouch-fixes.dylib anymore, it's not used.
We haven't used libmonotouch-fixes.dylib for over a year (and it stopped
working before that), so this seems safe to remove.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=48830.
* [mtouch] Keep the monotouch-fixes.c code, since it's still used in 64-bit simulator.
* [ObjCRuntime] Don't double-retain blocks.
First there was darkness; no blocks were retained.
Then came the light; and all blocks were retained [1]
Forever.
But all that once is, must one day not be,
and thus the light gave way to darkness,
and blocks were only retained as long as need be [2].
But before there was a balance, there was a crossroad.
In some places the light shone forever,
and all blocks were retained.
In other places there was a balance,
and the light shone only as long as needed.
A desire to unify arose.
Alas, it could not be.
It was a bright and sunny day
When a merge failed [3].
And all blocks were retained. Twice.
Once [here][4] and once [there][5].
For many years we could not see.
Until a dark and rainy night,
when an awareness arose.
And the desire to unify the balance could finally be fulfilled.
[1]: 6efca92acb
[2]: a22f877539
[3]: befa0477cf
[4]: 5158a3c001/src/ObjCRuntime/Runtime.cs (L858)
[5]: 5158a3c001/runtime/runtime.m (L2091)
* [tests] Fix test builds.
* [monotouch-test] RegistrarTest.BlockCollection: allocate more and wait longer for the GC.
Allocate more objects and wait longer for the GC to run.
Hopefully fixes this problem:
[FAIL] RegistrarTest.BlockCollection : freed blocks
Expected: greater than 0
But was: 0
The blocks are freed if we just wait long enough... The problem is that we
don't want to wait very long (makes the tests slow to run), so try to speed
things up by allocating more.
This fixes the following test failures when building for debug with all optimizations enabled:
DispatchTests
[FAIL] DispatchTests.EverAfter : thread check hit
Expected: same as <UIKit.UIKitThreadAccessException>
But was: <System.ArgumentNullException>
at MonoTouchFixtures.CoreFoundation.DispatchTests.EverAfter () [0x000e1] in /Users/xamarinqa/vsts/_work/52/s/tests/monotouch-test/CoreFoundation/DispatchTests.cs:259
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
[FAIL] DispatchTests.MainQueueDispatch : thread check hit
Expected: same as <UIKit.UIKitThreadAccessException>
But was: <System.ArgumentNullException>
at MonoTouchFixtures.CoreFoundation.DispatchTests.MainQueueDispatch () [0x000d1] in /Users/xamarinqa/vsts/_work/52/s/tests/monotouch-test/CoreFoundation/DispatchTests.cs:111
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
Fixes issue #3674
The problem is that the Xamarin.Mac targets did not set the
RequireProvisioningProfile property on the DetectSigningIdentity
task which meant that it defaulted to 'false'.
When that property is 'false', the DetectSigningIdentity logic
would shortcut to not doing a provisioning profile lookup.
This was therefor causing the build to not use a provisioning
profile which caused the build to improperly codesign the app
bundle.
Currently we consider the failed **and** the skipped tests as failures which is confusing. The tests didn't all "fail" because some were just not ran.
This PR updates the summary message to be a little more clear.
- Fixes https://github.com/xamarin/xamarin-macios/issues/3608
- Refactor and clean up msbuild to be more consistent between binding and "normal" workloads
- Comment on the inconsistencies that are too large to fix in one PR
- Write some actual tests for binding projects to detect regressions
- Due to lack of redirect support these tests are only xbuild current, but I ran tests with msbuild to validate locally
Fixesxamarin/maccore#658
When a MidiThruConnection is created but for some reason is not disposed
the system keeps it alive even between app/simulator restarts, if you want
to clean the connections you must reset contents and settings from simulator.
Which is a bit harder when the issues happens on the macOS.
Fixesxamarin/maccore#658
When a MidiThruConnection is created but for some reason is not disposed
the system keeps it alive even between app/simulator restarts, if you want
to clean the connections you must reset contents and settings from simulator.
Which is a bit harder when the issues happens on the macOS.
Commit list for xamarin/maccore:
* xamarin/maccore@aa77d5e811 Bump maciostools to get mlaunch fixes.
* xamarin/maccore@0d74e34e16 Merge pull request #659 from xamarin/ts-swift4mangling
* xamarin/maccore@5135e9dd60 Reformatted an exception, switched to Ordinal string comparisons where it makes sense (everywhere, as it turns out).
* xamarin/maccore@40d676bf96 Updates for PR: formatting, names, obsolete comments addressed.
* xamarin/maccore@9751df85ca Updated for swift4 support - major changes include new name demangling, new demangled name -> SwiftType conversion, updated pinvokes, ABI changes.
Diff: 689fae7440...aa77d5e811
Fixesxamarin/maccore#658
When a MidiThruConnection is created but for some reason is not disposed
the system keeps it alive even between app/simulator restarts, if you want
to clean the connections you must reset contents and settings from simulator.
In order to avoid this test from failing randomly and since the intent of the
test is to check if `MidiThruConnection.Find` works we change the assert to
`>= 2` since this is at least the number of connections we expect.
The F# compiler complains that:
/Users/xamarinqa/vsts/_work/52/s/tests/fsharp/Main.fs(13,9): error FS0433: A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence.
Main.fs is the last file in the project file, but the MSBuild tasks adds
another one at the end:
obj/iPhone/Debug64-today-extension/Xamarin.iOS,Version=v1.0.AssemblyAttribute.fs
because we're building a library (in which case the MSBuild tasks assume that
there won't be any Main functions in the project, and as such it's safe to
append files to compile).
Work around this by excluding the Main function from F# extensions, it's not
needed anyway.
* [security] Modifying structure of bindings
Added strong dictionary for key generation according to
https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/key_generation_attributes
in preparation making a strongly typed key generation possible.
* Making strong dictionary and composite of other strong dictionaries.
* Implementing access control as property type of SecPublicPrivateKeyAttrs.
* Adding new overload for SecKey.CreateRandomKey.
* Moving TokenID to strongly typed property.
* Fix coding style + use nameof
* Fixing Xcode version assertion of key generation tests.
* Fixing errors in test case.
* Fixing whitespace issue.
* Resolving inheritance issue
Removing inheritance between SecKeyGenerationParameters and
SecPublicPrivateKeyAttrs and instead add the necessary properties
to SecKeyGenerationParameters. Adds redundant code, but I don't
see a way around it.
* Moving test case to appropriate test class.
* Creating necessary strong dictionaries for key generation.
* [formatting] Mono coding guidelines
Make sure you're following http://www.mono-project.com/community/contributing/coding-guidelines/
In VSMac: Preferences > Source Code > Code Formatting > C# source code > Policy Mono.
* Remove [Advice] that are specific to GenerateKeyPair
`SecKeyGenerationParameters` and `SecKeyParameters` cannot be used for `GenerateKeyPair`.
* Clarify 'ArgumentException' for invalid 'SecKeyType'
* Fixed CreateRandomKeyTest
- Renamed CreateRandomKeyWithParametersTests to CreateRandomKeyTest.
- Add messages to all asserts.
```
keyGenerationParameters = new SecKeyGenerationParameters ();
keyGenerationParameters.KeyType = SecKeyType.Invalid;
Assert.Throws<ArgumentException> (() => { SecKey.CreateRandomKey (keyGenerationParameters, out _); }, "CreateRandomKey - invalid key type");
```
- ^ didn't work because `SecKeyGenerationParameters`'s setter protects against invalid. There's no constant for invalid so null is returned.
```
Assert.That (SecKey.CreateRandomKey (keyGenerationParameters, out _), Is.EqualTo (SecStatusCode.Param), "CreateRandomKey - Param issue, invalid RSA key size");
```
- ^ `SecKey.CreateRandomKey` doesn't return a `SecStatusCode` like `GenerateKeyPair`.
* Fixes based on spouliot's input.
* Mono styling fix.
The main cause of the warning: "warning MSB6002: The command-line for the 'MTouch' task is too long" was the number of references that can be passed to `mtouch`.
Now all the arguments are written in a response file which in turn is passed to `mtouch`.
- Fixes bug #56501: MSB6002 command-line for MTouch task is too long, > 32000 characters
(https://bugzilla.xamarin.com/show_bug.cgi?id=56501)
- The response file is created in the device specific folder, as `response-file.rsp`. It is re-created every time.
- Added an msbuild test to ensure the response file is created by `GenerateCommandLineCommands` and that it includes all the references.
- Introduce `AddLine` and `AddQuotedLine` which we use to populate the response file (and go to the next line).
- Move to C# 7 syntax for string replacement.
- Update all tests in `MTouchTaskTests` to use the response file since the arguments are no longer passed directly to `mtouch`.
- Update MT0018's documentation for response files.