Граф коммитов

1614 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 7372f627ad
[adsupport] Update for beta 1 (#4213) 2018-06-12 05:19:16 -07:00
Sebastien Pouliot 6d5cffcd10
[scenekit][tvos] SCNGeometryTessellator is now available in tvOS 12 (#4219) 2018-06-12 05:17:16 -07:00
Sebastien Pouliot 06ac9f970b
[accounts] Updates for beta 1 (#4216) 2018-06-11 17:42:33 -07:00
Sebastien Pouliot 2d197b9cfe
[corelocation] Update for beta 1 (macOS only changes) (#4215) 2018-06-11 17:42:18 -07:00
Sebastien Pouliot 8e72465496
[macos][corebluetooth] Enable CBConnectPeripheralOptionStartDelayKey on macOS (#4212)
Headers mention macOS 10.13 but, upon verification, the latest 10.13.5
still reports the key as missing from the framework.

Also remove the 10,13,4 maximum since we now have Mac(10,14) attributes
in the platform assemblies (which solve the previous issue)
2018-06-11 13:22:35 -07:00
Sebastien Pouliot 055a6aac35
[tests] macOS NSSpellChecker randomly [dis]approve of 'Ident' (#3728) (#4211)
Fix https://github.com/xamarin/maccore/issues/661
2018-06-11 13:21:56 -07:00
Alex Soto 02e8a2d7a3
[generator] Fixes WrapAttribute usage with interface protocols (#3885) (#4210)
* [generator] Fixes WrapAttribute usage with interface protocols

Fixes xamarin/xamarin-macios#3869

We need to support the scenario where `WrapAttribute` is used
to wrap an interface protocol type declaration like:

```csharp

	[Wrap ("WeakDelegate")]
	[NullAllowed]
	ICLSDataStoreDelegate Delegate { get; set; }

	[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
	NSObject WeakDelegate { get; set; }

```

We generated invalid code for the setter that needed an explicit cast
and ended up with a CS0266 compiler error:

Bad generated code:

```csharp

[CompilerGenerated]
public ICLSDataStoreDelegate Delegate {
	get {
		return WeakDelegate as ICLSDataStoreDelegate;
	}
	set {
		WeakDelegate = value;
	}
}

```

Good generated code:

```csharp

[CompilerGenerated]
public ICLSDataStoreDelegate Delegate {
	get {
		return WeakDelegate as ICLSDataStoreDelegate;
	}
	set {
		var rvalue = value as NSObject;
		if (value != null && rvalue == null)
			throw new ArgumentException ("The object passed of type " + value.GetType () + " does not derive from NSObject");
		WeakDelegate = rvalue;
	}
}

```
2018-06-11 10:26:30 -07:00
Sebastien Pouliot 45ae4c53ce
[tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194) (#4208)
* [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976

or a good, documented (in test code) reason for not needing it.

https://github.com/xamarin/xamarin-macios/issues/3976

* Fix failures

- static registrar failed on 32bits because one type in PhotoUI missed
  its `onlyOn64: true`

- link with the top, not the sub-frameworks

* [tvos] Fix mistakes in tvOS where some extranous types triggered unrequired/unavailable (or missing) frameworks

* [watchos] Fix watchOS frameworks mapping
2018-06-11 08:01:41 -07:00
Sebastien Pouliot b0b3d094b4
[watchconnectivity] Updates for beta 1 (#4205) 2018-06-11 05:34:40 -07:00
Sebastien Pouliot a9d8ce7c07
[watchkit] Update for beta 1 (#4204) 2018-06-11 05:31:52 -07:00
Sebastien Pouliot 2d6ce7459d
Bump to use Xcode 10 beta 1 (#4179)
* Bump to use Xcode 10 beta 1

* Update Versions.plist

* Add a dependency on Xcode 9.4.

* [msbuild] Fix build with Xcode 10 beta 1. (#4182)

Many years ago (in Xcode 7 according to code comment)
Developer/Platforms/iPhoneOS.platform/Developer/usr disappeared, and we coped
by looking at Developer/usr instead (and also the subsequent code to locate
the bin directory was based on the location of the usr directory).

Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared in Xcode 10
beta 1, but it seems useless (for one it doesn't contain a bin directory), so
in order to try to keep things sane don't look for this directory in Xcode 10
and instead go directly for Developer/usr (which is what we've been using as
the usr directory for years anyway).

Fixes this problem when building apps with Xcode 10 beta 1:

      /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(626,3): error : Could not locate SDK bin directory [/Users/rolf/Projects/TestApp/test-app.csproj]

* [runtime] Build 32-bit mac executables using Xcode 9.4.

* [mtouch] Work around broken tvOS headers in Xcode 10 beta 1.

* [mtouch] Work around build problem with Apple's simd headers in Objective-C++ mode.

* Use version-agnostic paths to sdk directories.

* [tests][xtro] Add todo files (from unclassified) and adjust ignore files to avoid errors

* [macos][security] Re-enable SSL[Get|Set]AlpnProtocols. Fixes #4001 (#4022)

* [macos][security] Re-enable SSL[Get}Set]AlpnProtocols. Fixes #4001

This was fixed in macOS 10.13.4

https://github.com/xamarin/xamarin-macios/issues/4001

* [tests][monotouch-tests] Disable a few test cases (one crasher, other failures). Causes to be verified later

* [xharness] Fix permission dialog suppression in Xcode 10.

* [xharness] Ignore 32-bit macOS tests by default.

* [tests] Execute mmp regression tests with Xcode 9.4 since many of them are 32-bit and needs porting to 64-bit.

* [mmptest] Ignore 32-bit XM tests if we don't have a 32-bit-capable Xcode.

* [registrar] Add workaround for broken headers in Xcode 10 beta 1 (radar 40824697).

* [mtouch] Restrict another workaround for an Xcode 10 beta 1 bug to a specific Xcode version to remove it asap.

* [tests] Fix some protocol changes (public or not) find by introspection tests

* [tests][intro] Fix DefaultCtorAllowed failures

* [Intents] Obsolete several Intents classes in watchOS.

Several existing Intents classes have been marked as unavailable in watchOS in
the headers in Xcode 10 beta 1, and corresponding tests are now failing.

So obsolete the managed wrapper types, and fix tests accordingly.

* Fix xtro wrt previous Ietents/intro changes

* [tests] Minor adjustments to mtouch tests to work with Xcode 10.

* [msbuild] Update tests to cope with additional files produced by the Core ML compiler.

* [msbuild] Xcode 10 doesn't support building watchOS 1 apps, so show a clear error message explaining it.

Also update tests accordingly.

* [coreimage] Stub new filters and exclude ?removed? ones from tests

* Update GameplayKit and SpriteKit NSSecureCoding _upgrade_ and fix other non-public cases (in tests)

* [tests] Ignore some GameKit selectors that don't respond anymore (but seems to be available, at least in header files)

* [tests] Fix intro 32bits testing for filters resutls

* [msbuild] Slightly change error message to be better English.
2018-06-08 18:45:24 -07:00
Sebastien Pouliot 64fece5f0a
Merge pull request #4026 from spouliot/d15-7-xcode94
Add xcode9.4 support into 15.7
2018-05-29 17:55:31 -04:00
Rolf Bjarne Kvinge 408d357468 [mtouch] Take into account the contents of response files when determining whether the cache is valid or not. Fixes #4033. (#4032) (#4051) 2018-05-08 17:27:05 -04:00
Sebastien Pouliot 9208e9a0a4 Add xcode9.4 support into 15.7
The PR is not final and cannot be merged until the final Xcode 9.4
release from Apple is available.

Since there's no macOS specific changes (at least up to beta 2) we can
directly merge into the _normal_ milestone branch and avoid having
separate branches to maintain for XI and XM (until 15.8).
2018-05-03 13:55:11 -04:00
Rolf Bjarne Kvinge f4933226fd [mtouch] watchOS extensions are top-level containers. Fixes issue #3930. (#3934) (#3937)
watchOS extensions are top-level containers in our build (because we ignore
watchOS apps entirely in mtouch), so treat them as such when computing the
protocol member map.

Fixes issue https://github.com/xamarin/xamarin-macios/issues/3930.
2018-04-17 21:15:33 -04:00
Chris Hamons 3c5a4989a8 [d15-7][msbuild] Fix AOT options from IDE (#3916)
* Add failing test for tag issue

* [msbuild] Update msbuild to use correct XM AOT variables

- The IDE saves out AOTMode and HybridAOT but msbuild was older names
2018-04-17 21:15:12 -04:00
Rolf Bjarne Kvinge b1c5ebf326
[generator] Register models with unique names to not match platform types. Fixes #3875. (#3879) (#3888)
* Move Registrar.SanitizeName to StringUtils.SanitizeObjectiveCName.

* [generator] Register models with unique names to not match platform types. Fixes #3875.

* [NSObject] Don't compare against a non-existent protocol.

* [generator] Make it possible to register models like before if the binding developer wishes it.

* [src] Make sure to not declare ObjC classes Apple already defines.

Fixes these warnings at startup:

    Class DOMNodeFilter is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944a788) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9958). One of the two will be used. Which one is undefined.
    Class WebOpenPanelResultListener is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944e4c8) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9a98). One of the two will be used. Which one is undefined.
    Class WebPolicyDecisionListener is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944e838) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9ae8). One of the two will be used. Which one is undefined.
    Class MTLCaptureScope is implemented in both /System/Library/Frameworks/Metal.framework/Versions/A/Metal (0x7fffa806f1d0) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8aa858). One of the two will be used. Which one is undefined.
    Class JSExport is implemented in both /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore (0x7fffa7eb4f60) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8aaa38). One of the two will be used. Which one is undefined.
2018-04-06 19:58:20 +02:00
Alex Soto 347160cf51
[ClassKit] Add Xcode 9.4 Beta 1 Bindings (#3853)
* [ClassKit] Add Xcode 9.4 Beta 1 Bindings

* ClassKit moved to v11.4 or we'd link against a private frmework in 11.3

* Turn CLSPredicateKeyPath into a static class

CLSPredicateKeyPath does not make much sense as an enum, we'll use
a static class instead so we do not have to call GetConstant() and
use the NSString directly.

Sample code using CLSPredicateKeyPath:

```csharp
var store = CLSDataStore.Shared;
var predicate = NSPredicate.FromFormat ("%K = %@", CLSPredicateKeyPath.Parent, store.MainAppContext);
var ctxs = await store.FindContextsMatchingAsync (predicate);
foreach (var ctx in ctxs) {
	Console.WriteLine (ctx.Title);
}
```

* [tests] Exclude WeakTopic incorrect check, bound as smart enum
2018-04-05 10:20:05 -05:00
Rolf Bjarne Kvinge 15e3bf39ce
[d15-7] [jenkins] Create comment file for PR builds. (#3799) (#3859)
* [jenkins] Create comment file for PR builds. (#3799)

* [jenkins] Create comment file for PR builds.

* [tools] Create stamp file after doing things that might modify files we care about. (#3864)

We have consistency checks to verify that no unexpected files are modified
done when comparing APIs in for a pull request.

Unfortunately the check didn't take into account that checking out the
revision to do the API check against might modify some of the files in the
consistency check itself, thus triggering the consistency check.

Fix this by only verify timestamps of files modified after checkout out the
revision, which is the only thing we care about anyway.

For examples see PR #3855 or PR #3850.

* [jenkins] Don't succeed if something went wrong when creating API or generator diff. (#3865)

Ref: https://github.com/xamarin/xamarin-macios/pull/3855#issuecomment-378441993
2018-04-05 07:37:08 +02:00
Rolf Bjarne Kvinge bddd5f924a
[jenkins] Create comment file for PR builds. (#3799) (#3858)
* [jenkins] Create comment file for PR builds.
2018-04-04 15:40:34 +02:00
Sebastien Pouliot 966a636490
Initial bump/setup for Xcode 9.4 beta 1 (#3846) 2018-04-03 08:16:51 -04:00
Vincent Dondain 260da1b5b4 [introspection] Fix ApiAvailabilityTest macOS max version 2018-03-30 15:59:59 -04:00
Vincent Dondain 94af4c6713 [xtro] Fix xcode9.3 merge issues 2018-03-30 12:26:58 -04:00
Vincent Dondain 7ece2f6db1 Merge branch 'xcode9.3' into d15-7-merge-xcode9.3 2018-03-29 19:31:53 -04:00
Vincent Dondain d34f1fbbd7 Merge branch 'xcode9.3' into d15-7-merge-xcode9.3 2018-03-29 19:31:01 -04:00
Sebastien Pouliot f62de4722b
Bump Xcode 9.3 to the final/released version (#3833)
* [tests] Tweak tests as NKIssue/NKAssetDownload now respond to NS[Secure]Coding without any mention in header files
2018-03-29 17:58:55 -04:00
Chris Hamons 3627e87344 [mmp][mtouch] Better guard framework SDK checks (#3757) (#3796)
- https://github.com/xamarin/xamarin-macios/issues/3725
- These frameworks "CoreAudioKit Metal MetalKit MetalPerformanceShaders CoreNFC DeviceCheck"
 were special cased, but that special case did do an SDK check.
- Create a helper method to share check
- Add test for MM0135
2018-03-21 21:00:23 -04:00
Alex Soto b6dbebe9d3
[monotouch-tests] Adds mono's WeakAttribute tests (#3739)
* [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
2018-03-15 08:29:46 -06:00
Rolf Bjarne Kvinge 98837dbfd0
[ObjCRuntime] Don't double-retain blocks. (#3717) (#3730)
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)
2018-03-13 19:24:44 +01:00
Rolf Bjarne Kvinge 15a0f94384
[mtouch] When loading cached linked results, we need to propagate the 'RemoveDynamicRegistrar' value to code-sharing extensions. (#3708) (#3711) 2018-03-09 23:15:01 +01:00
Alex Soto fd746c47fa
[Backport 15-7][monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3702)
* [monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3696)

Fixes xamarin/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.

* [monotouch-test] Enhance MidiThruConnectionTests.FindTest from #3696 comments (#3700)
2018-03-09 12:49:33 -06:00
Alex Soto 06d390ce3e [Backport][monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3703)
Fixes xamarin/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.
2018-03-09 08:12:18 -05:00
Alex Soto 8ba51035d1
[MetalPerformanceShaders] Make macOS intro happy (#3692)
Xcode 9.3 removed both selectors from MPSCnnBinaryKernel, reported radar https://trello.com/c/7EAM0qk1
but apple says this was intentional.

Since this API is not final we need to review it as part of
https://github.com/xamarin/xamarin-macios/issues/3553
2018-03-07 17:49:11 -06:00
Alex Soto 17a81e9d4e
[ARkit] Update to Xcode 9.3 Beta 4 (#3680) 2018-03-07 08:41:25 -06:00
Alex Soto 05997e38cd [MetalPerformanceShaders] Update xtro up to Xcode 9.3 Beta 4 (#3679)
We will bind it later, see:
https://github.com/xamarin/xamarin-macios/issues/3553
2018-03-07 08:53:33 -05:00
Vincent Dondain 24e8815004
[security] Strongly typed key generation (#3502) (#3676)
* [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.
2018-03-06 17:40:19 -05:00
Sebastien Pouliot 189075bb3e
[tests] Skip High Sierra image filters in Classic tests. Fixes #622. (#3308) (#3671)
Skip High Sierra image filters in Classic introspection tests, since the
Classic bindings won't be updated.

https://github.com/xamarin/maccore/issues/622
2018-03-06 15:16:19 -05:00
Rolf Bjarne Kvinge 430a5e7ebe
[registrar] Don't throw NRE when finding methods that almost implement optional protocol members. (#3658) (#3659)
If a class implements a protocol with optional members, and that class also exports methods whose selectors match an optional member, but the signature doesn't match, we must show a useful warning instead of erroring out due to a NullReferenceException.

Fixes this:

    System.NullReferenceException: Object reference not set to an instance of an object
      at Registrar.StaticRegistrar.GetBlockProxyAttributeMethod (Mono.Cecil.MethodDefinition method, System.Int32 parameter) [0x00001] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:4113
      at Registrar.StaticRegistrar.GetBlockWrapperCreator (Registrar.Registrar+ObjCMethod obj_method, System.Int32 parameter) [0x001e1] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:4101
      at Registrar.StaticRegistrar.Specialize (Registrar.AutoIndentStringBuilder sb, Registrar.Registrar+ObjCMethod method, System.Collections.Generic.List`1[T] exceptions) [0x0216b] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:3683

when building the msbuild/tests/MyWatchKit2IntentsExtension project.
2018-03-06 14:40:45 +01:00
Sebastien Pouliot 9f3f7bf4ed Fix merge 2018-03-05 23:40:02 -05:00
Rolf Bjarne Kvinge f38d5bf816 [xharness] All variants of GuiUnit projects must be special-cased. (#3602) (#3662)
This fixes an issue where multiple copies of the GuiUnit project would have
the same output directory, causing random problems when building those
projects in parallel.
2018-03-05 17:18:20 -05:00
Sebastien Pouliot 29676a3662 Merge 15.6 into xcode9.3 2018-03-05 17:16:28 -05:00
Rolf Bjarne Kvinge 5558012e2d
[tests] Don't run mmp regression tests in parallel. Fixes maccore #645. (#3638) (#3641)
* [tests] Don't run mmp regression tests in parallel. Fixes maccore #645.

For some reason vstool becomes confused and starts erroring out if multiple
vstools are running at the same time.

So work around this by executing the MMP regression tests serialized.

Fixes https://github.com/xamarin/maccore/issues/645.

* [xharness] Upload the logs from the mmp regression tests.
2018-03-05 14:53:38 +01:00
Rolf Bjarne Kvinge 664c790b8c
[mtouch] Propagate the computed value for removal of the dynamic registrar to code shared app extensions. (#3622) (#3630)
This fixes a startup crash in code shared app extensions due to having the
wrong value set in the runtime (the dynamic registrar was removed, but the
executable didn't know it).
2018-03-05 07:41:56 +01:00
Rolf Bjarne Kvinge 835f65897f
[static registrar] Optimize creation of delegates for blocks. (#3623) (#3644)
* [static registrar] Optimize creation of delegates for blocks.

Optimize creation of delegates for blocks so that it doesn't require the
dynamic registrar.

This is done by getting the metadata token for the Create method that creates
the delegate, and embed that metadata token in the generated code from the
static registrar.

Also add tests, since this scenario was not covered by tests already.

* [mmptest] Fix test after recent changes.

* [test-libraries] Avoid duplicate symbols.

* [tests] Update according to changes.
2018-03-05 07:41:28 +01:00
Chris Hamons cabc4fbe2c [mmp] Add stripping of 32-bit dylibs to work with new App Store restrictions (#3387) (#3633)
- https://github.com/xamarin/xamarin-macios/issues/3367
- App Store will now fail builds if you add in a 32-bit dylib
- If you are a 32-bit app you don't need the 64-bit part of your fat
dylib anyway
- Add --optimize=-trim-architectures to allow customization of behavior, as not everyone
uses app store

In addition, while writing tests for this is was noticed that mmp tests did not "really" run Release configuration correctly in most cases. Fixing this turned out to be a bit of a pain, but necessary to correctly test this (and other things).

- Turns out that /p:configuration:debug is not sufficient to tell mmp to
do the right thing
- That, in most projects, sets the DebugSymbols property, which really
is what is checked.
- However, two of our projects did not have that, so we always did
release mmp work.
- Removed configuration property for tests and added real "Release"
configuration option
2018-03-02 14:33:27 +01:00
Manuel de la Pena a5929d560b [AVFoundation] Backport AVFoundation master changes in Xcode 9.3 and add missing API. (#3583) 2018-03-02 08:06:48 -05:00
Sebastien Pouliot b4a59931fb
[xtro] Avoid duplicate 'close' p/invoke across frameworks (#3632)
Depending on the metadata order the symbol will be reported against a
different framework and cause false positives.

Re-using one of the declaration solves this - even if they should,
ideally, be moved to a separated/shared type (like one per fx)

Fixes https://github.com/xamarin/maccore/issues/638
2018-03-02 08:00:19 -05:00
Rolf Bjarne Kvinge 7d92085edd
[xharness] Always build the test libraries before doing anything else. (#3601) (#3621)
Fixes an issue where multiple projects would try to build the test libraries simultaneously.
2018-03-01 14:59:25 +01:00
Rolf Bjarne Kvinge ba99072326
[xharness] Propagate custom defines to referenced projects as well. Fixes maccore #655. (#3615) (#3620)
The ProtocolTest test is located in the bindings-test assembly, and it
requires certain conditional compilation defines to be set in order to behave
properly.

With this fix we correctly set these defines when cloning the bindings-test
project (in addition to when we set the defines for the main project, which is
either monotouch-test or linkall for this test).

Fixes https://github.com/xamarin/maccore/issues/655.
2018-03-01 14:59:09 +01:00
Rolf Bjarne Kvinge 16d219639d
[runtime] Fix exception marshalling when the dynamic registrar is removed. (#3616) (#3619)
This can be reproduced by running monotouch-test with all optimizations in
Debug mode (because some of the exception marshalling tests are only enabled
in debug mode), so add such a configuration to xharness. To avoid bloating PR
builds, this configuration is only enabled when running all tests (either
manually selecting all tests for a PR, or on Wrench, where everything is
always tested).
2018-03-01 14:56:29 +01:00