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

500 Коммитов

Автор SHA1 Сообщение Дата
Emanuel 68b87a4e20 [msbuild] Check Microsoft.NET.Build.Extensions.Tasks.dll exists before using it
The existence of Microsoft.NET.Build.Extensions.Tasks.dll depends on the installed workloads on VS.

Fixes Bug #59588 - XI GetDependsOnNETStandard task could not be loaded from Microsoft.NET.Build.Extensions.Tasks.dll

https://bugzilla.xamarin.com/show_bug.cgi?id=59588
2017-09-19 15:16:15 -03:00
Sebastien Pouliot 91a53f73f2 Merge xcode9 into d15-4[-xi] (#2710)
* [FileProvider] Add Xcode 9 Beta 1, 2 & 3 Bindings (#2279)

* [FileProvider] Add Xcode 9 Beta 1 Bindings

* Better naming

* Feedback not related to BindAs

* [FileProvider] Removes BindAs, add manual code for it and updated to Beta 3

* [FileProvider] Implement feedback

* [CoreSpotlight] Updated spotlight bindings for xcode 9 beta 3. (#2193)

Updated spotlight bindings for xcode 9 beta 3.

* Fix warning caused by duplicate (#2354)

* [FileProviderUI] Add Xcode 9 Beta 1 to 3 bindings (#2356)

* Bump to Xcode 9 beta 4

* [arkit] ARLightEstimate does not conform to NSCopying anymore (fix unit test)

* [uikit] NSFileProviderExtension.ReparentItem got a new parameter in beta4 (fix unit test)

* [coreimage] CIImageAccumulator init returns nil in beta 4

There's no header change to mention `init` is not allowed but
it's not clear how this default initializer could be used.

Also make public some other API to construct this type (outside
of XM). It's not clear why there were `internal` as they are
(at least now) part of the header files.

* [photos] Add helpers when PHLivePhotoEditingOption/NSDictionary is null (to avoid ambiguous API) (#2360)

Adding a strongly typed `PHLivePhotoEditingOption` (a strongly typed
version of an `NSDictionary`) can cause a `CS0121` (call is ambiguous)
since using a `null` argument is common (only one option exist so far).

This PR adds overloads that makes the code nicer in such case, e.g.

before Xcode9:

> // null is used when no options are given
> _foo.SaveLivePhoto (output, null, completion);

current (Xcode 9)

> // casting required to remove ambiguity with PHLivePhotoEditingOption
> _foo.SaveLivePhoto (output, (NSDictionary)null, completion);

with this PR

> // no option, no argument
> _foo.SaveLivePhoto (output, completion);

The same applies to `PrepareLivePhotoForPlayback`.

* [tests] Disable/tweak two tests that breaks on (almost) all Xcode updates

Those tests were not added to validate xOS so just keep the parts
that helps us (without constantly checking back the new break flavor)

* Disable watchOS to check if this hides others issues

* [mapkit] Update for beta 4

* [coredata] Update for beta 4

* [wkwebkit] Update for beta 4

Note: WKWindowFeatures.h is not compiled (part of the framework umbrella)
and the `@interface WKWindowFeatures (WKPrivate)` sounds like it should
not have been exposed (it's all fields starting with `_`)

* [corelocation] Update for beta 4

* Revert "Disable watchOS to check if this hides others issues"

This reverts commit fed2249fa4.

* [tests] Disable watchOS from harness only. Workaround #58348

https://bugzilla.xamarin.com/show_bug.cgi?id=58348

* [spritekit] Update for beta 4 (#2368)

* [arkit] Update for beta 4 (#2370)

* Bump version before preview 3 (#2375)

* [generator] Fix smart enum FieldAttribute LibraryName generation (#2376)

This fix is needed by PDFKit because it is a remapped framework[0],
the current code generates incorrect FieldAttribute on smart enums
because it uses `fa.LibraryName` as first option and this causes
remmaped frameworks have incorrect LibraryName generated for example
if a Field uses `+CoreImage` as `LibraryName` the following incorrect
code is generated:

```
	[Field ("First", "+CoreImage")]
	internal unsafe static IntPtr First {
		get {
			fixed (IntPtr *storage = &values [0])
				return Dlfcn.CachePointer (Libraries.+CoreImage.Handle, "First", storage);
		}
	}
```

[0]: f5956d6cc1/src/generator.cs (L5985)

* [FinderSync] Update to beta 4 (#2377)

* [ImageIO] Update to Xcode 9 (#2353)

* [PhotosUI] Move macOS photosui bindings out of photos.cs into photosui.cs (#2358)

* [quicklook] Update up to beta 4 (#2374)

* [uikit] UIDragInteraction & UIDragInteractionDelegate (Xcode 9 b1,2,3) (#2357)

* [safariservices] Update up to beta 4 (#2380)

* [coreanimation] Update to beta 4 (#2382)

Apple removed (mistake?) some API in beta 1. Filed as rdar 33590997

Internal tracking in
https://trello.com/c/J8BDDUV9/86-33590997-coreanimation-quartzcore-api-removals

* [storekit] Update up to beta 4 (#2379)

* [CoreML] Update to Xcode 9 Beta 4 (#2387)

* [uikit] UICollectionView/UITableView Drag & Drop (Xcode 9 b1,2,3 & 4) (#2355)

* Update code after radar 32929318 and 32897776 are fixed in b4 (#2394)

* [xcode9 CoreAudio] New definitions from Beta1 to Beta3 (#2359)

* [Vision] Strongify VNBarcodeSymbology API, Fixes Bug 58512 (#2397)

* [Vision] Strongify VNBarcodeSymbology API, Fixes Bug 58512

https://bugzilla.xamarin.com/show_bug.cgi?id=58512

Created strong API (VNBarcodeSymbology) on the following properties

* VNDetectBarcodesRequest.SupportedSymbologies
* VNDetectBarcodesRequest.Symbologies
* VNBarcodeObservation.Symbology

* Remove modern C# because classic can't do it 😡

* [mediaplayer] Update up to beta 4 (#2388)

* [watchkit] Update to beta 4 (#2398)

* Bump Visual Studio for Mac max version (#2408)

* [coreimage] Add CIBarcodeDescriptor and enabled missing API for VNBarcodeObservation. Fix #58197 (#2411)

https://bugzilla.xamarin.com/show_bug.cgi?id=58197

* [uikit] Update UIFocus related APIs to Xcode 9 beta 4 (#2407)

* [uikit] Update UIFocus related APIs to Xcode 9 beta 4

* [uikit] Fixes based on comments

* [coreimage] CIImageAccumulator API fixes. Fix #58349 (#2412)

* Obsolete the default `init`;

* XM exposed some older APIs using `int` instead of `CIFormat`.
  This is fixed and old APIs are obsoleted;

* Both new & old APIs are now using `CIFormat` for both XI and XM.

https://bugzilla.xamarin.com/show_bug.cgi?id=58349

* [uikit] UIText drag & drop - up to Xcode 9 beta 4 (#2410)

* [uikit] UISplitView & UIStackView up to Xcode 9 beta 4 (#2425)

* Bump XI/XM versions before preview 4 (#2422)

* [PDFKit] Update to Xcode 9 Beta 1, 2, 3 & 4 (#2378)

* [PDFKit] Update to Xcode 9 Beta 1, 2, 3 & 4

* [PDFKit] Implement feedback

* [PDFKit] the forgotten enum

* [PDFKit] More feedback

* [PDFKit] Add Mac changes

* Missing change

* Fix test RectangleF VS CGRect

* Pass -Wunguarded-availability-new to quiet a new clang warning (#2424)

- https://bugzilla.xamarin.com/show_bug.cgi?id=58574

* [mtouch/mmp] Ignore warnings about unguarded code section with regards to availability. (#2441)

* [monotouch-test] Remove workaround for fixed Apple bug. (#2445)

* Bump to Xcode 9 beta 5. (#2447)

* Bump to Xcode 9 beta 5.

* [mmp] Disable the partial static registrar, because Apple's macOS SDK is broken.

> In file included from Xamarin.Mac.registrar.mobile.i386.m:1:
> In file included from ./Xamarin.Mac.registrar.mobile.i386.h:11:
> /Applications/Xcode9-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:88:9: fatal error: 'AVFoundation/AVRouteDetector.h' file not found

https://bugzilla.xamarin.com/show_bug.cgi?id=58629

* [mmp] Fix partial static registrar removal.

* [CallKit] Update to Xcode 9 beta 5.

* [ARKit] ARPointCloud doesn't conform to NSCopying anymore in Xcode 9 beta 5.

* [ARKit] Update to Xcode 9 beta 5 enough to make tests happy.

* [CoreImage] Stub out new filters in Xcode 9 beta 5.

* [tests][monotouch] Simplify some MDLMesh asserts since values change a lot between OS versions.

* [mmp] Default to the dynamic registrar for release builds again, due to bug #58629.

https://bugzilla.xamarin.com/show_bug.cgi?id=58629

* [tests][introspection] CXCall started implementing NSCopying without saying so in the headers.

* Disable mmp static registrar tests due to 58629 for now

* [quicklook] Update to beta 5 (#2450)

* [photos] Update for beta 5 (#2452)

Also update some existing enum members were added in beta 1 on macOS

* [safariservices] Update for beta 5 (#2455)

* [mediaplayer] Update to beta 5 (#2456)

* [CoreLocation] Update Xcode 9 Beta 5 (#2453)

* [CoreML] Update to Xcode 9 Beta 5 (#2454)

* [Contacts] Update to Xcode 9 Beta 5 (#2451)

* [Vision] Update to Xcode 9 Beta 5 (#2458)

* [builds] Tell LLVM to stay away from newer macOS functions. (#2459)

Fixes this build problem on Sierra:

> ld: weak import of symbol '_futimens' not supported because of option: -no_weak_imports for architecture x86_64

This is a symbol that was (will be?) introduced in High Sierra.

Interestingly this only occurs if the Xcode 8.X Command Line Tools haven't
been manually installed.

Because if the Xcode 8.X Command Line Tools are installed, this happens:

1. llvm's configure script detects that 'futimens' is not usable.

2. llvm's configure script detects that 'futimens' is not usable, because
   xcrun sets SDKROOT=/ when calling clang.

    a. When the SDKROOT variable is set, clang passes '-syslibroot /usr/lib'
       to ld.
    b. When ld gets '-syslibroot /usr/lib', ld looks in '/usr/lib' for a
       library that contains 'futimens' in the OS itself, and since we're on
       Sierra, that fails to link.
    c. So when llvm's configure script creates a test program that checks if
       'futimens' is present, the program fails. This is correct, and makes
       llvm *not* use futimens.

3. xcrun sets SDKROOT=/ because /usr/share/current-os.sdk/Info.plist exists.
   If that file does not exist, then xcrun sets SDKROOT to Xcode9's macOS SDK
   (because that's what xcode-select reports).

    a. When SDKROOT is set to Xcode9's macOS SDK, the configure check for
       'futimens' succeeds, because the macOS 10.13 SDK contains that
       function.
    b. llvm happily uses 'futimens', and then the final link fails because
       we're using a symbol not available on all target platforms.

* [arkit] Update for Xcode 9 beta 5 - Part 1 (#2460)

* [tests] The container app for watchOS tests should be 64-bit. (#2463)

* [xharness] watchOS tests need to run in a clean environment. Works around #58348. (#2462)

https://bugzilla.xamarin.com/show_bug.cgi?id=58348

* [xharness] It watchOS tests don't need to be clean anymore. Fixes #58348. (#2473)

https://bugzilla.xamarin.com/show_bug.cgi?id=58348

* [uikit] UIView/UIScrollView/UIViewController up to Xcode 9 beta 5 (#2431)

- Add NSDirectionalEdgeInsets type.
- Includes DirectionalEdgeInsetsTest.

* [AudioToolbox] Update bindings to Xcode 9 beta3 (not later changes). (#2294)

* [xharness] Add a file existence check. (#2478)

Fixes this exception:

```
Harness exception for 'introspection': System.IO.FileNotFoundException: Could not find file '/Users/builder/Library/Logs/CoreSimulator/27618A4A-7E49-4BAB-8F77-FA938CE88682/system.log'.
File name: '/Users/builder/Library/Logs/CoreSimulator/27618A4A-7E49-4BAB-8F77-FA938CE88682/system.log'
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x00207] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/io/__error.cs:188
at System.IO.FileInfo.get_Length () [0x00038] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/io/fileinfo.cs:171
at xharness.CaptureLog.StopCapture () [0x00021] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Log.cs:252
at (wrapper remoting-invoke-with-check) xharness.CaptureLog:StopCapture ()
at xharness.AppRunner+<RunAsync>d__68.MoveNext () [0x0127f] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/AppRunner.cs:642
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at xharness.RunSimulatorTask+<RunTestAsync>d__7.MoveNext () [0x0029d] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Jenkins.cs:2894
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at xharness.RunTestTask+<ExecuteAsync>d__8.MoveNext () [0x0010b] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Jenkins.cs:2538
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at xharness.TestTask+<RunInternalAsync>d__87.MoveNext () [0x0010d] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Jenkins.cs:1870
```

I'm not sure how this can happen, but it has on the bots [1].

[1] https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/4548/Test_Report/

* Bump versions for preview 5 (#2479)

* [passkit] Update to beta 5 (#2481)

* [tests] Remove workaround for radar #32688391. (#2486)

* [replaykit] Update up to beta 5 (#2484)

* Bump maccore to get fix for bug #55064. (#2487)

* [apidiff] Update definition to new 10.12 (d15-3) stable release (#2490)

* [SceneKit] basic work (#2483)

* [coredata] Update to beta 5 (#2488)

* [homekit] Update for Xcode 9 beta 5 (#2492)

* [Foundation] Update for xcode9 (#2468)

* [Intents] Add bindings for Xcode 9 Beta 1, 2, 3, 4 & 5 (#2493)

* [Intents] Add bindings for Xcode 9 Beta 1, 2, 3, 4 & 5

* [Intents] Implement feedback

* [Intents] Add a generic version for INInteraction.GetParameterValue

* [Intents] Missing check

* [Contacts] Add missing foundation NSItemProviderWriting protocol to CNContact (#2496)

https://bugzilla.xamarin.com/show_bug.cgi?id=58203

This is available on all Contacts supported platforms

```
./iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./WatchOS.platform/Developer/SDKs/WatchOS4.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./WatchSimulator.platform/Developer/SDKs/WatchSimulator4.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
```

* [IntentsUI] Update to Xcode 9 Beta 1 & 2 (No changes on later betas) (#2497)

* [IntentsUI] Update to Xcode 9 Beta 1 & 2 (No changes on later betas)

* [IntentsUI] Better use a delegate instead so we have named params

* Bump versions before 6th preview (#2514)

* [arkit] Add missing MarshalDirective to ARPlaneAnchor (#2517)

- Fixes bug #58648: ARPlaneAnchor.Extent property seems incorrect but changes to correct value after Debug access
(https://bugzilla.xamarin.com/show_bug.cgi?id=58648)

* [xtro-sharpie] Fix a compiler warning. (#2516)

Fixes these warnings:

Runner.cs(197,5): warning CS0642: Possible mistaken empty statement
Runner.cs(199,5): warning CS0642: Possible mistaken empty statement
Runner.cs(201,5): warning CS0642: Possible mistaken empty statement
Runner.cs(203,5): warning CS0642: Possible mistaken empty statement
Runner.cs(205,5): warning CS0642: Possible mistaken empty statement

* [uikit] Update for Xcode 9 beta 5 - Part 3 (#2511)

- UIKeyCommand
- UINavigationBar
- UINavigationItem
- UIPasteboard
- UITableViewHeaderFooterView

* [xtro-sharpie] Remove xtro-plugin and misc other fixes. (#2522)

* [xtro-sharpie] Build with msbuild and be as quiet as requested when building.

* [xtro-sharpie] Must run as a 64-bit process, since the required native libraries are 64-bit.

* [xtro-sharpie] Add run configurations to the project file to ease debugging in the IDE.

* [xtro-sharpie] Remove xtro-plugin and the related commands.

This was needed when there wasn't a 64-bit mono, in order to run xtro-sharpie
in a 64-bit process.

Now there is a 64-bit mono, so it's not needed anymore.

Also improve makefile targets a bit, to auto-build stuff when needed, by
setting the right dependencies.

* Bump Xcode 9 to beta 6 (#2519)

Disable watchOS tests again
It seems like the Carousel crash from beta 4 is back to haunt us.
This was working fine with beta 5.

* Backport d15-3 SR2 fixes (#2515)

* [coredata] Update to beta 6 (#2528)

This seems to only revert some nullability changes from beta 5.

* [coreml] Update to beta 6 (#2531)

Fix our rdar 33643011 where additional setters were added in the headers
but did not exists.

* [videosubscriberaccount] Update to beta 6 (#2533)

Only b1 and b2 introduced some additions/changes

* [uikit] Update for Xcode 9 beta 6 - Part 4 (#2527)

The following headers are now up to date:

- UICollectionViewFlowLayout.h
- UIDocumentPickerViewController.h
- UIFontDescriptor.h
- UIImage.h
- UIImageView.h
- UIImagePickerController.h

* [xharness] Re-enable the watchOS tests. (#2534)

It works fine for me locally, so let's see what Jenkins says.

* [macos] Add new APIs in CoreWlan from Xcode9b3 (#2525)

* Update AppKit bindings based on radar 33271241 results (#2518)

* Update AppKit bindings based on radar 33271241 results

- The header comment was updated to note it was NSSliderTouchBarItem view that has the protocol

* Remove NSUserInterfaceCompression where not listed in header

* [vision] Update to beta 6 (#2532)

Removal of some deprecated (during beta) `init*` selectors.

Also sync the versions that were inlined in subclasses - the old
ones were not removed and the new ones were not added.

* [xtro-sharpie] Many methods don't have selectors in Clang's API, so default to the name if no selector. (#2523)

This makes a few more unclassified entries show up (mostly missing designated initializers): https://gist.github.com/rolfbjarne/07aa20f9b50b75bf3e69ac6a825e873a

* [macos] Add ExternalAccessory APIs from xcode9 (#2526)

* [58851] Disable NSMenuView in AllItemsWithNSMenuShouldAllowNull (#2504)

* [arkit] Update for Xcode 9 beta 5 - Part 2 (#2505)

- Add last missing selector.
- Add tests for manual code.

* [monotouch-test] Disable FontDescriptorTest.WithFeature (#2537)

Disabled because it looks like the tvOS font we use: "Gujarati Sangam MN"
does not have rare ligatures anymore (and the entire test is based on it).
Before getting an actual fix for that, let's disable the test so it doesn't break all current builds.
See: https://bugzilla.xamarin.com/show_bug.cgi?id=58929

* [xtro-sharpie] Teach xtro-sharpie about how to get protocol name from the ProtocolAttribute. (#2524)

Teach xtro-sharpie about how to get protocol name from the ProtocolAttribute
to calculate the native name for a TypeDefinition.

Unclassified changes: https://gist.github.com/rolfbjarne/828f8ee41eebb0a3b60a38d71822fe59

* [foundation/uikit] Inline NSItemProvider_UIKitAdditions in NSItemProvider (#2538)

As suggested here: https://github.com/xamarin/xamarin-macios/pull/2527#discussion_r134670981

* [intents] Fix breaking changes (api-diff) (#2543)

Additions of @required members inside `INSpeakable` cannot be `[Abstract]`

* [contacts] Fix breaking change (api-diff) (#2542)

Type Changed: Contacts.CNPostalAddress

Removed method:

	public static string LocalizeProperty (CNPostalAddressKeyOption option);

* [macos] Reenable static registrar since Xcode9b6 un-broke SDK headers (#2544)

- Fix a subtle spacing issues in PartialStaticLibrary property

* [corebluetooth] Update up to beta 6 and enable it on watchOS (#2540)

macOS 10.13 has finally catch up with iOS and this simplifies the
bindings a bit.

* [foundation] API fixes (apidiff) (#2545)

1. Let's not add new, already [Obsolete] API

Type Changed: Foundation.NSDimension

Added constructors:

	[Obsolete ("Not intended to be directly instantiated, this is an abstract class.")]
	public NSDimension ();

2. Fix inconsistently named API, e.g.

Type Changed: Foundation.NSAttributedString

Added properties:

	public static string[] ReadableTypeIdentifiersForItemProvider { get; }
	public static string[] WritableTypeIdentifiers { get; }

* [pdfkit] Do not add already [Obsolete] API in new profiles (#2547)

and ensure using the newer, correct API works cross-platforms

iOS (before)
	[Obsolete ("Use 'Find (string, NSStringCompareOptions)' instead.")]
	public virtual PdfSelection[] Find (string text, nint options);
	public PdfSelection Find (string text, PdfSelection selection, Foundation.NSStringCompareOptions compareOptions);

	[Obsolete ("Use 'Find (string, PdfSelection, NSStringCompareOptions)' instead.")]
	public virtual PdfSelection Find (string text, PdfSelection selection, nint options);
	public void FindAsync (string text, Foundation.NSStringCompareOptions compareOptions);

	[Obsolete ("Use 'FindAsync (string, NSStringCompareOptions)' instead.")]
	public virtual void FindAsync (string text, nint options);
	public void FindAsync (string[] text, Foundation.NSStringCompareOptions compareOptions);

	[Obsolete ("Use 'FindAsync (string [], NSStringCompareOptions)' instead.")]
	public virtual void FindAsync (string[] text, nint options);

iOS (after)
	public virtual PdfSelection[] Find (string text, Foundation.NSStringCompareOptions compareOptions);
	public virtual PdfSelection Find (string text, PdfSelection selection, Foundation.NSStringCompareOptions compareOptions);
	public virtual void FindAsync (string text, Foundation.NSStringCompareOptions compareOptions);
	public virtual void FindAsync (string[] text, Foundation.NSStringCompareOptions compareOptions);

* Bump versions for the 7th preview (#2541)

* Remove additions of AVKit removed in beta5 (#2536)

* NSUrlSessionTask should implement NSProgressReporting for iOS (#2548)

NSUrlSessionTask implements NSProgressReporting on iOS as well as Mac, so the #if MONOMAC isn't needed.

* Add missing availability attributes causing failures on older iOS versions (#2550)

* [vision] Minor fix wrt xtro (#2551)

including some things we need to ignore manually

!missing-field! VNVisionVersionNumber not bound
!missing-pinvoke! VNImagePointForFaceLandmarkPoint is not bound
!missing-pinvoke! VNNormalizedFaceBoundingBoxPointForLandmarkPoint is not bound

* [uikit] NSFileProviderMessaging was removed in beta 2. Fixes #58222 (#2552)

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=58222

* [uikit] Update for Xcode 9 - Part 5 (#2546)

Bindings for the following headers:
-  UIActivity.h
-  UIActivityItemProvider.h
-  UIAlertController.h
-  UIApplication.h
-  UIBarButtonItem.h
-  UIButton.h
-  UICollectionViewLayout.h
-  UIColor.h
-  UIControl.h
-  UIDocumentMenuViewController.h
-  UIFontMetrics.h
-  UIGestureRecognizer.h
-  UIGraphicsImageRenderer.h
-  UIInputViewController.h

* [CoreText] Fix an extraneous free in CTFont.GetDefaultCascadeList. (#2555)

We do not own the return value from CFArrayGetValueAtIndex, so don't say we do
when creating CTFontDescriptor instances, since that leads to angry dragons:

    2017-08-28 20:15:20.293 monotouchtest[33186:2311738] A_FontTest
    2017-08-28 20:15:20.294 monotouchtest[33186:2311738] 	[PASS] A_FontTest.CTFontCreateWithFontDescriptorAndOptions
    2017-08-28 20:15:20.295 monotouchtest[33186:2311738] 	[PASS] A_FontTest.CTFontCreateWithNameAndOptions
    2017-08-28 20:15:20.296 monotouchtest[33186:2311738] critical: Stacktrace:

    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) CoreText.CTFont.CTFontCopyDefaultCascadeListForLanguages (intptr,intptr) [0x0000a] in <ae65a2b1eea242d2b68fe784749543bf>:0
    at CoreText.CTFont.GetDefaultCascadeList (string[]) [0x00013] in /work/maccore/xcode9/xamarin-macios/src/CoreText/CTFont.cs:2185
    at MonoTouchFixtures.CoreText.A_FontTest.GetCascadeList () [0x0001e] in /work/maccore/xcode9/xamarin-macios/tests/monotouch-test/CoreText/FontTest.cs:78
    at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <7c58d77f8ca548d5b9b32e70a64ba2fd>:0
    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <7c58d77f8ca548d5b9b32e70a64ba2fd>:0
    at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00032] in /work/maccore/xcode9/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
    at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /work/maccore/xcode9/xamarin-macios/external/mono/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
    at NUnit.Framework.Internal.Reflect.InvokeMethod (System.Reflection.MethodInfo,object,object[]) [0x00009] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Reflect.cs:215
    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunNonAsyncTestMethod (NUnit.Framework.Internal.TestExecutionContext) [0x00025] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/TestMethodCommand.cs:116
    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod (NUnit.Framework.Internal.TestExecutionContext) [0x0001a] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/TestMethodCommand.cs:90
    at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00000] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/TestMethodCommand.cs:66
    at NUnit.Framework.Internal.Commands.SetUpTearDownCommand.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00007] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/SetUpTearDownCommand.cs:84
    at NUnit.Framework.Internal.WorkItems.SimpleWorkItem.PerformWork () [0x00000] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/SimpleWorkItem.cs:64
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.RunChildren () [0x00035] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:154
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.PerformWork () [0x000de] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:93
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.RunChildren () [0x00035] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:154
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.PerformWork () [0x000de] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:93
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.RunChildren () [0x00035] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:154
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.PerformWork () [0x000de] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:93
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at MonoTouch.NUnit.UI.BaseTouchRunner.Run (NUnit.Framework.Internal.Test) [0x0004d] in /work/maccore/xcode9/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:442
    at MonoTouch.NUnit.UI.BaseTouchRunner.Run () [0x00030] in /work/maccore/xcode9/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:171
    at MonoTouch.Dialog.StringElement.Selected (MonoTouch.Dialog.DialogViewController,UIKit.UITableView,Foundation.NSIndexPath) [0x00008] in /work/maccore/xcode9/xamarin-macios/external/MonoTouch.Dialog/MonoTouch.Dialog/Elements.cs:765
    at MonoTouch.Dialog.DialogViewController.Selected (Foundation.NSIndexPath) [0x00026] in /work/maccore/xcode9/xamarin-macios/external/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:577
    at MonoTouch.Dialog.DialogViewController/Source.RowSelected (UIKit.UITableView,Foundation.NSIndexPath) [0x00016] in /work/maccore/xcode9/xamarin-macios/external/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:402
    at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) [0x0005d] in <32f0c196c5bc4aa18daea2ee64a7814e>:0
    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <ae65a2b1eea242d2b68fe784749543bf>:0
    at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /work/maccore/xcode9/xamarin-macios/src/UIKit/UIApplication.cs:79
    at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /work/maccore/xcode9/xamarin-macios/src/UIKit/UIApplication.cs:63
    at monotouchtest.Application.Main (string[]) [0x00011] in /work/maccore/xcode9/xamarin-macios/tests/monotouch-test/Main.cs:27
    at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <30a7f7e09de9467b8b454221034a0e38>:0

    Native stacktrace:

    0   monotouchtest                       0x000000010fca03c4 mono_handle_native_crash + 244
    1   monotouchtest                       0x000000010fcadd30 mono_sigsegv_signal_handler + 288
    2   libsystem_platform.dylib            0x000000011feb3b3a _sigtramp + 26
    3   CoreFoundation                      0x000000011de035a2 computeSanitizedString + 146
    4   CoreText                            0x00000001168df314 _ZN15TPurgeableCache19RetainedValueForKeyEPKv + 54
    5   CoreText                            0x00000001168def85 _ZNK17TDescriptorSource22CopyDescriptorUncachedEPK7__CFURLbPK10__CFString + 55
    6   CoreText                            0x00000001168df34f _ZNK17TDescriptorSource14CopyDescriptorEPK7__CFURLbPK10__CFString + 27
    7   CoreText                            0x00000001168e20ad _ZNK17TDescriptorSource35CopyFontDescriptorPerPostScriptNameEPK10__CFStringmm + 297
    8   CoreText                            0x00000001168dfd9e _ZNK17TDescriptorSource30CopySystemFontDescriptorByNameEPK10__CFString10UIFontFlag + 54
    9   CoreText                            0x00000001168e54c4 _ZNK14TFontFallbacks17CopyFontFallbacksEPK10__CFStringS2_PK9__CFArray + 652
    10  CoreText                            0x00000001168e4a00 _ZNK14TFontFallbacks29CopyFontFallbacksForLanguagesEPK10__CFStringPK9__CFArray + 122
    11  CoreText                            0x00000001168e4971 _ZN17TDescriptorSource39CopyDefaultSubstitutionListForLanguagesEPK10__CFStringPK9__CFArray + 61
    12  CoreText                            0x00000001169397a7 _ZNK9TBaseFont28CreateSystemDefaultFallbacksEPK10__CFStringPK9__CFArray + 51
    13  CoreText                            0x000000011693999c _ZNK9TBaseFont15CreateFallbacksE10UIFontFlagPPK16__CFCharacterSetPK9__CFArray + 346
    14  CoreText                            0x00000001168c1036 _ZNK5TFont24CreateDefaultCascadeListEPK9__CFArray + 242
    15  CoreText                            0x00000001168b8ff9 CTFontCopyDefaultCascadeListForLanguages + 97
    16  ???                                 0x0000000140eaefd3 0x0 + 5384105939
    17  ???                                 0x0000000140eae761 0x0 + 5384103777
    18  ???                                 0x000000013c9c8e74 0x0 + 5311860340
    19  monotouchtest                       0x000000010fcb0c89 mono_jit_runtime_invoke + 1273
    20  monotouchtest                       0x000000010fd6e3a8 do_runtime_invoke + 88
    21  monotouchtest                       0x000000010fd71bac mono_runtime_try_invoke_array + 1292
    22  monotouchtest                       0x000000010fd15587 ves_icall_InternalInvoke + 647
    23  ???                                 0x000000013e9fcd13 0x0 + 5345627411
    24  ???                                 0x000000013e9fc738 0x0 + 5345625912
    25  ???                                 0x000000013e9fded5 0x0 + 5345631957
    26  ???                                 0x000000013e9fbb76 0x0 + 5345622902
    27  ???                                 0x000000013e9e237e 0x0 + 5345518462
    28  ???                                 0x000000013e9e237e 0x0 + 5345518462
    29  ???                                 0x000000013e9e237e 0x0 + 5345518462
    30  ???                                 0x000000013e9e237e 0x0 + 5345518462
    31  ???                                 0x000000013e873006 0x0 + 5344014342
    32  monotouchtest                       0x000000010fcb0c89 mono_jit_runtime_invoke + 1273
    33  monotouchtest                       0x000000010fd6e3a8 do_runtime_invoke + 88
    34  monotouchtest                       0x000000010fd6e320 mono_runtime_invoke + 208
    35  monotouchtest                       0x000000010fe71af1 xamarin_invoke_trampoline + 5617
    36  monotouchtest                       0x000000010fe79ddd xamarin_arch_trampoline + 189
    37  monotouchtest                       0x000000010fe7b1a1 xamarin_x86_64_common_trampoline + 110
    38  UIKit                               0x0000000111b9876b -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1810
    39  UIKit                               0x0000000111b98986 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 344
    40  UIKit                               0x0000000111a6b5c9 _runAfterCACommitDeferredBlocks + 318
    41  UIKit                               0x0000000111a59dad _cleanUpAfterCAFlushAndRunDeferredBlocks + 280
    42  UIKit                               0x0000000111a89f68 _afterCACommitHandler + 137
    43  CoreFoundation                      0x000000011de3ddb7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    44  CoreFoundation                      0x000000011de3dd0e __CFRunLoopDoObservers + 430
    45  CoreFoundation                      0x000000011de22324 __CFRunLoopRun + 1572
    46  CoreFoundation                      0x000000011de21a89 CFRunLoopRunSpecific + 409
    47  GraphicsServices                    0x0000000121b7e9c6 GSEventRunModal + 62
    48  UIKit                               0x0000000111a5f7d0 UIApplicationMain + 159
    49  ???                                 0x000000013c9c4474 0x0 + 5311841396
    50  ???                                 0x000000013c9c40ad 0x0 + 5311840429
    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

* [monotouch-test] Don't subclass MKMapView. (#2556)

MKMapView doesn't like being subclassed (Apple says "you should not subclass the MKMapView class itself").

Bad things like this starts happening:

    Thread 0 name:  tid_303  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib        	0x0000000186b25348 __pthread_kill + 8
    1   libsystem_pthread.dylib       	0x0000000186c39354 pthread_kill$VARIANT$mp + 396
    2   libsystem_c.dylib             	0x0000000186a94fd8 abort + 140
    3   monotouchtest                 	0x0000000101c02c14 mono_handle_native_crash + 22047764 (mini-exceptions.c:2548)
    4   monotouchtest                 	0x0000000101c0d02c mono_sigsegv_signal_handler + 22089772 (mini-runtime.c:2886)
    5   libsystem_platform.dylib      	0x0000000186c33b60 _sigtramp + 52
    6   CoreFoundation                	0x0000000186f93108 cow_cleanup + 112
    7   CoreFoundation                	0x0000000186f93108 cow_cleanup + 112
    8   CoreFoundation                	0x0000000186eda51c -[__NSArrayM dealloc] + 68
    9   CoreFoundation                	0x000000018703f5c8 __CFBasicHashDrain + 312
    10  CoreFoundation                	0x0000000186fb5b44 _CFRelease + 224
    11  CoreText                      	0x000000018a808404 TDescriptorSource::PurgeFontFallbacksCache+ 488452 () + 92
    12  CoreText                      	0x000000018a808374 TDescriptorSource::PurgeFromCaches+ 488308 (__CFURL const*) const + 176
    13  CoreText                      	0x000000018a7eec74 CTFontRemoveFromCaches + 168
    14  VectorKit                     	0x0000000196a539b0 +[VKSharedResourcesManager removeResourceUser:] + 324
    15  VectorKit                     	0x0000000196ca27a4 md::MapEngine::~MapEngine+ 2643876 () + 360
    16  VectorKit                     	0x0000000196ca2634 md::MapEngine::~MapEngine+ 2643508 () + 12
    17  libobjc.A.dylib               	0x000000018651eef4 object_cxxDestructFromClass+ 28404 (objc_object*, objc_class*) + 148
    18  libobjc.A.dylib               	0x000000018652c638 objc_destructInstance + 88
    19  libobjc.A.dylib               	0x000000018652c690 object_dispose + 16
    20  QuartzCore                    	0x000000018afca3ac -[CALayer dealloc] + 116
    21  VectorKit                     	0x0000000196a43294 -[VKMapView dealloc] + 940
    22  QuartzCore                    	0x000000018af6aafc CA::release_objects+ 744188 (X::List<void const*>*) + 32
    23  QuartzCore                    	0x000000018afd97d8 CA::Layer::~Layer+ 1198040 () + 276
    24  QuartzCore                    	0x000000018afca37c -[CALayer dealloc] + 68
    25  QuartzCore                    	0x000000018af6b16c CA::Transaction::commit+ 745836 () + 1052
    26  UIKit                         	0x0000000190393290 _afterCACommitHandler + 256
    27  CoreFoundation                	0x0000000186fb38b8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    28  CoreFoundation                	0x0000000186fb1270 __CFRunLoopDoObservers + 412
    29  CoreFoundation                	0x0000000186fb182c __CFRunLoopRun + 1292
    30  CoreFoundation                	0x0000000186ed22d8 CFRunLoopRunSpecific + 436
    31  GraphicsServices              	0x0000000188d58f84 GSEventRunModal + 100
    32  UIKit                         	0x000000019040427c UIApplicationMain + 208
    33  monotouchtest                 	0x000000010106eb90 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 9907088 (/<unknown>:1)
    34  monotouchtest                 	0x0000000100f0d6ac UIKit_UIApplication_Main_string___intptr_intptr + 8459948 (UIApplication.cs:79)
    35  monotouchtest                 	0x0000000100f0d66c UIKit_UIApplication_Main_string___string_string + 8459884 (UIApplication.cs:63)
    36  monotouchtest                 	0x0000000100b10450 monotouchtest_Application_Main_string__ + 4277328 (Main.cs:27)
    37  monotouchtest                 	0x0000000100e0c244 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
    38  monotouchtest                 	0x0000000101c10048 mono_jit_runtime_invoke + 22102088 (mini-runtime.c:2526)
    39  monotouchtest                 	0x0000000101c75eec do_runtime_invoke + 22519532 (object.c:2829)
    40  monotouchtest                 	0x0000000101c78a3c do_exec_main_checked + 22530620 (object.c:4623)
    41  monotouchtest                 	0x0000000101bf9a1c mono_jit_exec + 22010396 (driver.g.c:1040)
    42  monotouchtest                 	0x0000000101d13d60 xamarin_main + 23166304 (monotouch-main.m:482)
    43  monotouchtest                 	0x00000001007de710 main + 927504 (main.m:67)
    44  libdyld.dylib                 	0x00000001869f656c start + 4

* [introspection] Let SkipDueToAttributeInProperty skip setters too (#2557)

`SkipDueToAttributeInProperty` which is used to check the availability attribute of properties
when the Availability info only exist on the property and not on the property Getter or Setter was wrong.
This lead to `setSpringLoaded` (which was introduced in iOS 11) to not be ignored by the test (making it fail).

- Fix bug #59085: [introspection-ios] selector not found for UIKit.UIBarButtonItem : setSpringLoaded: - Broken test
(https://bugzilla.xamarin.com/show_bug.cgi?id=59085)

* [corevideo][watchos] Enable CoreVideo on watchOS (#2553)

* [storekit] Fix CampaignToken typo (#2559) (#2560)

- Fixes bug #59078: StoreProductParameters and invalid property for CampaignToken
(https://bugzilla.xamarin.com/show_bug.cgi?id=59078)

* [coreml][watchos] Enable API using CoreVideo on watchOS. Fix #58097 (#2561)

https://bugzilla.xamarin.com/show_bug.cgi?id=58097

* Add missing [MarshalDirective] attributes. (#2558)

* [bindings-generator] Improve build & project file.

* Add missing [MarshalDirective] attributes.

Add missing [MarshalDirective] attributes, which also requires implementing
support for out parameters in the binding generator, since one of the
signatures missing the [MarshalDirective] contains such an out parameter.

Also add tests for all the API I've added [MarshalDirective] to.

* [bindings-generator] Remove redundant if check.

* [monotouch-test] Rename file to end with 'Test.cs'.

* [tests] Fix a few build errors for Xamarin.Mac.

* [uikit] Fix UIColor and UIInputViewController tvOS availability (#2569)

- Fixes introspection tests on tvOS 10.

* [storekit] Fix SKCloudServiceSetupMessageIdentifier and SKProductStorePromotionController tvOS availability (#2568)

- Fixes introspection tests on tvOS 10.

* [mapkit] Fix MKMapItemTypeIdentifier tvOS availability (#2566)

- Also remove double [Mac] availability attribute.
- Fixes introspection tests on tvOS 10.

* [ARKit] Fix marshalling for ARPointCloud.RawFeaturePoints. (#2565)

ARPointCloud.RawFeaturePoints is an array of Vector3, but each vector is
16-byte aligned (as if it were an array of Vector4).

This means we need to account for this when creating a managed array from
pointer to the native C-style array.

* [ModelIO] Fix MDLVoxelIndexExtent struct. (#2564)

The MDLVoxelIndexExtent is a struct containing two 4-dimensional vectors of
integers (not floats, as originally and incorrectly implemented).

Fix this my creating a new MDLVoxelIndexExtent2 struct with the right fields,
re-implement all the API that exposes this struct and obsolete the old API.

Also add missing [MarshalDirective] attributes.

And write a test to make sure it works fine now and forever.

* [coredata] Enable new fields since rdar #33878590 is fixed w/beta 6 (#2570)

reference:
https://trello.com/c/dlSRYPFx

* [xtro-sharpie] Add a Simd check class to verify signatures with Simd types.

* [Simd] Add simd matrix types.

The OpenTK matrices (Matrix2/3/4) has a different memory layout than Apple's
matrix_float2x2/matrix_float3x3/matrix_float4x4 matrices: the OpenTK versions
are row-major, while Apple's versions are column-major.

This means that when blitting memory from one to the other, the matrix will
appear to have been transposed.

See bug #[58599][2] for an example.

Unfortunately we've already bound several API with Apple's matrix_floatXxX
matrices using OpenTK's matrices, and although they're bound wrong, and the
matrices appear transposed on input/output, we can't change the behavior
because we have to maintain compatibility.

This means we have to introduce new API, and then also just define new matrix
types with the right memory layout (column-major). Additionally, in the future
we might be able to mark these matrices as Simd-matrixes, so that the JIT/AOT
compiler can generate the correct alignment for them, avoiding having to
define a native conversion method (using the [MarshalDirective] hack).

The matrices have been designed to match API-wise the matrices in the
System.Numerics.Vectors namespace [1], but for the moment with only a few
basic operations implemented (Determinant/Transpose/Multiply) defined (we can
always add more later if we want to).

In addition explicit conversion operators to and from the corresponding
OpenTK.MatrixX are implemented, which means any operation defined in the
OpenTK matrices can be used by converting back and forth.

[1]: https://msdn.microsoft.com/en-us/library/system.numerics.matrix4x4(v=vs.111).aspx
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58599

* [ARKit] Use the new Simd matrix types.

* [Vision] Use the new Simd matrix types.

* [ModelIO] Use the new Simd-compatible matrix types, and deprecate the old API.

* [GameplayKit] Use the new Simd-compatible matrix types, and deprecate the old API.

* [SpriteKit] Use the new Simd-compatible matrix types, and deprecate the old API.

* [xtro] Don't report missing [MarshalDirective] for obsolete methods.

* [xtro] Remove unnecessary ignores.

The implementation changed, and these stayed accidentally.

* [wkwebkit] Fix (native) protocol names (#2572)

Also ignore xtro's WKSnapshotConfiguration since it's an Apple bug 34185961

reference (xtro)
!missing-protocol! WKURLSchemeHandler not bound
!missing-protocol! WKURLSchemeTask not bound
!unknown-protocol! WKUrlSchemeHandler bound
!unknown-protocol! WKUrlSchemeTask bound

!unknown-type! WKSnapshotConfiguration bound

* [uikit] Fix enums availability attributes (#2575)

- Fixes bug #59132: [uikit] Extra types in watchOS
(https://bugzilla.xamarin.com/show_bug.cgi?id=59132)

* [watchkit] Add missing designated initializers (#2574)

references (xtro)
!missing-designated-initializer! WKInterfaceController::init is missing an [DesignatedInitializer] attribute
!missing-designated-initializer! WKUserNotificationInterfaceController::init is missing an [DesignatedInitializer] attribute

* [xtro] Reword some of the Simd diagnostic messages according to review.

* [tests] Make sure test symbols don't clash between different test libraries.

Fixes this build problem for framework-test:

	clang: error: linker command failed with exit code 1 (use -v to see invocation)
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_mdltransform_get_rotation_matrix'.
	MTOUCH: error MT5213: Duplicate symbol in: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/framework-test/obj/iPhoneSimulator/Debug-unified/mtouch-cache/XStaticObjectTest.framework/XStaticObjectTest (Location related to previous error)
	MTOUCH: error MT5213: Duplicate symbol in: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/framework-test/obj/iPhoneSimulator/Debug-unified/mtouch-cache/XStaticArTest.framework/XStaticArTest(libtest-ar.x86_64.o) (Location related to previous error)
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_mdltransformcomponent_get_local_transform'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_mdltransform_create_global_transform'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_get_matrix_float4x4'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_get_matrix_float3x3'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_get_matrix_float2x2'.
	MTOUCH: error MT5209: Native linking error: 6 duplicate symbols for architecture x86_64
	MTOUCH: error MT5202: Native linking failed. Please review the build log.

* [tests] Since libtest.a need ModelIO now, the corresponding LinkWith attributes need to state that too.

* [introspection] Don't check native signatures on obsolete members, and ignore the right simd matrix types.

Fixes this introspection/Mac problem:

    ***** ApiSignatureTest.NativeSignatures
    Selector: uniformWithName:matrixFloat2x2: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat2x2, nothing encoded
    Selector: uniformWithName:matrixFloat3x3: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat3x3, nothing encoded
    Selector: uniformWithName:matrixFloat4x4: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat4x4, nothing encoded
    Selector: setMatrixFloat2x2Value: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat2x2, nothing encoded
    Selector: setMatrixFloat3x3Value: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat3x3, nothing encoded
    Selector: setMatrixFloat4x4Value: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat4x4, nothing encoded
    Selector: initWithName:matrixFloat2x2: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat2x2, nothing encoded
    Selector: initWithName:matrixFloat3x3: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat3x3, nothing encoded
    Selector: initWithName:matrixFloat4x4: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat4x4, nothing encoded

* [monotouch-tests] Include more custom asserts for watchOS to make the build work.

Fixes this:

    Simd/MatrixFloat4x4Test.cs(28,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(29,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(37,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(48,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    [...]

* [monotouch-test] Exclude code that requires the binding project from xammac tests.

Exclude code that requires the test binding project from xammac tests because
there's currently no XM version of the test binding project.

Fixes this:

    tests/monotouch-test/SpriteKit/UniformTest.cs(20,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
    tests/monotouch-test/ModelIO/MDLMaterialProperty.cs(37,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
    tests/monotouch-test/ModelIO/MDLTransform.cs(34,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)

* Bump version for preview #8 (#2576)

* [spritekit] Audit fixes (xtro) (#2577)

1.	SKVideoNode is now, partially, available on watchOS and does
	not require the extra, manual code to swicth selectors depending
	on the OS version being run.

!missing-type! SKVideoNode not bound
!missing-selector! SKVideoNode::anchorPoint not bound
!missing-selector! SKVideoNode::initWithCoder: not bound
!missing-selector! SKVideoNode::initWithFileNamed: not bound
!missing-selector! SKVideoNode::initWithURL: not bound
!missing-selector! SKVideoNode::setAnchorPoint: not bound
!missing-selector! SKVideoNode::setSize: not bound
!missing-selector! SKVideoNode::size not bound
!missing-selector! +SKVideoNode::videoNodeWithFileNamed: not bound
!missing-selector! +SKVideoNode::videoNodeWithURL: not bound

2.	SKNodeFocusBehavior is exposed needlessly on watchOS because
	SpriteKit/Enums.cs was not processed by the generator, so [NoWatch]
	did not matter.

!unknown-native-enum! SKNodeFocusBehavior bound

	It's also visible on macOS but nothing uses it (so we do not expose
	it needlessly)

!missing-enum! SKNodeFocusBehavior not bound

3.	Add missing designated initializer on default `init`

!missing-designated-initializer! SKAttributeValue::init is missing an [DesignatedInitializer] attribute
!missing-designated-initializer! SKNode::init is missing an [DesignatedInitializer] attribute

4.	Remove inconsistency for SKNode subclasses wrt XAMCORE_4_0

The trio attributeValues, setAttributeValues and setValue:forAttributeNamed:
that was moved from SKNode (deprecated) into its subclasses. This was done
using XAMCORE_4_0 but not on every subclasses. This adds them everywhere to
be consistent (only SKNode versions are not defined in XAMCORE_4_0)

!missing-selector! SKEffectNode::attributeValues not bound
!missing-selector! SKEffectNode::setAttributeValues: not bound
!missing-selector! SKEffectNode::setValue:forAttributeNamed: not bound
!missing-selector! SKEffectNode::valueForAttributeNamed: not bound
!missing-selector! SKEmitterNode::attributeValues not bound
!missing-selector! SKEmitterNode::setAttributeValues: not bound
!missing-selector! SKEmitterNode::setValue:forAttributeNamed: not bound
!missing-selector! SKEmitterNode::valueForAttributeNamed: not bound
!missing-selector! SKSpriteNode::attributeValues not bound
!missing-selector! SKSpriteNode::setAttributeValues: not bound
!missing-selector! SKSpriteNode::setValue:forAttributeNamed: not bound
!missing-selector! SKSpriteNode::valueForAttributeNamed: not bound

* [introspection] Make sure '[FAIL]' is printed before every failure. (#2578)

This makes xharness able to list the failures in the inline summary.

* [xtro] Reword some of the Simd diagnostic messages according to review.

* [xharness] Add a missing IsServerMode check to generate correct html. (#2581)

* [SpriteKit] SKTransformNode is new in Xcode 9 so no need to keep the broken (and obsolete) non-simd version of RotationMatrix.

* [intents] Fix some (partial) xtro issues and #59156 (#2585)

reference
https://bugzilla.xamarin.com/show_bug.cgi?id=59156

Remaining issues are filled in https://bugzilla.xamarin.com/show_bug.cgi?id=59183

!missing-selector! +INCarSeatResolutionResult::confirmationRequiredWithCarSeatToConfirm: not bound
!missing-selector! +INCarSeatResolutionResult::successWithResolvedCarSeat: not bound
!missing-selector! +INNotebookItemTypeResolutionResult::disambiguationWithValuesToDisambiguate: not bound

* [Intents] Confirm* interface methods should be bound as Confirm, Fixes Bug 59164 (#2591)

* [Intents] Confirm* interface methods should probably be bound as Confirm, Fixes Bug 59164

https://bugzilla.xamarin.com/show_bug.cgi?id=59164

All Confirm* methods from *IntentHandling interfaces should be named
just `Confirm` to avoid confusion because most of them do not directly
confirm as an acion, but instead they **ask** for confirmation also we
would follow swift's naming by doing this.

* [Intents] XAMCORE_4_0 all Confirm* methods from *IntentHandling

Turns any Confirm* into just Confirm inside a XAMCORE_4_0 block,

* [Intents] Fix breaking changes in Intents added in Xcode 9 Bindings (#2590)

Apple added more protocol conformances to INRidesharingDomainHandling and
INPaymentsDomainHandling protocols in Xcode 9, I introduced these breaking
changes back when I did intents binding so fixing them :)

* [Metal] New bindings from Xcode 9 betas (#2457)

* [AVFoundation] Updated bindings for xcode9. (#2272)

* [Xcode9] Add IOSurface bindings (#2363)

* This framework was a private framework before iOS 11.

This framework was a private framework before iOS 11, yet the headers claim
many API were introduced in iOS 10.

So take account of this difference by using the private framework location in
iOS 10.3 or earlier.

Testing these API from Xcode works fine when run on an iOS 10.3 device, and
I've confirmed the IOSurface framework is loaded from the private frameworks
path on older devices (and when built using Xcode 9 and linked with the public
framework path).

* Disable code to make IOSurface work on iOS 10.

Disable the code to make IOSurface work on iOS 10, since it may be rejected by
the App Store.

This also means adjusting the availability attributes, so that the
introspection tests pass (and to document that technically these API won't
work when used with Xamarin.iOS in iOS 10).

I've filed bug #[59201][1] to keep track of this, maybe we can re-enable this later.

[1]: https://bugzilla.xamarin.com/show_bug.cgi?id=59201

* [CoreMedia] Fix leak in CMAttachmentBearer.GetAttachments. (#2593)

The caller owns the return value from CMCopyDictionaryOfAttachments, so tell
Runtime.GetNSObject that.

* [Intents] Adds missing API found by xtro, fixes Bug 59183 (#2596)

https://bugzilla.xamarin.com/show_bug.cgi?id=59183

Fixes

!missing-selector! +INNotebookItemTypeResolutionResult::disambiguationWithValuesToDisambiguate: not bound
!missing-selector! +INCarSeatResolutionResult::confirmationRequiredWithCarSeatToConfirm: not bound
!missing-selector! +INCarSeatResolutionResult::successWithResolvedCarSeat: not bound
!incorrect-protocol-member! INUIHostedViewControlling::configureWithInteraction:context:completion: is OPTIONAL and should NOT be abstract

* [xtro] Fix StartWorkingDirectory to enable debugging (#2598)

* [iosurface] Enable for tvOS and XM classic (to avoid multiple defines around consumer API) (#2597)

* [xtro] Fix EnumCheck (#2600)

* [ARKit] Rename a few method to make them nicer. (#2604)

* DisplayTransform -> GetDisplayTransform since methods should have verbs.

* SessionWasInterrupted -> WasInterrupted and SessionInterruptionEnded ->
  InterruptionEnded since these names match better with the other names
  (CameraDidChangeTrackingState / DidFail / DidOutputAudioSampleBuffer: none
  are prefixed with 'Session'). Additionally, the type is a Model (for the
  delegate pattern), which means all methods are more-or-less event-like, and
  the first argument is always the same (the protocol itself), which is
  another indicator the methods should be named similarly.

* [Foundation] Remove 'Key' suffix from some fields. (#2606)

Of the 168 fields in NSMetadataItem, only these 5 hadn't removed the 'Key'
suffix.

So make them all equivalent by removing the 'Key' suffix from these 5 fields.

* [ImageIO] Fix API to not duplicate the instance in instance methods. (#2609)

An instance method does not need to take the instance as a parameter, so
remove the first (instance) parameter for
CGImageDestination.AddAuxiliaryDataInfo and
CGImageSource.CopyAuxiliaryDataInfo.

An alternative solution would be to make the methods static, but I like the
instance API better.

* [UIKit] De-model UIDataSourceTranslating. (#2603)

It's not clear from neither the documentation nor the headers how this
protocol is supposed to be used, and since it doesn't correspond to the
delegate pattern, remove the [Model] attribute for now.

We can always add it back later.

* [CoreML] Improve API. (#2592)

* [CoreML] Improve API.

* The indices, shape and stride properties for MLMultiArray and
  MLMultiArrayConstraint can logically only be arrays of integers, so type
  them as such. This means adding overloads for MLMultiArray's constructors,
  GetObject and SetObject methods, and the indexers that takes nint[] arrays
  instead of NSNumber[] arrays.

* Change MLFeatureValue's static factory methods to be a method ('Create')
  instead of a preposition, and call all the different factory methods the
  same, since they can be overloaded nicely.

* [tests][monotouch-test] Add version check to MLMultiArrayTest and make sure the arrays we create are big enough for the data we put in them.

* [tests][monotouch-test] MLMultiArray's elements aren't zero-initialized, so don't assume that in the tests.

* Support overloading Objective-C methods based on static/instance. (#2607)

Two Objective-C methods can be named identically as long as one is static and
the other instance.

We must support this since Apple did just this (in the NSItemProviderReading /
NSItemProviderWriting protocols).

We solve it by prepending a '+' or '-' to the selector when hashing it (to
determine selector uniqueness, and to look the method up again at runtime).

* [uikit] Update for Xcode 9 - Part 6 (#2602)

NSAttributedString.h
NSFileProviderExtension.h
NSLayoutAnchor.h
UIAccessibility.h
UIAccessibilityAdditions.h
UIAccessibilityContainer.h
UIAccessibilityContentSizeCategoryImageAdjusting.h
UIAccessibilityCustomRotor.h
UIAccessibilityLocationDescriptor.h
UITabBar.h
UINavigationBar.h
UIScreen.h

* Xcode9 scenekit (#2512)

* [SceneKit] basic work

* Added key

* [xcode9] SCNCameraController

* [xcode9] SCNCamera updates

* [xcode9] SCNMaterial

* [xcode9] SCNGeometryTessellator, SCNCameraControlConfiguration, SCNView, small bits

* Add trailing commas to last enum value

* Remove whitespace noise

* [scenekit] Update deprecated attributes messages

* Addresses some of Rolf's feedback

* Drop the WeakDelegate in SCNCameraController

* Rename method to Render, remove ctor from class that can not be constructed in Palygrounds, add typo exception

* [AppKit] Rename NSBezierPath.AppendBezierPathWithCGGlyph to match its sibling methods. (#2605)

NSBezierPath contains a lot of 'AppendPathWithXXX' methods, that all map to
'appendBezierPathXXX' selectors.

So rename AppendBezierPathWithCGGlyph accordingly, to make it more similar to
the other methods in the same type.

* [uikit] Add all UISpringLoadedInteractionSupporting (#2616)

Types do not conform to the protocol but protocol methods work on those types (see monotouch-test).
Fixed introspection tests accordingly and tested the selectors in monotouch-test.

* [Intents] Add convenience ctor overload and call correct base ctor in manual ctor. (#2613)

Add a convenience constructor overload in
INGetUserCurrentRestaurantReservationBookingsIntent that uses nint instead of
NSNumber, since logically "number of results" will always be some sort of
integer.

Also call the correct base constructor in INSpeakableString's custom
constructor (same as any other generated constructor). Otherwise we end up
doing something like this: [[[INSpeakableString alloc] init] initWith ...],
i.e. calling two different init methods.

* [coreimage] Add new headers API up to beta 6 (#2601)

Filters are not complete (ref: #57350)
https://bugzilla.xamarin.com/show_bug.cgi?id=57350

* Some new constants are not yet documented (type is known), so they
  are commented / ignored
  https://bugzilla.xamarin.com/show_bug.cgi?id=59296

* Filled bug for [Wrap] inside [Category] so strong dictionary helpers
  can be re-enabled later
  https://bugzilla.xamarin.com/show_bug.cgi?id=59294

* [foundation] xtro fixes for watchOS (#2586)

!missing-enum! NSProcessInfoThermalState not bound
!missing-field! NSProcessInfoThermalStateDidChangeNotification not bound
!missing-selector! NSProcessInfo::thermalState not bound

Headers are wrong and preferredPresentationStyle is not in tvOS and watchOS

!missing-selector! NSItemProvider::preferredPresentationStyle not bound
!missing-selector! NSItemProvider::setPreferredPresentationStyle: not bound

* [uikit] Also remove UIPreferredPresentationStyle enum from platform where it's not used

* [Foundation] Improve NSItemProviderReading & NSItemProviderWriting protocols/compliance. (#2614)

* [Foundation] Improve NSItemProviderReading & NSItemProviderWriting protocols/compliance.

* NSItemProviderWriting:
* NSItemProviderReading: Implement correctly and completely by uncommenting
  commented out code.

* NSMutableString:
* NSAttributedString: remove inlined members, since these classes don't
  implement NSItemProviderReading / NSItemProviderWriting (according to the
  headers at least).

* NSUrl: all platforms now seem to implement NSItemProviderReading /
  NSItemProviderWriting.

* NSString: all platforms now seem to implement both NSItemProviderReading and NSItemProviderWriting

* UIColor:
* UIImage: Update inlined protocol members according to the latest beta.

Additionally, due to the following conditions:

* The protocols all have the correct members now.
* In the API definition we tell the generator to inline members from a
  protocol by inheriting from the corresponding interface.
* The generator doesn't inline static members from protocols.

several 'new' keywords had to be added to silence a compiler warning that
occurrs when we manually inline a static member, since the member would be
included in the type both from the inherited interface and the manual
implementation.

* [Foundation] Comment out NSItemProviderWriting.GetItemProviderVisibility to avoid inlining/generating unusable methods.

NSItemProviderWriting.GetItemProviderVisibility is an optional method, and
none of the native classes that implements NSItemProviderWriting actually
imlements the method. This means inlining the method in those classes ends up
creating unusable API; so just comment out the method to avoid generating the
unusable API.

The introspection tests found this:

    [FAIL] Foundation.NSString : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] Foundation.NSUrl : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] Contacts.CNContact : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] MapKit.MKMapItem : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] UIKit.UIColor : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] UIKit.UIImage : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] iOSApiSelectorTest.ApiSelectorTest.StaticMethods : 6 errors found in 2348 static selector validated:

See also https://bugzilla.xamarin.com/show_bug.cgi?id=59308

* [iosurface] Add missing [TV] attributes (#2619)

* [opengles] Enable the new API using IOSurface (#2618)

The symbol only exists inside device libraries, not on simulator,
and the introspection tests were updated to ignore it.

Part of https://bugzilla.xamarin.com/show_bug.cgi?id=58054

* [avfoundation][watchos] Enable AudioBufferList (fix #59145) + audit (xtro) (#2617)

1. AudioBufferList is part of CoreAudio (wrong namespace, which needs
   a few changes in the generator) and now available in watchOS 4
   https://bugzilla.xamarin.com/show_bug.cgi?id=59145

2. Also fixes xtro found issues:

!missing-type! AVAudioRecorder not bound
!missing-selector! AVAudioRecorder::averagePowerForChannel: not bound
!missing-selector! AVAudioRecorder::channelAssignments not bound
!missing-selector! AVAudioRecorder::currentTime not bound
!missing-selector! AVAudioRecorder::delegate not bound
!missing-selector! AVAudioRecorder::deviceCurrentTime not bound
!missing-selector! AVAudioRecorder::format not bound
!missing-selector! AVAudioRecorder::initWithURL:format:error: not bound
!missing-selector! AVAudioRecorder::initWithURL:settings:error: not bound
!missing-selector! AVAudioRecorder::isMeteringEnabled not bound
!missing-selector! AVAudioRecorder::isRecording not bound
!missing-selector! AVAudioRecorder::peakPowerForChannel: not bound
!missing-selector! AVAudioRecorder::recordAtTime: not bound
!missing-selector! AVAudioRecorder::recordAtTime:forDuration: not bound
!missing-selector! AVAudioRecorder::recordForDuration: not bound
!missing-selector! AVAudioRecorder::setChannelAssignments: not bound
!missing-selector! AVAudioRecorder::setDelegate: not bound
!missing-selector! AVAudioRecorder::setMeteringEnabled: not bound
!missing-selector! AVAudioRecorder::settings not bound
!missing-selector! AVAudioRecorder::url not bound

!missing-protocol! AVAudioRecorderDelegate not bound

!missing-selector! AVAudioEngine::inputNode not bound
!missing-selector! AVAudioEngine::manualRenderingBlock not bound
!missing-selector! AVAudioInputNode::setManualRenderingInputPCMFormat:inputBlock: not bound
!missing-selector! AVAudioPlayer::format not bound
!missing-selector! AVAudioSession::requestRecordPermission: not bound

!unknown-field! AVFileType3GPP bound
!unknown-field! AVFileType3GPP2 bound
!unknown-field! AVFileTypeAC3 bound
!unknown-field! AVFileTypeAIFC bound
!unknown-field! AVFileTypeAIFF bound
!unknown-field! AVFileTypeAMR bound
!unknown-field! AVFileTypeAVCI bound
!unknown-field! AVFileTypeAppleM4A bound
!unknown-field! AVFileTypeAppleM4V bound
!unknown-field! AVFileTypeCoreAudioFormat bound
!unknown-field! AVFileTypeDNG bound
!unknown-field! AVFileTypeEnhancedAC3 bound
!unknown-field! AVFileTypeHEIC bound
!unknown-field! AVFileTypeHEIF bound
!unknown-field! AVFileTypeJPEG bound
!unknown-field! AVFileTypeMPEG4 bound
!unknown-field! AVFileTypeMPEGLayer3 bound
!unknown-field! AVFileTypeQuickTimeMovie bound
!unknown-field! AVFileTypeSunAU bound
!unknown-field! AVFileTypeTIFF bound
!unknown-field! AVFileTypeWAVE bound

* [Metal] Implement API using IOSurface now that IOSurface is implemented. Partially fixes #58054. (#2621)

https://bugzilla.xamarin.com/show_bug.cgi?id=58054

* [PdfKit] Improve PdfAnnotation.QuadrilateralPoints binding by making it strongly typed. (#2620)

* Implement Simd vector types (VectorFloat2/3/4/VectorInt4). (#2622)

* Implement Simd vector types (VectorFloat2/3/4/VectorInt4).

* [ARKit/Vision] Use the new simd vector types instead of the OpenTK versions.

* [ModelIO] Use the new simd vectors in new API (MDLVoxelIndexExtent2).

This way we won't have to create a MDLVoxelIndexExtent3 in the future.

* [SpriteKit] Use the new simd vectors in new API.

* [metal] Audit (xtro) based fixes (#2623)

!extra-protocol-member! unexpected selector MTLArgumentEncoder::newArgumentEncoderForBufferAtIndex: found
!extra-protocol-member! unexpected selector MTLComputeCommandEncoder::dispatchThreads:threadsPerThreadgroup: found

macos-only

!missing-field! MTLDeviceRemovalRequestedNotification not bound
!missing-field! MTLDeviceWasAddedNotification not bound
!missing-field! MTLDeviceWasRemovedNotification not bound

!missing-pinvoke! MTLCopyAllDevices is not bound

* [CloudKit] Update bindings to beta 6. (#2615)

* [FileProvider] Turn NSFileProviderItemIdentifier enum into a static class, fixes bug 59329 (#2634)

https://bugzilla.xamarin.com/show_bug.cgi?id=59329

At the time of binding NSFileProviderItemIdentifier it wasn't clear
how it was supposed to be used, I mean apple provides two keys which
I thought were the only possible values hence binding it as an smart
enum. Unfortunately this wasn't the case and the user can use those
two values provided from the SDK or their own NSString Identifier.

Swift provides a wrapper unfortunately we can't do the same due to
NSFileProviderItemIdentifier is used in the NSFileProviderItem protocol
and we currently do not support changing signatures on them.

* [mtouch] Teach mtouch about the 'IOSurface' framework for tvOS. Fixes #59333. (#2630)

https://bugzilla.xamarin.com/show_bug.cgi?id=59333

* Bump Touch.Unit to get fix for API breakage. (#2631)

spouliot/Touch.Unit@8f1e19d [NUnitOutputTextWriter] Reintroduce previous constructor to make sure we don't break binary ABI.
spouliot/Touch.Unit@00b0c0b [NUnitOutputTextWriter] Don't write invalid xml comments.
spouliot/Touch.Unit@de9fe20 [TouchRunner] Restore the original code path when not wrapping NUnit xml output.

* [IOSurface] Add missing availability attributes for tvOS. (#2629)

* Bump versions for preview 9 (#2624)

* [AVFoundation] Add missing interface AVRouteDetector. (#2637)

* [tests] Update xtro to reduce list sizes (#2636)

* Skip OpenTK duplicate declaration (we can't change them);
* Fix rule name change for ARKit / simd;
* Add missing default initializer on `init` to pending actions;
* Add note for AVPersistableContentKeyRequest changes wrt tvOS;

* [ReplayKit] Make RPBroadcastActivityViewController.LoadBroadcastActivityViewController async-capable. (#2639)

* [xcode9] More SceneKit bindings (#2633)

* [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380 (#2644)

* [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380

https://bugzilla.xamarin.com/show_bug.cgi?id=59380

vector_float3 is 16 bytes, which means the binding is incorrect,
because Vector3 is 12 bytes, and our code does not that difference into account.

* Add tests

* [DeviceCheck] Disable default ctor for DCDevice. (#2642)

It doesn't seem to be useful according to the documentation, since it appears
that the only way to get an instance is to use the static CurrentDevice
property.

* [audiounit] Audit (xtro) fixes for tvOS (#2635)

Availability attributes in non-generated files don't hide symbols/code.

reference:
!unknown-pinvoke! AudioUnitExtensionCopyComponentList bound
!unknown-pinvoke! AudioUnitExtensionSetComponentList bound

* [tests] Make sure tvOS tests don't use the (unexisting) API

* [tests] Add all test project variations to tests-mac.sln (#2579)

* [xharness] Make sure generated mac projects have different project guids.

* [introspection] Change the project guid so that it doesn't match the dontlink-mac project guid.

* [tests] Add all test project variations to tests-mac.sln.

* [xharness] Fix else condition.

* [FileProvider] Adds missing NSFileProviderPage constants, fixes bug 59297. (#2646)

https://bugzilla.xamarin.com/show_bug.cgi?id=59297

Adds NSFileProviderInitialPageSortedByName and NSFileProviderInitialPageSortedByDate
NSData constants

* [Xcode9] Remove NSFileProviderMessage and NSFileProviderMessageInterface (#2647)

APIs were removed in beta 2

* [Foundation/UIKit] Provide LoadObject[s] methods that return the expected type in the callback. Fixes #59049. (#2638)

The callback for these LoadObject[s] methods take an INSItemProviderReading
parameter. This tells our runtime that we must provide an instance of a
managed object that implements this interface (but nothing else), so we create
a `NSItemProviderReadingWrapper` instance, which complies with the API (since
the wrapper type implements the corresponding interface).

Unfortunately these methods are supposed to return an instance of the passed-
in type, so in order to comply with this soft (documentation-only)
requirement, provide a wrapper method that creates instances of the right
types.

https://bugzilla.xamarin.com/show_bug.cgi?id=59049

* [arkit] Ignore deprecated selectors (#2645)

* [FileProvider] Adds missing protocol and keys from audit (#2652)

```
!missing-protocol! NSFileProviderServiceSource not bound
!missing-field! NSFileProviderErrorCollidingItemKey not bound
!missing-field! NSFileProviderErrorNonExistentItemIdentifierKey not bound
!missing-field! NSFileProviderFavoriteRankUnranked not bound
```

Also adds `NSXpcListenerEndpoint` to foundation, needed by `NSFileProviderServiceSource` protocol.

* [tests][xtro] Workaround xtro runner dupe entry exception and update data files (#2654)

* [AVFoundation] Rename field to match others. (#2657)

* [homekit] Audit (xtro) fixes (#2653)


- HMCharacteristicEvent conforms to NSMutableCopying on iOS11
  which makes it 64 bits only (so adjust intro tests)

- Ignore extra setters on HMMutablePresenceEvent, rdar 33883958

!missing-selector! HMMutablePresenceEvent::setPresenceEventType: not bound
!missing-selector! HMMutablePresenceEvent::setPresenceUserType: not bound

* [xtro] Add missing pinvoke to pending (#2662)

- Bug 59422: [uikit] Missing UIContentSizeCategoryCompareToCategory & UIContentSizeCategoryIsAccessibilityCategory
(https://bugzilla.xamarin.com/show_bug.cgi?id=59422)

* Merge latest d15-3 fixes into xcode9 (#2660)

* [msbuild] Re-added wildcard (*) expandsion for application-identifier in Entitlements.plist (#2186)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57119

* Bump mono (#2213)

* Framework tests were still binding non-linked Simple class which errors now (#2216) (#2218)

- Improve Makefile to rebuild when projects build with errors

* Bump mono to get cecil fix for bug #56808. (#2222)

https://bugzilla.xamarin.com/show_bug.cgi?id=56808

* [msbuild] Use @(ReferencePath) instead of @(ResolvedFiles) (#2188) (#2214)

This allows things to work on both xbuild and msbuild.

In xbuild, both lists are exactly the same and on msbuild,
only @(ReferencePath) exists.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55147

* NSActivityOptions.IdleDisplaySleepDisabled had wrong value (#2232) (#2239)

This was due to an integer overflow.  The original value was based on Int32
1 << 40 == 256

The correct value should be based on a UInt64.
1UL << 40 == 1099511627776

* [tests] Fix bug 57699 - [iOS]InternalsTest failure (Linkall) tests on device (#2243)

Strip native debugging symbols should not be checked for debug builds

* Bump mono to get fix for bug #57780.

https://bugzilla.xamarin.com/show_bug.cgi?id=57780

* Update .gitmodules

Change branch to d15-3 branch of mono

* Bump maccore to get fix for bug #55064.

https://bugzilla.xamarin.com/show_bug.cgi?id=55064

* [mono] Bump mono to get the head of cecil/mono-2017-04 and fix IsComObject #57919

Also fix #58789 [1], the typo in tools/mtouch/Tuning.cs showing in MT0000 errors
instead MT2102. That's already in master and d15-4

mono bump includes:

[2] commit 2a6502cee0df9de5198eafe7c8b5f6ac25106f34 (HEAD -> d15-3, origin/d15-3)
Merge: 02457c20fcf 5e05cafc6f1
Author: Luis Aguilera <luis.aguilera@xamarin.com>
Date:   Fri Aug 18 10:04:06 2017 -0400

    Merge pull request #5401 from marek-safar/com

    [Marshal.IsComObject] Make this predicate return false instead of thr…

[3] commit 02457c20fcf57c0610e844d638eb1da82b5d1eb0
Merge: da80840ea55 73fd9a1b82e
Author: Luis Aguilera <luis.aguilera@xamarin.com>
Date:   Fri Aug 18 09:59:06 2017 -0400

    Merge pull request #5400 from spouliot/bump-cecil-58834-d15-3

    [cecil] Bump to the head of the mono-2017-04 branch and pick the fix for bug #58834

References
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=58789
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=57919
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=58834

* [mtouch] Put 'mono_profiler_startup_log' in the symbol list. Fixes #58778. (#2501)

We need the 'mono_profiler_startup_log' symbol when profiling is enabled, so
make sure to add the symbol to the correct list of symbols we need.

Previously we were passing `-u _mono_profiler_startup_log` to clang directly,
which is fine, but not complete, since it does not write the symbol to the
symbollist file (--symbollist=file), which means it wouldn't be preserved when
the MSBuild tasks strip the executable.

https://bugzilla.xamarin.com/show_bug.cgi?id=58778

* Bump versions for SR3

https://trello.com/c/EVze08ei

* Bump mono to include HttpClientHandler fix #44027

https://trello.com/c/jYFXadH8/8-systemnethttp-close-request-stream-when-httpclienthandler
https://bugzilla.xamarin.com/show_bug.cgi?id=44027

* [FileProvider] Add missing API and turn NSString to string (#2663)

Turned NSString to string in order to match exisiting API.

* [uikit] Add UIPasteConfigurationSupporting and UITextPasteConfigurationSupporting (#2649)


- Fixes bug #59363: Missing UIPasteConfigurationSupporting, UITextPasteConfigurationSupporting, UITextDraggable and UITextDroppable on a couple of types
(https://bugzilla.xamarin.com/show_bug.cgi?id=59363)

* [uikit] Remove 129 types in UIPasteConfigurationSupporting case

* [scenekit] Audit (xtro) fixes (#2648)

This looks like an Apple breaking change (since `SCNAnimation` is new)
but we now have:

> typedef void (^SCNAnimationEventBlock)(id<SCNAnimation> animation, id animatedObject, BOOL playingBackward);

bound as

> delegate void SCNAnimationEventHandler (CAAnimation animation, NSObject animatedObject, bool playingBackward);

and `CAAnimation` conforms to `SCNAnimation` but *only* the later is
available on watchOS. The delegate is only updated (since it's new)
on our watchOS profile.

xtro references:

(watchos)
!unknown-protocol! SCNCameraControlConfiguration bound

(tvos/watchos)
!missing-selector! SCNAnimation::animationEvents not bound
!missing-selector! SCNAnimation::setAnimationEvents: not bound
!missing-selector! SCNConstraint::isEnabled not bound
!missing-selector! SCNConstraint::setEnabled: not bound

!missing-field! SCNSceneSourceConvertToYUpKey not bound
!missing-field! SCNSceneSourceConvertUnitsToMetersKey not bound

(ios/tvos)
!missing-protocol-conformance! SCNNode should conform to UIFocusItem

* Bump maccore post 15.3 merge (#2665)

* Bump Xcode 9 to GM (#2667)

* Force build (on wrench)

* [avfoundation] Fix breaking changes (apidiff) (#2664)

* [TVServices] Update to Xcode 9 GM (#2675)

* [GameController] Update to Xcode 9 GM (#2673)

* [LocalAuthentication] Update to Xcode 9 GM (#2671)

* [LocalAuthentication] Update to Xcode 9 GM

* Remove availability from BiometryNotAvailable, BiometryNotEnrolled and BiometryLockout

* [AVFoundation] Add missing types AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer (#2659)

* [AVFoundation] Add missing types AVSampleBufferAudioRenderer and
AVSampleBufferRenderSynchronizer

Some of the new added types were already present BUT under a #if
MONOMAC, they had to be moved.

* [AVFoundation] Set the wrongly added API to be obsolete and ensure it returns logical values. (#2650)

* [xtro] The right platform for macOS is 'macos', not 'osx'. (#2677)

The platform name is used to filter availability attributes, and if we use the
wrong platform, we'll incorrectly skip all availability attributes.

The net result in unclassified entries: https://gist.github.com/rolfbjarne/a4474bc2a40c49a85cad495b51bb514f

* Various Xcode 9 API improvements and also fixes bug 59433 (#2676)

https://bugzilla.xamarin.com/show_bug.cgi?id=59433

While fixing bug 59433 I noticed some additional issues outlined below:

AVDepthData:

* Renamed **non** static `Create` methods because `Create` only
  makes sense with the **Static** method in this context. Also
  by renaming the methods we are now closer to the names that
  swift uses.

* Kept descriptive method names in favor of self-documenting code.
  `Convert`, `Apply` and `Replace` do not fully give us the intent
  of the method.

* Added a convenience `Create` static method that takes a
  `CGImageAuxiliaryDataInfo`.

* AvailableDepthDataTypes is now an array of `CVPixelFormatType` instead
  of a `NSNumber` array (The aactual fix for bug 59433).

ImageIO:

* Refactored `CGImageAuxiliaryDataInfo` to be a `StrongDictionary` in order
  to avoid most of the manual code and also to avoid reimplementing
  the `ToDictionary` method (which contained a subtle bug).

* Adjusted code to reflect the above change.

* Added missing `.ctor (IntPtr, bool)` to `CGImageMetadata` so the class
  is able to be created by our `Runtime.Get*`.

* Simplified `CopyAuxiliaryDataInfo` method by using `CGImageAuxiliaryDataInfo`
  as a `DictionaryContainer`.

Tests:

* Added `xamarinmonkey.heic` which is an image that contains depth data needed
  to test above changes.

* Adds `AVDepthDataTests` that touches most of the changes listed here.

* Tweak the Simd-compatible matrices and vectors (#2668)

* Rename them to be OpenTK.NMatrix# (instead of Simd.MatrixFloat#x#).
* Remove the Vector2 and Vector4 variants, we'll use the OpenTK types instead (but we'll keep the NVector3 variant, since it's not identical to the OpenTK version).
* Update the API to match their OpenTK counterparts better:
    * NMatrix2 and NMatrix3 have a 0-based R#C# scheme for their fields.
    * NMatrix4 has a 1-based M## scheme for its fields (i.e. no change).

* [AVFoundation] Use Simd-matrix for API that needs it. (#2679)

This also requires implementing the corresponding matrix (NMatrix4x3).

Fixes this xtro issue:

> !unknown-simd-type-in-signature! OpenTK.Matrix3 AVFoundation.AVCameraCalibrationData::get_GetIntrinsicMatrix(): the native signature has a simd type (matrix_float3x3), while the corresponding managed method is using an incorrect (non-simd) type.

* [xtro] Fix checking availability on categories. (#2682)

When checking for category availability, check if both the current declaration
is a category, and if the current's declaration container is a category.

Otherwise this scenario fails:

* Category method is available.
* Category does not have availability attributes.
* Main class is unavailable.

with this typical code sequence:

```csharp
// don't process methods (or types) that are unavailable for the current platform
if (!decl.IsAvailable () || !(decl.DeclContext as Decl).IsAvailable ())
	return;
```

In which case we'd:

* First check the method (`decl`):
	* It's available, so no further checks is done on the method.

* Then we'd check the method's container (`decl.DeclContext`):
	* The container (the category) does not have availability attributes.
	* Then we'd check if the container's container is a category (it isn't, it's the namespace).

and as such determine that the method is available.

With this change, the second step will become:

* Then we'd check the method's container (`decl.DeclContext`):
	* The container (the category) does not have availability attributes.
	* Then we'd check if the container is a category (it is), and if its main class is available (it isn't).

and as such determine that the method is unavailable.

* Check for attributes on the method's container (no attributes, so we continue).
* Check if the method's

Unclassified diff: https://gist.github.com/rolfbjarne/8fa80962596978a426eadf9b7ba39dc1

* [uikit] Update for Xcode 9 GM (#2670)

* [AVFoundation] Implement AVCapturePhoto. Partially fixes #59388. (#2678)

Fixes:

> common.unclassified:!missing-type! AVCapturePhoto not bound

https://bugzilla.xamarin.com/show_bug.cgi?id=59388

* Use strong dictionaries for AVCapturePhoto.Metadata and AVCapturePhoto.EmbeddedThumbnailPhotoFormat.

* [SIMD] Implement Simd double types (VectorDouble3/MatrixDouble4x4). (#2632)

The following types will be used by ModelIO bindings

* Fix delta to be double

* Rename Simd-compatible matrices and vectors to match our final naming.

This also means removing the new Vector2 and Vector4 variants (but not
Vector3).

* [avfoundation] Remove AVAssetDownloadDelegate.DidLoadTimeRange since it was removed in one of the betas (#2687)

* [foundation] Move NSUrlSessionMultipathServiceType to a file processed by the generator (for the availability attributes) (#2688)

* [arkit] Update for Xcode 9 GM (#2681)

* [Intents] Fix watchOS INCarSeatResolutionResult breaking changes (#2690)

* [Intents] Fix watchOS INCarSeatResolutionResult breaking changes

Type Changed: Intents.INCarSeatResolutionResult

Removed methods:

    public static INCarSeatResolutionResult GetConfirmationRequired (INCarSeat valueToConfirm);
    public static INCarSeatResolutionResult GetSuccess (INCarSeat resolvedValue);

* [avfoundation] Add missing protocol members and deprecations (#2691)

!missing-protocol-member! AVCapturePhotoCaptureDelegate::captureOutput:didFinishProcessingPhoto:error: not found

and the selector removed from PR#2687 was actually replaced with this one

!missing-protocol-member! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: not found

* [tests][xtro] Map some enums, more fix with protocols and update entries (#2692)

* [Tests] Reenable dns tests on the watch. (#2674)

* [arkit] Add ARBlendShapeLocationOptions strong dictionary (#2696)

* [coreimage] Skip not yet bound filters added in Xcode9 (#2698)

Tracked in https://bugzilla.xamarin.com/show_bug.cgi?id=57350

* [Metal] Renamed MTLArgumentDescriptor.ArgumentDescriptor to Create, fixes bug 59498 (#2702)

https://bugzilla.xamarin.com/show_bug.cgi?id=59498

From [argumentDescriptor docs](https://developer.apple.com/documentation/metal/mtlargumentdescriptor/2915746-argumentdescriptor?language=objc)

> Creates an empty argument descriptor.

* [msbuild] Always codesign app bundles if the codesign key is non-null (#2697)

...even if it is a simulator build.

Turns out that starting with Xcode9, sim builds need to be codesigned
for App Groups entitlements to work properly. Interestingly, the
DetectSigningIdentity logic had a comment about needing to codesign
simulator builds for some entitlements to work already starting with
Xcode 8 but apparently the iOS targets did not respect this.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59379

* [Foundation] Add NSProxy stub in order to workaround bug 59247 (#2693)


https://bugzilla.xamarin.com/show_bug.cgi?id=59247

We need to have a better solution that removes all what NSProxy does not responds to.
Right now this works because NSObject implements NSObject protocol just like NSProxy, but
NSProxy responds to far less selectors hence doing it internal so it is not a breaking change
when we provide the correct fix.

* Keep NSProxy around and avoid XML linker description

We need to keep NSProxy (avoid linking it) if WKNavigationDelegate or IWKNavigationDelegate
is used. We know WKWebView will be there and can hold a reference to it.

* [Xcode 9] Update Metal for GM (#2689)

* [iosurface] IOSurface is not usable before iOS/tvOS 11. Fixes #59201 (#2706)

Apple rejects apps that links with the previously private IOSurface.framework.
We were not sure about this [1] and had it disabled (this is removed).

However another bug stopped our adjustment logic [2] from being executed. This
is needed since `clang` picks up the private framework if it does not find the
public one (even when asking for a weak framework),

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=59201
[2] Added a while ago for JavascriptCore

* Bump maccore to point to commit with the docs fix. (#2703)

* Bump XI to 11.0.x (and XM to 3.99.9.x) (#2684)

* fix typo
2017-09-15 17:53:16 -04:00
Sebastien Pouliot 05eb96d0a7 Merge branch 'xcode9' into xcode9-master-merge 2017-09-15 11:05:30 -04:00
Jeffrey Stedfast 1e8c5dec19 [msbuild] Always codesign app bundles if the codesign key is non-null (#2697)
...even if it is a simulator build.

Turns out that starting with Xcode9, sim builds need to be codesigned
for App Groups entitlements to work properly. Interestingly, the
DetectSigningIdentity logic had a comment about needing to codesign
simulator builds for some entitlements to work already starting with
Xcode 8 but apparently the iOS targets did not respect this.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59379
2017-09-14 16:26:49 -04:00
Ankit Jain 30f75f722a [msbuild][mac][ios] Fix referencing netstandard projects (#2643)
Building a XI or XM (Modern) project that references a netstandard 2.0
project with msbuild fails because of a missing reference to
`netstandard.dll`.

AppDelegate.cs(21,52): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

The reason is that XI and XM (Modern) projects have
`$(TargetFrameworkIdentifier) != .NETFramework`, so targets from
`Microsoft.NET.Build.Extensions` which provide ns2.0 support don't get
imported. `ImplicitlyExpandNETStandardFacades` in particular, which
would have added a reference to `netstandard.dll`.

`netstandard.dll` gets included as part of the facades expanded by
`ImplicitlyExpandDesignTimeFacades`, but this gets skipped if the
project does not have a `System.Runtime` dependent reference.

Instead, we want to expand the facades if any reference depends on
`System.Runtime` OR `netstandard`. And for that we scan all the
references for a `netstandard` dependency using the
`GetDependsOnNETStandard` task.

Partially fixes bxc #58504 .
2017-09-13 10:42:46 -05:00
Ankit Jain 47713d4e86 [msbuild][mac] Fix references netstandard libs from XM/Full (#2656)
This is to handle the case of XM/Full project referencing a netstandard project.

For XM/Full, $(TargetFrameworkDirectory) is `lib/mono/4.5` which has
`netstandard.dll`.  This causes ImplicitlyExpandNETStandardFacades to
skip expanding assuming that when ImplicitlyExpandDesignTimeFacades
expands facades, `netstandard.dll` would also get referenced.

But if the XM project does NOT have any System.Runtime facades, then
ImplicitlyExpandDesignTimeFacades will not expand the facades and so we
end up with no `netstandard.dll` reference!

With `$(NETStandardInbox) == false`,
`ImplicitlyExpandNETStandardFacades` behaves as if `netstandard.dll` was
not available in the framework directories and will expand the facades
if required.

Partially fixes bxc #58504 .
2017-09-13 10:42:36 -05:00
Ankit Jain 866c65468d [msbuild][mac] Fix regression in facade paths for Full/Modern projects (#2655)
Regression from:
----------------
commit e5d012c5b8
Author: Chris Hamons <chris.hamons@xamarin.com>
Date:   Mon Aug 14 13:17:10 2017 -0500

[macos] System mono should resolve non-XM libraries from system (#2480)
----------------

The way this manifests is that for (eg.) a `TargetFrameworkName=Full` project,
after the `FixTargetFrameworkDirectory`(X.M.Common.targets) target we end up with
`$(TargetFrameworkDirectory)` having value of:

    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5
    /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/4.6.1-api/Facades/

.. and the second path is incorrect. It should have been:

    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5/Facades

This path fixup is done by `FixDesignTimeFacades` (X.M.msbuild.targets)
target, but this target is running *after*
`FixTargetFrameworkDirectory`, so it doesn't see the fixed facade path!

Both `FixTargetFrameworkDirectory` and `FixDesignTimeFacades` have
`AfterTargets="GetReferenceAssemblyPaths`. But since
`FixTargetFrameworkDirectory` is defined before the
`Xamarin.Mac.msbuild.targets` import, so it gets executed before
`FixDesignTimeFacades`.
2017-09-13 10:42:32 -05:00
Ankit Jain 5b8c685308 [msbuild][mac][ios] Fix referencing netstandard projects (#2643)
Building a XI or XM (Modern) project that references a netstandard 2.0
project with msbuild fails because of a missing reference to
`netstandard.dll`.

AppDelegate.cs(21,52): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

The reason is that XI and XM (Modern) projects have
`$(TargetFrameworkIdentifier) != .NETFramework`, so targets from
`Microsoft.NET.Build.Extensions` which provide ns2.0 support don't get
imported. `ImplicitlyExpandNETStandardFacades` in particular, which
would have added a reference to `netstandard.dll`.

`netstandard.dll` gets included as part of the facades expanded by
`ImplicitlyExpandDesignTimeFacades`, but this gets skipped if the
project does not have a `System.Runtime` dependent reference.

Instead, we want to expand the facades if any reference depends on
`System.Runtime` OR `netstandard`. And for that we scan all the
references for a `netstandard` dependency using the
`GetDependsOnNETStandard` task.

Partially fixes bxc #58504 .
2017-09-13 10:39:57 -05:00
Ankit Jain d7a27682ed [msbuild][mac] Fix references netstandard libs from XM/Full (#2656)
This is to handle the case of XM/Full project referencing a netstandard project.

For XM/Full, $(TargetFrameworkDirectory) is `lib/mono/4.5` which has
`netstandard.dll`.  This causes ImplicitlyExpandNETStandardFacades to
skip expanding assuming that when ImplicitlyExpandDesignTimeFacades
expands facades, `netstandard.dll` would also get referenced.

But if the XM project does NOT have any System.Runtime facades, then
ImplicitlyExpandDesignTimeFacades will not expand the facades and so we
end up with no `netstandard.dll` reference!

With `$(NETStandardInbox) == false`,
`ImplicitlyExpandNETStandardFacades` behaves as if `netstandard.dll` was
not available in the framework directories and will expand the facades
if required.

Partially fixes bxc #58504 .
2017-09-13 10:36:53 -05:00
Ankit Jain c7b2d78b4f [msbuild][mac] Fix regression in facade paths for Full/Modern projects (#2655)
Regression from:
----------------
commit e5d012c5b8
Author: Chris Hamons <chris.hamons@xamarin.com>
Date:   Mon Aug 14 13:17:10 2017 -0500

[macos] System mono should resolve non-XM libraries from system (#2480)
----------------

The way this manifests is that for (eg.) a `TargetFrameworkName=Full` project,
after the `FixTargetFrameworkDirectory`(X.M.Common.targets) target we end up with
`$(TargetFrameworkDirectory)` having value of:

    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5
    /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/4.6.1-api/Facades/

.. and the second path is incorrect. It should have been:

    /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5/Facades

This path fixup is done by `FixDesignTimeFacades` (X.M.msbuild.targets)
target, but this target is running *after*
`FixTargetFrameworkDirectory`, so it doesn't see the fixed facade path!

Both `FixTargetFrameworkDirectory` and `FixDesignTimeFacades` have
`AfterTargets="GetReferenceAssemblyPaths`. But since
`FixTargetFrameworkDirectory` is defined before the
`Xamarin.Mac.msbuild.targets` import, so it gets executed before
`FixDesignTimeFacades`.
2017-09-13 09:33:33 -04:00
Rolf Bjarne Kvinge a9e7a0d75d [msbuild] Adjust verbosity, and set default verbosity level. (#2641)
The MtouchVerbosity value is set when building from VSfM, and in that case the
logic works fine.

However, when building from the command line, or from VS, the default value
for MtouchVerbosity would be '0', which would mean 'Quiet', which is not what
we want the default verbosity to be.

So set the default MtouchVerbosity value to '2' (Normal verbosity), and at the
same time adjust the values passed to mtouch so that 'Normal' actually means
the default (neither quiet nor verbose).
2017-09-12 10:04:41 +02:00
Emanuel Fernandez Dell'Oca d824d85360 [msbuild] Avoid running ObjCBinding tasks on VS design-time builds (#2587)
These targets were failing to build on design-time builds for mostly 2 reasons:
- When loading the project VS is not connected to the Mac, which is required for binding projects.
- Since a reduce amount of targets are ran, the ReferencePath list is empty and makes _GeneratedSourcesFileList fail

Anyway, we shouldn't run targets that we don't need on a design-time build to avoid impacting on its performance

Why these targets were being executed on design-time builds? It's a side effect of adding them to CompileDependsOn.

Reference to design-time builds: https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#what-is-a-design-time-build

Fixes bug 387900 - Referenced component could not be found for Binding Library projects
https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/387900
2017-09-07 16:31:43 -04:00
Ankit Jain 6ac6efb4ad [mac][msbuild] Opt-in to filtering out denied assemblies (#2482)
PR for adding support for the filtering in msbuild:
	https://github.com/mono/msbuild/pull/23
2017-08-28 15:58:45 -04:00
Emanuel 4e0c5456cc [bug] Use Identity instead of FullPath on _CompressObjCBindingNativeFrameworkResources target (#2499)
Using the FullPath property breaks the build from Windows, since the metadata will contain a Windows path.

Partial fix for Bug #51759 - Getting build error for iOS sample 'Simpleapp-with-framework'

https://bugzilla.xamarin.com/show_bug.cgi?id=51759
2017-08-17 08:56:08 -04:00
Emanuel 35e1985350 [bug] Use Identity instead of FullPath on _CompressObjCBindingNativeFrameworkResources target (#2498)
Using the FullPath property breaks the build from Windows, since the metadata will contain a Windows path.

Partial fix for Bug #51759 - Getting build error for iOS sample 'Simpleapp-with-framework'

https://bugzilla.xamarin.com/show_bug.cgi?id=51759
2017-08-16 16:26:32 -04:00
Chris Hamons 58a38860d7 [macos] System mono should resolve non-XM libraries from system (#2480) (#2494)
- https://bugzilla.xamarin.com/show_bug.cgi?id=58703
- Was broken on msbuild but undetected due to https://bugzilla.xamarin.com/show_bug.cgi?id=53164
- Unified45Build_CompileToNativeOutput was broken in a recent commit bf53e6204d0950acd5f8efcce8732bd8d8
- This was not caught as the mmp tests are not run by default
- The test was bad/wrong, and checking msbuild not mmp ouput anyway, so fixing.
2017-08-15 11:58:28 -05:00
Chris Hamons e5d012c5b8 [macos] System mono should resolve non-XM libraries from system (#2480)
- https://bugzilla.xamarin.com/show_bug.cgi?id=58703
- Was broken on msbuild but undetected due to https://bugzilla.xamarin.com/show_bug.cgi?id=53164
- Unified45Build_CompileToNativeOutput was broken in a recent commit bf53e6204d0950acd5f8efcce8732bd8d8
- This was not caught as the mmp tests are not run by default
- The test was bad/wrong, and checking msbuild not mmp ouput anyway, so fixing.
2017-08-14 13:17:10 -05:00
joj b7c74fba16 Merge pull request #2430 from joj/master
Avoid duplicating define constants if they exist
2017-08-10 16:40:14 -03:00
joj 71f0c1ca56 Workaround Conditions in xbuild
This is part of PR 2430: avoid duplicating degine constants if they exist. This commit splits the condition and definition of the properties in two, because xbuild doesn't support the regex part in a condition. msbuild does, but we need to support both.
2017-08-10 14:20:12 -03:00
Jeffrey Stedfast 361f3abf53 [msbuild] Removed Task name/property logging that MSBuild does for us now (#2426) 2017-08-10 09:00:18 -04:00
Rolf Bjarne Kvinge 8b37b09ac6 [msbuild][mac] Fix #58479: Assign project configurations for IDE case (#2396) (#2413)
https://bugzilla.xamarin.com/show_bug.cgi?id=58479

_AssignAppExtensionConfiguration assigns project configuration from
`$(CurrentSolutionConfigurationContents)`, using the
`AssignProjectConfiguration` task, which is set if
`$(BuildingSolutionFile)` or `$(BuildingVisualStudio)` is true. We check
only for the former. It would be simpler to just check for ..

	`$(CurrentSolutionConfigurationContents) != ''`

.. like the iOS targets. This mapping from this task is used when
invoking `GetBundleTargetPath` on the extension project:

	Properties="%(_AppExtensionReferenceWithConfigurationExistent.SetConfiguration); %(_AppExtensionReferenceWithConfigurationExistent.SetPlatform)"

Details:

This failed for a project that had a reference to an app extension
project, with VSMac/msbuild. The app extension project was being built
with `Configuration==Debug` and `Platform==x86` for which the project
does not define any properties (like `$(OutputPath)`).

When the main project is built, we invoke `GetBundleTargetPath` on
the extension project, which in this case, has a different
config+platform mapping than the one for the referencing project. But
since the earlier `AssignProjectConfiguration` was skipped due to the
incorrect condition, `GetBundleTargetPath` is invoked with no
config+platform, thus falling back to extension project's defaults.

Note: The referencing project was being built with Debug|x86 and the
referenced project was expected to be built with Debug|AnyCPU .

This project:

- VSMac/xbuild - Works
	- This happens to work because the default from the extension
	  project is Debug|AnyCPU, so even though
	  `AssignProjectConfiguration` didn't set those properties, it
	  builds just fine.

- command line xbuild/msbuild - works!
	- `AssignProjectConfiguration` works because this time the
	  condition `$(BuildingSolutionFile) == 'true'` is True.

- VSMac/msbuild - fails
	- In this case, the default case does not work because in VSMac,
	  we use `SetGlobalProperty` to set config+platform properties
	  when starting the build for the referencing project.

	- And when the referencing project builds the referenced project
	  (via `GetBundleTargetPath`), it is built with config+platform
	  global properties set, and thus defaults from the referenced
	  don't get picked up!

	  	<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

	- With the `AssignProjectConfiguration` fix, we set the
	  properties via the `MSBuild` task, so it works.
	  But this needs to be fixed in VSMac anyway.
2017-08-03 16:04:44 -05:00
joj ba4e3fba26 Made replacement more resilient
The previous change had the fault of considering __UNIFIED__ANYTHING__ the same as __UNIFIED__ and if a user set that property, then he would lose the other (pointed out by jstedfast in the PR).
This commit fixes that.
2017-08-03 16:29:27 -03:00
joj ce334f5e42 Avoid duplicating define constants if they exist
In VS the property page for Build will show whatever is in DefineConstants, and then save it. Without this, that means that any time the Build page is saved, it duplicates the constants.
This fixes bug#32765: Bug 32765 - Conditional compilation symbols are duplicated everytime I reload the project or restart visual studio (https://bugzilla.xamarin.com/show_bug.cgi?id=32765)
2017-08-03 15:24:17 -03:00
Ankit Jain f4c64ad8c2 [msbuild][mac] Fix #58479: Assign project configurations for IDE case (#2396)
https://bugzilla.xamarin.com/show_bug.cgi?id=58479

_AssignAppExtensionConfiguration assigns project configuration from
`$(CurrentSolutionConfigurationContents)`, using the
`AssignProjectConfiguration` task, which is set if
`$(BuildingSolutionFile)` or `$(BuildingVisualStudio)` is true. We check
only for the former. It would be simpler to just check for ..

	`$(CurrentSolutionConfigurationContents) != ''`

.. like the iOS targets. This mapping from this task is used when
invoking `GetBundleTargetPath` on the extension project:

	Properties="%(_AppExtensionReferenceWithConfigurationExistent.SetConfiguration); %(_AppExtensionReferenceWithConfigurationExistent.SetPlatform)"

Details:

This failed for a project that had a reference to an app extension
project, with VSMac/msbuild. The app extension project was being built
with `Configuration==Debug` and `Platform==x86` for which the project
does not define any properties (like `$(OutputPath)`).

When the main project is built, we invoke `GetBundleTargetPath` on
the extension project, which in this case, has a different
config+platform mapping than the one for the referencing project. But
since the earlier `AssignProjectConfiguration` was skipped due to the
incorrect condition, `GetBundleTargetPath` is invoked with no
config+platform, thus falling back to extension project's defaults.

Note: The referencing project was being built with Debug|x86 and the
referenced project was expected to be built with Debug|AnyCPU .

This project:

- VSMac/xbuild - Works
	- This happens to work because the default from the extension
	  project is Debug|AnyCPU, so even though
	  `AssignProjectConfiguration` didn't set those properties, it
	  builds just fine.

- command line xbuild/msbuild - works!
	- `AssignProjectConfiguration` works because this time the
	  condition `$(BuildingSolutionFile) == 'true'` is True.

- VSMac/msbuild - fails
	- In this case, the default case does not work because in VSMac,
	  we use `SetGlobalProperty` to set config+platform properties
	  when starting the build for the referencing project.

	- And when the referencing project builds the referenced project
	  (via `GetBundleTargetPath`), it is built with config+platform
	  global properties set, and thus defaults from the referenced
	  don't get picked up!

	  	<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

	- With the `AssignProjectConfiguration` fix, we set the
	  properties via the `MSBuild` task, so it works.
	  But this needs to be fixed in VSMac anyway.
2017-08-03 08:59:42 +02:00
Rolf Bjarne Kvinge 75155be059 [msbuild] Strip frameworks better. (#2305) (#2400)
This can save a significant amount of space when using code-sharing: the PIX
app saved ~11mb in release mode (when stripping).

`man strip` says:

```
For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols).

-x Remove all local symbols (saving only global symbols).
```
2017-08-02 16:06:49 +02:00
Sebastien Pouliot 35765ecc0f Merge d15-3 (#2322)
* [msbuild] Re-added wildcard (*) expandsion for application-identifier in Entitlements.plist (#2186)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57119

* Bump mono (#2213)

* Framework tests were still binding non-linked Simple class which errors now (#2216) (#2218)

- Improve Makefile to rebuild when projects build with errors

* Bump mono to get cecil fix for bug #56808. (#2222)

https://bugzilla.xamarin.com/show_bug.cgi?id=56808

* [msbuild] Use @(ReferencePath) instead of @(ResolvedFiles) (#2188) (#2214)

This allows things to work on both xbuild and msbuild.

In xbuild, both lists are exactly the same and on msbuild,
only @(ReferencePath) exists.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55147

* NSActivityOptions.IdleDisplaySleepDisabled had wrong value (#2232) (#2239)

This was due to an integer overflow.  The original value was based on Int32
1 << 40 == 256

The correct value should be based on a UInt64.
1UL << 40 == 1099511627776

* [tests] Fix bug 57699 - [iOS]InternalsTest failure (Linkall) tests on device (#2243)

Strip native debugging symbols should not be checked for debug builds

* Bump mono to get fix for bug #57780.

https://bugzilla.xamarin.com/show_bug.cgi?id=57780
2017-07-13 08:16:25 -04:00
Rolf Bjarne Kvinge 981af59058 [mtouch] Don't allow building for 32-bit when deployment target is >= 11. Fixes #57966. (#2303)
* [mtouch] Don't allow building for 32-bit when deployment target is >= 11. Fixes #57966.

Also bump maccore to get an mlaunch error for launching a 32-bit app in a 64-bit-only simulator.

https://bugzilla.xamarin.com/show_bug.cgi?id=57966

* [tests][msbuild] Make sure all Info.plists have deployment targets.

Otherwise we get different behavior (32-bit allowed or not) depending on which
Xcode is used to build.

* [mtouch] Default to 64-bit arch if not specified and targeting iOS 11+.

* [tests] Tweak tests to either specify a deployment target < 11 or not build a 32-bit arch.
2017-07-11 08:54:50 +02:00
Rolf Bjarne Kvinge 76d9e43f53 [msbuild] Strip frameworks better. (#2305)
This can save a significant amount of space when using code-sharing: the PIX
app saved ~11mb in release mode (when stripping).

`man strip` says:

```
For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols).

-x Remove all local symbols (saving only global symbols).
```
2017-07-10 16:23:24 +02:00
Jeffrey Stedfast 6351aef095 [msbuild] Don't define __IOS__ for tvOS binding projects (#2274)
* [msbuild] Don't define __IOS__ for tvOS binding projects

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57764

* minor fixups

* Conditional compilation.
2017-06-30 12:35:48 -04:00
Jeffrey Stedfast 5d6d244d04 [msbuild] Properly generate dSYMs for WatchKit2 appex's (#2215)
* [msbuild] Properly generate dSYMs for WatchKit2 appex's

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=56345

* dSYMs only get generated for iPhone

* Reverted accidental change to mono
2017-06-15 14:03:37 -04:00
Jeffrey Stedfast f010926615 [msbuild] Use @(ReferencePath) instead of @(ResolvedFiles) (#2188)
This allows things to work on both xbuild and msbuild.

In xbuild, both lists are exactly the same and on msbuild,
only @(ReferencePath) exists.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55147
2017-06-12 13:29:45 -05:00
Rolf Bjarne Kvinge 9356b53410 [msbuild] Fix MSBuild tests to build using Xcode 9. (#2201)
Set the min deployment target to 7.0 for a test to make sure ibtool doesn't
complain, and fix the list of expected bundle resources by adding Assets.car
to the list.

Fixes the following failures:

1. Xamarin.iOS.Tasks.TargetTests.BuildExecutable :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

2. Xamarin.iOS.Tasks.TargetTests.BundleResources :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

3. Xamarin.iOS.Tasks.TargetTests.CleanExecutable :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

4. Xamarin.iOS.Tasks.TargetTests.CopyContentToBundle :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

5. Xamarin.iOS.Tasks.TargetTests.Disappearing_Bundle_Resource :   #2

      Expected: True
      But was:  False

6. Xamarin.iOS.Tasks.TargetTests.Disappearing_Content :   #2

      Expected: True
      But was:  False

7. Xamarin.iOS.Tasks.TargetTests.OptimizePngs_DefaultValue :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

8. Xamarin.iOS.Tasks.TargetTests.OptimizePngs_False :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

9. Xamarin.iOS.Tasks.TargetTests.OptimizePngs_True :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

10. Xamarin.iOS.Tasks.TargetTests.RebuildExecutable_NoModifications :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

11. Xamarin.iOS.Tasks.TargetTests.RebuildExecutable_TouchLibraryDll :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2

12. Xamarin.iOS.Tasks.TargetTests.UnpackLibraryResources_ExecutableProject :   #RunTarget-ErrorCount

    	ibtool exited with code 1
    	Compiling IB documents for earlier than iOS 7 is no longer supported.
      Expected: 0
      But was:  2
2017-06-10 04:04:26 -07:00
Jeffrey Stedfast 2f4e81809c [msbuild] Re-added wildcard (*) expandsion for application-identifier… (#2182)
* [msbuild] Re-added wildcard (*) expandsion for application-identifier in Entitlements.plist

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57119

* Fixed unit tests
2017-06-08 14:01:22 -04:00
Jeffrey Stedfast 34cca2e276 [msbuild] Strip debug symbols even if MtouchDebug is true (#2160)
* [msbuild] Strip debug symbols even if MtouchDebug is true

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57063

* Strip frameworks as well
2017-06-02 11:00:11 -04:00
Jeffrey Stedfast 36d5bc3271 [msbuild] Remove the dSYMs dir when re-cloning the *.appex so it triggers a new strip (#2152)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=56483
2017-06-01 17:25:53 +02:00
Chris Hamons 0be72f3c13 [macos] Fix target framework detection issues in mmp (#2096)
- Also detect mismatches between referenced XM.dll and target framework selected
2017-05-30 09:23:28 -05:00
Jeffrey Stedfast 7facec2a70 [msbuild] Added EnableOnDemandResources option (#2133)
* [msbuild] Added EnableOnDemandResources option

Disabling this option causes the ACTool task to pass
--enable-on-demand-resources NO (instead of YES) to actool.

It will also cause the ResourceTags property on BundleResource
and InterfaceBuilder items to be ignored.

* Fixed unit tests
2017-05-26 14:52:07 -04:00
Rolf Bjarne Kvinge 264cce0343 [tests][msbuild] Fix compiler warning. (#2118)
Fixes:

TestHelpers/TestBase.cs(279,53): warning CS0642: Possible mistaken empty statement
2017-05-23 19:56:57 +02:00
Alex Soto e8aa3db9cb [msbuild] Remove BTouchReferencePath in order to fix bug 56317 (#2105)
https://bugzilla.xamarin.com/show_bug.cgi?id=56317

BTouchReferencePath scans for satellite assemblies and brings
dlls that are not referenced from within the binding project and
this causes compiler error CS1704 when dlls that contain
localized resources and said dlls are named equally.

* [msbuild][tests] Add testcase for bug 23674 to avoid regresions

https://bugzilla.xamarin.com/show_bug.cgi?id=23674

* [msbuild][tests] Add testcase for bug 56317

https://bugzilla.xamarin.com/show_bug.cgi?id=56317
2017-05-19 15:34:05 -04:00
Sebastien Pouliot 845f365c91 [mmp] Add support for linking only the platform (Xamarin.Mac.dll) assembly on the full profile (#1990)
Replace https://github.com/xamarin/xamarin-macios/pull/1973 expect that
the test parts are still needed.

* Add XM SDK + LinkSkip test

* [macos] Add platform linking support to msbuild

* [macos] Add full SDK test

* [macios] Diable classic from using linkplatform

- Extended test infrastructure change to allow classic projects that include bundling
- Setting linkplatform in MonoBundlingExtraArgs since we don't even read project setting LinkMode - Platform for classic
2017-05-16 18:05:26 -04:00
Chris Hamons 30cf1fd626 [macos] Fix Multiple Native References (#2073)
- https://bugzilla.xamarin.com/show_bug.cgi?id=56098
- "%(NativeReference) was invoking mmp task multiple times incorrectly, move to what XI is doing
2017-05-16 09:59:55 -05:00
Vincent Dondain 471d4b8a94 [msbuild] Pass -float32 to aot-options if UseFloat32 = false (#2061)
The runtime team is going to change the default for the float 32 option.
Therefore, to avoid breaking users who are currently **not** using this option,
we need to force the use of `-float32`.

* Add new test to cover UseFloat32 = false
2017-05-03 16:34:46 -04:00
Jeffrey Stedfast 1429fe6955 [msbuild] Remove stale CodeSignatures when cloning appex's into parent app bundle (#2057)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55676
2017-05-01 14:11:21 -04:00
Rolf Bjarne Kvinge 1eb6c335a6 [mtouch] Disable incremental builds for the simulator. Fixes #55712. (#2054)
It does not make sense to support incremental builds for the simulator (since
no AOT compilation is done), it just makes the test matrix more complicated.

So simplify things by removing support for incremental builds.

We also ignore any (other) --assembly-build-target arguments, because building
to frameworks doesn't make sense either in the simulator.

https://bugzilla.xamarin.com/show_bug.cgi?id=55712
2017-04-28 13:34:37 -04:00
Rolf Bjarne Kvinge e9ce55aac2 [msbuild] Define __MACOS__ for Xamarin.Mac. Fixes #36258. (#2048)
https://bugzilla.xamarin.com/show_bug.cgi?id=36258
2017-04-27 14:40:00 -04:00
Jeffrey Stedfast 46692cdd13 [msbuild] Don't override the OnDemandResourcesUrl if previously set (#1970)
This change allows users to specify a custom URL for hosting their
OnDemand Resources.
2017-04-24 16:31:36 -04:00
Ankit Jain ca7181c6b8 [msbuild] Fix samples build with msbuild (#2035)
CompileSceneKitAssetsTaskBase tries to set `DefiningProjectFullPath`
metadata on a new TaskItem, if it is available on the original one.
But with msbuild, this is a reserved metadata and cannot be set.

If we create the new item based on the original one, then we get the
metadata too. And we also get a `OriginalItemSpec`, which we don't need
and can remove.

This fixes a regression caused by msbuild/XS switching to use the
msbuild implementations of `Microsoft.Build.{Tasks,Utilities}.{v4.0,v12.0}`
assemblies (-> `.Core`) instead of the xbuild ones.

It manifested as:

`error MSB4018: System.ArgumentException: "DefiningProjectFullPath" is a reserved item metadata, and cannot be modified or deleted.`

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55480
      https://bugzilla.xamarin.com/show_bug.cgi?id=55389
2017-04-24 16:17:17 -04:00
Vincent Dondain 9c5f7f8f71 [msbuild] Fix DetectSdkLocationsTaskBase platform check (#2029)
For windows, ideSdkPath was defined twice.
Also the base tasks are being built only on the Mac, VSW get those from the bundle.zip, so the Windows check should be done at runtime.
2017-04-19 16:41:34 -04:00
Jeffrey Stedfast d32cae66b7 [msbuild] Fixed msbuild logic to properly codesign watchos2 intents extensions (#2024)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55316
2017-04-19 08:19:29 -04:00
Vincent Dondain 47129dae70 [msbuild] Improve DetectSdkLocationsTaskBase error log (#2012)
First: only run `EnsureSdkPath` if `EnsureAppleSdkRoot` passed.
    Both are based on similar install checks, `SdkIsInstalled` (used for `SdkIsInstalled`) is empty
    if `IsInstalled` (used by `EnsureAppleSdkRoot`) is false.
    This avoid having 2 error messages when only 1 at a time is needed.

Second: improved `EnsureAppleSdkRoot` error message mentioning the wrong Xcode developer path (which triggered the error)
    as well as the exact way to fix it.
2017-04-18 16:51:43 -04:00
Jeffrey Stedfast f6ebca8ca9 [msbuild] Avoid Dictionary clashes in IBToolTask's mapping dictionary (#1981)
* [msbuild] Avoid Dictionary clashes in IBToolTask's mapping dictionary

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=54914

* Added unit tests

* Fixed tabs vs spaces indent
2017-04-18 09:01:29 -04:00
Jeffrey Stedfast 0fe6c076d5 [msbuild] Don't force mcs for building Xamarin.Mac apps (#1994) 2017-04-12 16:01:35 -04:00
Jeffrey Stedfast 52aba009f1 [msbuild] Enable device-specific builds for appex's (#1974) 2017-04-11 08:17:54 +02:00
Rolf Bjarne Kvinge fe5c62410d [msbuild] Fix running bgen for Xamarin.Mac. (#1977)
bgen must be executed with the system mono, not bmac-mobile-mono, and without
the MONO_PATH variable set.
2017-04-10 16:34:49 +02:00
Jeffrey Stedfast 3b4c6e720e [msbuild] Add support for passing extra args to btouch (#1969)
* [msbuild] Add support for passing extra args to btouch

Partial fix for https://bugzilla.xamarin.com/show_bug.cgi?id=51753

* [msbuild] Update the Mac ObjCBinding targets as well
2017-04-10 08:14:42 +02:00
Sebastien Pouliot 7d930369af Revert "[msbuild] Don't override the OnDemandResourcesUrl if previously set (#1963)"
This reverts commit 46e8bd00ef.
2017-04-06 14:43:16 -05:00
Jeffrey Stedfast 46e8bd00ef [msbuild] Don't override the OnDemandResourcesUrl if previously set (#1963)
This change allows users to specify a custom URL for hosting their
OnDemand Resources.
2017-04-06 12:57:32 -04:00
Rolf Bjarne Kvinge b568b2541e [builds] Improve mono/llvm dependencies. (#1948)
* [builds] Improve mono/llvm dependencies.

* Create a list of all the files in the mono and llvm repositories, and save
  these lists as a Make variable (in a generated Makefile - .deps.*.mk). We
  don't list _all_ the files in each repository, because there are quite a few
  (55k for mono), and Make measurably takes a while to check all of them, so
  try to limit it to a sane subset, without risking missing changes to files
  that actually matters.

* Always create stamp files when we're done with mono builds.

* Modify the mono/llvm builds to depend on all the files in their
  repositories.

* Explicitly list the corresponding .stamp-build-* files as dependencies for
  various files that are produced by the mono builds, so that make knows how
  to build these files.

* Rewrite the *-facade-check targets to depend on the corresponding
  *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile
  to execute the facade checks.

  It now takes a little while (less than a second on my machine, which is
  fine) for make to list all dependencies and get their timestamps, but if
  executing multiple submakes this adds up to a multi-second timewaste.

  So avoid the timewaste by not doing submakes, but instead use dependencies
  to enforce the required target execution ordering.

* Don't depend on nicely named intermediate targets, since won't prevent
  rebuilds:

      build-cross64: setup-cross64

  Since the `setup-cross64` file doesn't exist, `build-cross64` will always
  execute. Instead depend on the stamp file:

      build-cross64: .stamp-configure-cross64

  And now `build-cross64` will only rebuild if needed.

* Don't try to list all intermediate files as .SECONDARY dependencies, instead
  list none at all, which works as if all files were listed as dependencies.

* Some targets had to move later in the file, since variables used in dependencies:

       foo: $(VARIABLE)

  must be defined before that point in the file, as opposed to variables used in recipes:

       foo:
           $(MAKE) $(VARIABLE)

  can be defined anywhere in the Makefile.

* Simplify the targets that sign assemblies significantly.

There are a few end results:

* It's now possible to do `make install`, without doing `make all` first. This
  might seem weird, but that also ensures the more common `make all install`
  works properly.

* Remakes (without any mono/llvm changes) in build/ are much faster, because
  we now won't recurse into every mono build:

      $ time make all -C builds/ -j8
      [...]
      real  0m1.873s

  This even means that we might be able to make it a habit to remake in the
  root directory, which doesn't take forever now:

      $ time make all -j8
      [...]
      real  0m4.521s

  Unfortunately adding `make install` to the mix still does some useless
  stuff, and it ends up taking ~30 seconds to complete a full build:

      $ time make all install -j8
      [...]
      real  0m32.542s

* [msbuild] Don't verify the xml syntax of targets files unless the files change.

* [build] Don't depend on installed files.

Don't depend on installed files, because that causes a rebuild when installing
to a different directory (i.e. package creation).

* Bump maccore to get build improvements.

Rebuilds are now very fast:

    $ make all install -j8
    $ time make all install -j8
    real	0m5.735s

Less than 6s to figure out that nothing needs to be done.

And strangely flushing the disk cache doesn't make it much slower:

    $ sudo purge
    $ time make all install -j8
    real	0m7.309s

Which probably means that Make mostly reads file metadata, and not actual file
contents (which is good).
2017-03-31 20:23:38 +02:00
Rolf Bjarne Kvinge 2a7e1c5497 [tests][msbuild] Teach tests about new potential location for assemblies. (#1951) 2017-03-31 11:18:50 +02:00
Chris Hamons 1ec3849617 [macos] Fix msbuild issues with shprojj/projitem library (#1936)
- In some build cases this chunk of code:

    <ItemGroup Condition=" '$(NoCompilerStandardLib)' == 'true' and '$(NoStdLib)' != 'true' ">
          <!-- Note that unlike VB, C# does not automatically locate System.dll as a "standard library"
               instead the reference is always passed from the project. Also, for mscorlib.dll
               we need to provide the explicit location in order to maintain the correct behaviour
     -->
        <_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" />
    </ItemGroup>

would trigger and force us to use mscorlib from system mono. That does not work well.
- By setting FrameworkPathOverride, we can get the right mscorlib
- However, that ItemGroup happens outside of a target, so we must move our setting to match for it to take effect
2017-03-30 15:04:21 -05:00
Sebastien Pouliot 0dfcb1f09f Merge branch 'master' into mono-2017-02 2017-03-28 21:31:33 -05:00
Alex Soto efceb473f6 [msbuild] Allow extensions bundle other extensions (#1810)
watchOS 3.2 introduced SiriKit extension that must be bundled
inside the Watch App Extension (yep a extension inside another extension).

So the _ResolveAppExtensionReferences and _CopyAppExtensionsToBundle should
now be run on extension projects too.
2017-03-28 10:08:02 -05:00
Rolf Bjarne Kvinge 26aa29ebd0 Merge remote-tracking branch 'origin/master' into mono-2017-02 2017-03-24 18:09:24 +01:00
Rolf Bjarne Kvinge 7411c033fb Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-24 14:44:54 +01:00
Marek Safar 105ee26509 Merge remote-tracking branch 'origin/master' into mono-2017-02 2017-03-23 23:13:43 +01:00
Jeffrey Stedfast 1a2cdbf26d [msbuild] Implemented GetFiles and GetFullPath tasks to fix the vs build (#1895)
* [msbuild] Implemented GetFiles and GetFullPath tasks to fix the vs build

Hopefully fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53410

* [msbuild] Added GetDirectories task and fixed GetFiles to handle Path not existing
2017-03-23 15:54:46 -04:00
Rolf Bjarne Kvinge 563f395cac Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-23 15:33:38 +01:00
Rolf Bjarne Kvinge 8a29f0deae Merge remote-tracking branch 'origin/master' into generator-ikvm 2017-03-22 14:11:00 +01:00
Jeffrey Stedfast 7db3d4f868 [msbuild] Use stamp files to force container app's _CompileToNative (#1878)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53303
2017-03-17 15:25:53 -04:00
Jeffrey Stedfast 296cb5c3fa [msbuild] Fixed PathUtils.AbsoluteToRelative() logic (#1861)
* [msbuild] Fixed PathUtils.AbsoluteToRelative() logic

Don't require the 'absolute' path argument to be a FullPath.

The code already calls Path.GetFullPath() on the 'absolute'
path anyway.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53176

* Fixed ResolveSymbolicLinks() to return the input path if realpath() fails
2017-03-17 15:25:10 -04:00
Jeffrey Stedfast 694bd212b3 [msbuild] Added logging for all of the overridden MSBuild default tasks (#1829) 2017-03-17 15:24:58 -04:00
Jeffrey Stedfast 1c6565eaf5 [msbuild] ALWAYS log ibtool/actool exitCode != 0 as an error (#1840)
Log this as an error even if the log file does not exist and/or
is parseable.

Previously, it was possible that if the log file didn't exist
or it was perfectly validly formatted, we would never log that
error code and so it's possible that we wouldn't log *any*
error at all (e.g. empty log file).
2017-03-17 15:24:43 -04:00
Jeffrey Stedfast 51fdfa825c [msbuild] Run the _ComputeTargetArchitectures target before cleaning (#1828)
Some of the Clean steps need the _ComputeTargetArchitectures
target to run before they can properly do their thing because
they depend on DeviceSpecific paths.

Also added logic to rm -rf extension *.dSYM and framework *.dSYM
dirs in the container app bin dir (which fails on xbuild due to
a bug in xbuild... yay!)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53007
2017-03-17 15:24:23 -04:00
Jeffrey Stedfast ca6da28e91 [msbuild] Make sure to codesign appex dylibs (#1812)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52745

Added a new CodesignNativeLibraries task that scans for
and then codesigns each *.dylib and *.metallib in the
app bundle (minus those in the PlugIns and Watch dirs).
2017-03-17 15:24:05 -04:00
Jeffrey Stedfast cfb5a1674a [msbuild] sanity check TargetiOSDevice property for conflicts (#1799)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52847

If the device archs do not match the configuration, don't
do a device-specific build.
2017-03-17 15:23:52 -04:00
Jeffrey Stedfast a03458660d [msbuild] Remove an unused enum that causes confusion (#1798) 2017-03-17 15:23:28 -04:00
Jeffrey Stedfast 19345f65a4 [msbuild] Make a build error more clearly worded (#1794)
Related to https://bugzilla.xamarin.com/show_bug.cgi?id=52847
2017-03-17 15:23:13 -04:00
Jeffrey Stedfast e6d037ef5a [msbuild] Ignore .DS_Store files when cloning asset catalogs (#1776)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52851

The problem here is that the .DS_Store file was included in
the .csproj file but did not exist on disk, so when we went
to clone that file into the obj/ dir before running actool
on it, File.Copy() would fail because the file did not
actually exist.

Since these files are worthless anyway, we can safely ignore
them.

Also added logic to verify that files exist before copying
them in order to report a better error than an exception
stack trace.
2017-03-17 15:22:46 -04:00
Jeffrey Stedfast ae047281a3 [msbuild] Index into the correct item array when printing an error message (#1792)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52860

When the ImageAssets contain an item that doesn't live within
a *.xcassets directory, index into ImageAssets[] rather than
items[] which hasn't been populated yet.

Also fixed the tagsList for-loop to use tagsList.Count instead
for correctness (even though tags.Count and tagsList.Count
should always be identical).
2017-03-17 15:19:51 -04:00
Timothy Risi 1f81d9d13f [mmp] Add mmp support for AOT options in XS (#1818) 2017-03-17 09:55:43 -08:00
Jeffrey Stedfast 8b376efa4b [msbuild] Use stamp files to force container app's _CompileToNative (#1878)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53303
2017-03-16 15:32:04 -04:00
Rolf Bjarne Kvinge 65ad42cce0 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-14 19:25:11 +01:00
Rolf Bjarne Kvinge b41307bb7f Merge commit '2272efbb189d457dc6c599cefd875425baad92a5' into framework-sdk 2017-03-14 19:24:07 +01:00
Rolf Bjarne Kvinge a719e1f480 Merge remote-tracking branch 'origin/master' into generator-ikvm 2017-03-14 17:59:45 +01:00
Chris Hamons abf0f4a2d9 [XM] Improve XM msbuild support and add roslyn netstandard test case (#1846)
- Significant changes to target file under msbuild, ImplicitFacade processing in particular
- Tests are disabled due to https://bugzilla.xamarin.com/show_bug.cgi?id=53164 where we can't tests local target files only global
- Requires a mono msbuild with 95ab657a90 for tests to pass
- Until then, this is a workaround:
    sudo cp /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Roslyn/System.Reflection.Metadata.dll /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/
2017-03-14 11:08:04 -05:00
Ankit Jain 18c1f808a1 Xamarin.Mac.FSharp.targets - Fix imports to work correctly with ..
.. MSBuildExtensionsPath* .

`MSBuildExtensionsPath*` supports search paths only if the string
`$(MSBuildExtensionsPath)` (or *32/*64) appear in the `Project`
attribute of the `Import` element. Otherwise the value of the property
or the default value is used. So, restructure to conditionally import
rather than a import using a property with the final path.
2017-03-14 11:54:13 +01:00
Marek Safar 3912019640 More mdb to pdb checks update 2017-03-14 11:54:13 +01:00
Marek Safar 258cbdda4b Adds pdb handling to mtouch 2017-03-14 11:51:08 +01:00
Marek Safar f2d61b67f3 [msbuild] Update few test expected debug symbols 2017-03-14 11:47:06 +01:00
Marek Safar 741fc32f71 [msbuild] Update test to reflect Mono.Dynamic.Interpreter.dll removal 2017-03-14 11:47:06 +01:00
Marek Safar e47eaff8d6 [msbuild] Remove smcs compiler overrides 2017-03-14 11:47:06 +01:00
Marek Safar 16ba9f1452 [build] Update debug symbols to pdb 2017-03-14 11:47:06 +01:00
Rolf Bjarne Kvinge ff9bae7bbc [mtouch] Don't put frameworks in WatchKit 1 extensions. Fixes #53232. (#1864)
The frameworks go into the container app's Frameworks directory.

https://bugzilla.xamarin.com/show_bug.cgi?id=53232
2017-03-13 17:34:27 -05:00
Jeffrey Stedfast 15a97c7f2d [msbuild] Fixed PathUtils.AbsoluteToRelative() logic (#1861)
* [msbuild] Fixed PathUtils.AbsoluteToRelative() logic

Don't require the 'absolute' path argument to be a FullPath.

The code already calls Path.GetFullPath() on the 'absolute'
path anyway.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53176

* Fixed ResolveSymbolicLinks() to return the input path if realpath() fails
2017-03-12 14:51:28 -04:00
Emanuel 982f71da11 [msbuild] Ensure the MainAssembly path is absolute (#1857)
Fixes bug #52758 (https://bugzilla.xamarin.com/show_bug.cgi?id=52758)

For appex the MainAssembly path should be absolute, since mtouch will generate a build-arguments.txt file that then will be used to build the extension in the same mtouch process than the container app. Due to this, if the path stored is relative mtouch won't be able to find the assembly.
2017-03-10 12:41:27 +01:00
Rolf Bjarne Kvinge 449bcd32db [msbuild] Add support for IKVM-based generator. 2017-03-09 12:47:57 +01:00
Jeffrey Stedfast 15fa18eda3 [msbuild] Added logging for all of the overridden MSBuild default tasks (#1829) 2017-03-07 17:40:26 -05:00
Jeffrey Stedfast bfa5a9da56 [msbuild] ALWAYS log ibtool/actool exitCode != 0 as an error (#1840)
Log this as an error even if the log file does not exist and/or
is parseable.

Previously, it was possible that if the log file didn't exist
or it was perfectly validly formatted, we would never log that
error code and so it's possible that we wouldn't log *any*
error at all (e.g. empty log file).
2017-03-07 17:38:25 -05:00
Vincent Dondain 87955d1d6f [msbuild] Fix metal targets for Xcode8 (#1838)
Fixes bug #52982: [iOS]Metal samples fail to build with Xcode8.3
(https://bugzilla.xamarin.com/show_bug.cgi?id=52982)

Basically with Xcode8 Apple stopped using an intermediary step to generate the
default.metallib. This was what our `_ForgeMetal` target was doing, generate a `default.metal-ar`
file which was used as input for `_TemperMetal` and then generate the default.metallib.

Instead with Xcode8 you can just give Shaders.air directly to the metallib tool.

The fix in this commit is made in such a way that it still supports Xcode7.

if !Xcode8 then don't change anything.
if Xcode8+ then have `_ForgedMetal` output equal `@(_SmeltedMetal)` (basically skip the _ForgeMetal target).
2017-03-07 15:30:31 -05:00
Rolf Bjarne Kvinge 77fca2393d [msbuild] Fix error when building Xamarin.Mac binding projects. (#1834)
Xamarin.Mac binding projects would show this error:

> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.ObjcBinding.CSharp.targets: error : Unknown target framework identifier: Xamarin.Mac.

while at the same time not actually failing the build (so nothing broke,
making it harder to notice).

The error is printed in BTouchTaskBase, which was previously only used for
Xamarin.iOS. Now we're using it for both Xamarin.iOS and Xamarin.Mac (in which
case it's subclassed), so make sure to not validate the
TargetFrameworkIdentifier according to only valid TargetFrameworkIdentifiers
for Xamarin.iOS.

This is accomplished by adding a new virtual overload to validate (and get the
right /target-framework argument for the generator), and override that method
in Xamarin.Mac's BTouch subclass.
2017-03-07 19:57:54 +01:00
Rolf Bjarne Kvinge 1e498bce22 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-07 07:38:30 +01:00
Jeffrey Stedfast f205a8cfe6 [msbuild] Run the _ComputeTargetArchitectures target before cleaning (#1828)
Some of the Clean steps need the _ComputeTargetArchitectures
target to run before they can properly do their thing because
they depend on DeviceSpecific paths.

Also added logic to rm -rf extension *.dSYM and framework *.dSYM
dirs in the container app bin dir (which fails on xbuild due to
a bug in xbuild... yay!)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53007
2017-03-07 07:15:14 +01:00
Jeffrey Stedfast dd834eeeb0 [msbuild] Make sure to codesign appex dylibs (#1812)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52745

Added a new CodesignNativeLibraries task that scans for
and then codesigns each *.dylib and *.metallib in the
app bundle (minus those in the PlugIns and Watch dirs).
2017-03-02 13:25:06 -05:00
Jeffrey Stedfast 5ba38492d5 [msbuild] sanity check TargetiOSDevice property for conflicts (#1799)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52847

If the device archs do not match the configuration, don't
do a device-specific build.
2017-03-01 10:22:41 -05:00
Jeffrey Stedfast 1b2d24ed2c [msbuild] Remove an unused enum that causes confusion (#1798) 2017-03-01 10:21:52 -05:00
Jeffrey Stedfast 297fcd8956 [msbuild] Make a build error more clearly worded (#1794)
Related to https://bugzilla.xamarin.com/show_bug.cgi?id=52847
2017-02-28 15:23:45 -05:00
Jeffrey Stedfast 254f336536 [msbuild] Index into the correct item array when printing an error message (#1792)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52860

When the ImageAssets contain an item that doesn't live within
a *.xcassets directory, index into ImageAssets[] rather than
items[] which hasn't been populated yet.

Also fixed the tagsList for-loop to use tagsList.Count instead
for correctness (even though tags.Count and tagsList.Count
should always be identical).
2017-02-28 13:34:32 -05:00
Rolf Bjarne Kvinge 4de9a8c0d6 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-28 10:16:18 +01:00
Jeffrey Stedfast f7d750309b [msbuild] Ignore .DS_Store files when cloning asset catalogs (#1776)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52851

The problem here is that the .DS_Store file was included in
the .csproj file but did not exist on disk, so when we went
to clone that file into the obj/ dir before running actool
on it, File.Copy() would fail because the file did not
actually exist.

Since these files are worthless anyway, we can safely ignore
them.

Also added logic to verify that files exist before copying
them in order to report a better error than an exception
stack trace.
2017-02-27 16:12:23 -05:00
Chris Hamons bf47f0f1e2 Fixes for XM 4.5 and netstandard13 and updated comments (#1758)
- Update comments on XM45.targets file
- Remove unnecessary AssemblySearchPaths hack causing issues using nugets with same name as Facades
- Note: MSBuild with XM 4.5 is still broken for now
2017-02-24 17:45:38 -06:00
Rolf Bjarne Kvinge d212b97b1a Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-21 18:14:29 +01:00
Rolf Bjarne Kvinge 88e0eb5fc8 [generator] Use target framework to determine the platform. (#1690)
This cuts down another group of conditional compilation sections, paving the
way for an IKVM-based generator.

This makes it required to pass --target-framework for to generator executables
(previously only required for Xamarin.Mac/Unified to distinguish between the
different Xamarin.Mac/Unified variants), but it should be invisible to users
since we'll automatically pass the correct --target-framework argument from
the corresponding scripts (btouch/btv/bwatch/bmac) and the MSBuild targets.
This will only break somebody who is executing the managed executables
directly, but nobody should do that in the first place (it's not a supported
scenario).

Generated diff: https://gist.github.com/rolfbjarne/1674be6625632446dba774a305951981
2017-02-17 14:53:58 -05:00
Rolf Bjarne Kvinge 68fe70f317 [tests][msbuild] Enable bitcode for tvOS/Release builds. 2017-02-13 15:42:14 +01:00
Rolf Bjarne Kvinge fcb0d18cc7 [msbuild tests] Make the MyTVServicesExtension project actually work. 2017-02-10 16:39:38 +01:00
Rolf Bjarne Kvinge 23a1bd0a13 [msbuild tests] Make it possible for MyTVApp and MyTVServicesExtension to share code. 2017-02-10 16:39:37 +01:00
Rolf Bjarne Kvinge d725d5fb63 [msbuild] Add the MyTVServicesExtension project to the solution where it's needed. 2017-02-10 16:39:37 +01:00
Rolf Bjarne Kvinge c3c6f5cbeb [msbuild tests] Add more potential directories where assemblies might be. 2017-02-10 16:39:37 +01:00
Rolf Bjarne Kvinge f82a995b21 [msbuild tests] Assemblies do not always end up in the .monotouch-[32|64] directory anymore, so update tests accordingly.
Assemblies will not end up in the .monotouch-[32|64] subdirectory anymore
(unless they must because they're different), which means that it's not easy
to detect if an assembly really ends up in the subdirectory or not.

So modify tests to accept assemblies in either the root bundle directory, or
in the .monotouch-[32|64] subdirectory.
2017-02-10 14:46:31 +01:00
Ankit Jain e3166fbb15 [msbuild][fsharp] Copy .mdb files when building with msbuild (#1641)
Mono's fork of msbuild uses a `$(_DebugFileExt)` property to specify
the debug file extension (.pdb/.mdb) to use. It defaults to .pdb. So,
with XI/XM, .mdb files don't get copied to the output folder.

We also add a `$(FscDebugFileExt)` property, which allows our default of
`.mdb` to be overridden.

But the `$(_DebugFileExt)` support  is not in upstream msbuild yet. So,
we can't ask the F# upstream to add it. Hence, this is being added to
our FSharp target files. Once, all this is upstream, we can remove the
overrides from our files.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=51148
2017-02-06 15:27:07 -05:00
Jeffrey Stedfast bc251403c2 [msbuild] Properly decide on when to re-codesign app bundle (#1625)
If the user makes changes to an App Extension or Watch app,
then those bundles would change within the main app bundle
but the main app bundle would not get re-codesigned because
it was not properly considering those files as inputs in the
_CodesignAppBundle target.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52165
2017-02-06 13:52:30 -05:00
Jeffrey Stedfast f5b725e2af [msbuild] Added ProcessEnums property for ObjC Binding projects (#1557)
The new ProcessEnums property specifies whether or not to
pass /process-enums to the btouch task for iOS/Mac binding
projects.

Part of the fix for https://bugzilla.xamarin.com/show_bug.cgi?id=51753
2017-01-26 11:24:14 -05:00
Jeffrey Stedfast 4c5647150c [msbuild] Added support for <Link>'d ImageAsset project files (#1543)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=28106
2017-01-25 13:00:29 -05:00
batmaninpink ca8bb9386b recognize networkextension app extension (#1545) 2017-01-24 07:50:37 +01:00
Vlad Brezae cd9292ffdd Enable selecting the sgen major mode (#1546)
* [mmp/mtouch] Add option for concurrent sgen

* [msbuild] Add support for concurrent sgen properties

* [mmp] Test for concurrent sgen option
2017-01-24 07:28:15 +01:00
Vincent Dondain 0b37471271 [msbuild] Only use File.GetLastWriteTimeUtc (#1547)
Instead of just using File.GetLastWriteTime.
Fixes bug #51694: Use File.GetLastWriteTimeUtc not File.GetLastWriteTime
https://bugzilla.xamarin.com/show_bug.cgi?id=51694
2017-01-23 15:31:44 -05:00
Jeffrey Stedfast 252b0dc3df [msbuild] Parallelized codesigning of *.dylibs and frameworks (#1528)
* [msbuild] Parallelized codesigning of *.dylibs and frameworks

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=51298

* Disable timestamps for MtouchDebug builds
2017-01-20 11:28:34 -05:00
Jeffrey Stedfast 948d3d652d [msbuild] Fixed the Mac targets for the batch codesign patch (#1525) 2017-01-18 17:31:16 -05:00
Jeffrey Stedfast 39ca12858a [msbuild] Fixed the IpaPackageDir (#1523)
Originally, the IpaPackagePath would default to something
like:

bin/Debug/iPhone/MyProjectName $(DateTime)/MyProjectName.ipa

It was recently changed to not have the timestamp, but I
seem to have forgotten to do away with the subdirectory
completely. In other words, w/o this fix, we'd get:

bin/Debug/iPhone/MyProjectName/MyProjectName.ipa

When what we *really* want is:

bin/Debug/iPhone/MyProjectName.ipa
2017-01-18 16:07:30 -05:00
Jeffrey Stedfast 88364aac78 [msbuild] batch codesign resources to improve performance (#1522)
First step for https://bugzilla.xamarin.com/show_bug.cgi?id=51298
2017-01-18 15:12:14 -05:00
Jeffrey Stedfast 439e71fbf1 [msbuild] Fixed the logic to properly codesign *.appex's inside watch apps (#1499)
Several dependency targets were not being properly run because the Condition
expressions on e.g. the _CodesignAppExtensions target depended on variables
that were empty until the dependencies set them. But dependencies are only
executed if the parent target's Conditions were met.

Also changed the _CodesignVerify target to use the _ResolvedAppExtensions
variable instead of the _AppExtensionCodesignProperties variable. This means
that the _CodesignVerify target no longer depends on the
_ReadCodesignAppExtensionProperties target being executed and thus makes it
less likely that bugs like that will slip by in the future.
2017-01-13 16:05:15 -05:00
Jeffrey Stedfast e26ee5ca6c [msbuild] Refactor the IBTool task to be cleaner and more efficient (#1457)
[msbuild] Refactor the IBTool task to be cleaner and more efficient

Besides making the IBTool task cleaner and easier to understand,
a side-effect of this refactor was also to optimize the collecting
of the compiled outputs because we now only need to scan the
obj/ibtool directory once to collect each of the outputs.
2017-01-12 14:49:30 -05:00
Sebastien Pouliot 08c54f7914 [msbuild] Fix how UnpackLibraryResources handles mscorlib.dll (and potentially other framework assemblies) (#1011)
Target _UnpackLibraryResources:
	Task "UnpackLibraryResources"
		Using task UnpackLibraryResources from Xamarin.MacDev.Tasks.UnpackLibraryResources, Xamarin.MacDev.Tasks, Version=1.0.6128.15885, Culture=neutral, PublicKeyToken=null
		UnpackLibraryResources Task
		  Prefix: monotouch
		  IntermediateOutputPath: obj/iPhone/Debug/
		  NoOverwrite:
		    obj/iPhone/Debug/ibtool-link/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
		    obj/iPhone/Debug/ibtool-link/LaunchScreen.storyboardc/Info.plist
		    obj/iPhone/Debug/ibtool-link/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
		    obj/iPhone/Debug/ibtool-link/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
		    obj/iPhone/Debug/ibtool-link/Main.storyboardc/Info.plist
		    obj/iPhone/Debug/ibtool-link/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
		  ReferencedLibraries:
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
		    /Users/poupou/Downloads/LinkingTest-2/RMSDKWrapper/bin/Debug//RMSDKWrapper.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
		  Inspecting assembly: /Users/poupou/Downloads/LinkingTest-2/RMSDKWrapper/bin/Debug//RMSDKWrapper.dll
		  Inspecting assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
		  Inspecting assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
	Done executing task "UnpackLibraryResources"
	Done building target "_UnpackLibraryResources" in project "/Users/poupou/Downloads/LinkingTest-2/LinkingTest/LinkingTest.csproj".

The above log excerpt shows two issues:

1. mscorlib.dll is needlessly inspected as it's **not** considered a
   "framework" assembly.

   The current check was checking *how* it was resolved and not *where*
   it was resolved to. The later is the most important as it's possible
   for other assemblies to have direct paths references and we do not
   want to process them.

   This is fixed by comparing each assembly path with the (now) provided
   `TargetFrameworkDirectory`

2. mscorlib.dll is inspected twice

   That's because it's present two times in the task's input. That issue
   is upstream (not sure why) of the current task but it makes #1 twice
   as costly. The fix for #1 indirectly fix that too.

Future
------

It's worth investigating to move that logic into `mtouch`. The later must
already load all assemblies and is in charge of removing other embedded
data (e.g. native code from bindings) from the assemblies (so they are not
shipped both inside and outside the .dll in the final .app). This makes
this task seems extraneous work.

Considering that my current test case, `RMSDKWrapper.dll`, is 1.3GB in
size it's easy to see that the extra load (which has nothing to be
extracted wrt resources*) is quite visible in build time.

>  3268.201 ms  UnpackLibraryResources                                  1 calls

* it has for bindings but that's already handled by mtouch
2017-01-10 15:03:00 -05:00
Jeffrey Stedfast 551c0be103 [msbuild] Use Xcode-specific versions of some command-line tools (#1462)
The `strip` command was already doing this, but `ar` and `dsymutil`
were using /usr/bin versions (which might not exist, depending on
the Xcode installation).
2017-01-10 13:58:22 -05:00
Jeffrey Stedfast 9c8a5fa28c [msbuild] Don't use a timestamped directory for the IPA (#1382)
* [msbuild] Don't use a timestamped directory for the IPA

After discussion with Mikayla Hutchinson and Madhuri Gummalla,
this naming convention is annoying to customers so just put
the *.ipa in the bin directory. This also has the added
benefit that the *.ipa will be cleaned up with /t:Clean

* [msbuild] Fixed wildcard expansion for deleting the *.ipa file

* [msbuild] Add the zipped *.ipa file to the FileWrites item group

* [msbuild] s/TaskProperty/TaskParameter/
2017-01-09 16:11:50 -05:00
Rolf Bjarne Kvinge 1d20b18889 Revert "[msbuild] Moved _CompileToNative so it runs after importing the app extension" (#1454) 2017-01-09 17:38:20 +01:00
Jeffrey Stedfast 6014967891 [msbuild] Make sure to use the *actual* filename generated by ibtool (#1442)
* [msbuild] Make sure to use the *actual* filename generated by ibtool

The problem is that since the Mac file system is case-insensitive,
File.Exists() will match "file~ipad.nib" even if the actual name
is "file~iPad.nib", so the only way to get the *actual* file name
is to scan the directory and do manual matching.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44811

* Check that the dir exists before allocating other local variables
2017-01-06 13:34:21 -05:00
Jeffrey Stedfast 3103153349 [msbuild] Fixed the Inputs for the _CodesignAppBundle target (#1438)
* [msbuild] Fixed the Inputs for the _CodesignAppBundle target

The Inputs need to include the Info.plist, embedded.mobileprovision,
and the native libs/frameworks since those files also get included
in the _CodeSignature/CodeResources.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=50791

* [msbuild] Added unit test to make sure _CodesignAppBundle logic works
2017-01-05 11:29:48 -05:00
Jeffrey Stedfast af22202496 [msbuild] Properly clean device-specific output directories (#1387)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=50454
2016-12-20 13:24:24 -05:00
Rolf Bjarne Kvinge ffe3184345 [generator] Use --target-framework to specify which XM profile to target. (#1339) 2016-12-20 11:33:56 +01:00
Jeffrey Stedfast 86fcbbe715 [msbuild] Moved _CompileToNative so it runs after importing the app extensions (#1380)
Once @rolfkvinge finishes implementing support in mtouch
for code-sharing between main app and app extensions, the
mtouch command will need to run *after* the app extensions
have been copied into the app bundle.
2016-12-20 11:32:15 +01:00
joj 5405f0ac67 [msbuild] Cleanup common and mmp for remoting support (#1381) 2016-12-20 11:19:04 +01:00
Jeffrey Stedfast b37e3d42b0 [msbuild] Clean the $(AppBundleDir).mSYM directory (#1377) 2016-12-19 20:26:07 -05:00
Jeffrey Stedfast 1d79984be1 [msbuild] Use $(DeviceSpecificOutputPath) instead of $(AppBundleDir)\..\ (#1379)
Just a little cleaner/nicer.
2016-12-19 20:25:26 -05:00
Jeffrey Stedfast b192a9c078 [msbuild] Prevent rebuilds from re-codesigning if the app bundle is unchanged (#1373)
Patch #2 for https://bugzilla.xamarin.com/show_bug.cgi?id=49097
2016-12-17 22:51:25 -05:00
Jeffrey Stedfast 67fe510947 [msbuild] Codesign App Extension libs & frameworks (#1363)
This is a fixup to the PR in issue #1350.

We really only want to delay codesigning of the App Extension
*bundle*, but want to codesign any native libs and frameworks
as usual.
2016-12-16 14:30:13 +01:00
Jeffrey Stedfast 0b05192a3d [msbuild] Delay running dsymutil and strip on App Extensions (#1351)
* [msbuild] Delay running dsymutil and strip on App Extensions

We want to run dsymutil and strip on App Extensions
from the main app bundle targets so that mtouch can
generate a shared Mono.framework in the main app bundle.

* [msbuild] Updated Archive to copy appex dsyms from the correct location
2016-12-15 16:29:31 -05:00
Jeffrey Stedfast 711bc9ab9e Msbuild delay codesign (#1350)
* [msbuild] Delay codesigning of App Extensions

Instead of codesigning App Extensions as part of the
App Extension build, we now codesign them as part of
the Codesign target of the main app project.

* [msbuild] Use an ItemGroup to define _AppExtensionCodesignProperties

By using an ItemGroup, we save all of the metadata
even if the values are null/empty. Using CreateItem,
any metadata property with a null or empty value
was not being saved in the .items file.

* [msbuild] Take advantage of %(_AppExtensionCodesignProperties.Identity)

...instead of having to use
%(_AppExtensionCodesignProperties.Filename)%(_AppExtensionCodesignProperties.Extension)
2016-12-15 16:28:55 -05:00
Jeffrey Stedfast 37d71511a3 [msbuild] Don't rewrite embedded.mobileprovision or archived-expanded… (#1359)
* [msbuild] Don't rewrite embedded.mobileprovision or archived-expanded-entitlements.xcent

This patch prevents those 2 files from being rewritten in
cases where the contents would not change from what was
already there previously.

This is a partial fix for https://bugzilla.xamarin.com/show_bug.cgi?id=49097

* [msbuild] Re-enabled the RebuildExecutable_NoModifications unit test

With the fixes to EmbedProvisioningProfile and CompileEntitlements,
this unit test now passes.
2016-12-15 15:59:55 -05:00
Jeffrey Stedfast 13f17660d2 [msbuild] Optimized provisioning profile lookups (#1360)
Fixes the Mac EmbedProvisionProfile task to not load every
single provisioning profile from disk in order to find the
requested provisioning profile.

Drops the need for wrappers around the use of MobileProvisionIndex
since it turns out that MobileProvisionIndex.GetMobileProvision()
already does the File.Exists() on name + ".mobileprovision" to
avoid needing to scan the index of provisioning profiles.
2016-12-15 14:39:24 -05:00
Jeffrey Stedfast c267c5668c [msbuild] Fixed EmbedMobileProvision to lookup provisions by name/uuid correctly (#1352)
Fixed the EmbedMobileProvision task to use the same strategy for looking up provisioning profiles as the DetectSigningIdentity task.

This can be considered a follow-up patch to https://bugzilla.xamarin.com/show_bug.cgi?id=25499 and commit 146e7b3962 in that it is needed if/when the .csproj file references the provisioning profile based on the Name instead of the UUID, but also stands on its own as a performance optimization (MobileProvisionIndex lookups are significantly faster than loading each and every provisioning profile and then using LINQ to match against the UUID).
2016-12-15 11:12:34 -05:00
Jeffrey Stedfast 42b121bac5 [msbuild] Fixed _GenerateFrameworkDebugSymbols to respect NoDSymUtil and NoSymbolStrip options (#1346) 2016-12-14 14:35:58 +01:00
Vincent Dondain 887a410fe2 [msbuild] Add error codes for PropertyListEditorTaskBase (#1325)
* [msbuild] Add error codes for PropertyListEditorTaskBase

* [msbuild] Add task names in all errors' descriptions
2016-12-12 10:30:42 +01:00
Jeffrey Stedfast b16265593c [msbuild] Added support Simulator-specific builds (#1326) 2016-12-09 11:55:25 -05:00
Vincent Dondain 901b94d6e1 Merge pull request #1237 from VincentDondain/msbuild-mt-errors
[msbuild] Add msbuild error code logic
2016-12-08 12:50:58 -05:00
Vincent Dondain 9fe8dca4a8 [msbuild] Remove TLSProvider option (#1238)
* AppleTLS is the default since C7 and support up to TLS 1.2.

* MonoTLS is limited to SSLv3 and TLSv1: both are being deprecated.

* Note: C9 release notes already mention MonoTLS is deprecated and that it will be removed in the future.
2016-12-08 11:56:44 -05:00
Jeffrey Stedfast 1e41bc3750 [msbuild] Added a PropertyListEditor task which works like PlistBuddy (#1306)
* [msbuild] Added a PropertyListEditor task which works like PlistBuddy

This is a convenience Task for customers and isn't currently used
by the core MSBuild targets.

* [msbuild] The PropertyListEditor task does not need a SessionId property

* [msbuild] Added support for non-container root plist elements

* [msbuild] Catch & log exceptions loading plist document
2016-12-06 13:29:31 -05:00
Emanuel 7dac4dfe58 Copy watchOS app dll to output directory (#1271)
If the watchOS dll app is not copied to the output directory, the watchOS app project will be outdated for VS and it'll be built all the time. That will also cause the iOS app project to be built.
2016-12-05 17:21:48 -05:00
Rolf Bjarne Kvinge 056d1ea8b4 [msbuild] Extensions can contain frameworks too. (#1301) 2016-12-05 18:21:46 +01:00
Jeffrey Stedfast 7d662f44e6 [msbuild] Don't rewrite MonoTouchDebugConfiguration.txt unless it has… (#1288)
* [msbuild] Don't rewrite MonoTouchDebugConfiguration.txt unless it has changed

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=48515

* [msbuild] Reduce allocations in CreateDebugConfigurationTaskBase.cs
2016-12-01 17:15:14 -05:00
Jose Gallardo eb79a11317 Merge pull request #1268 from emaf/master
Changes GetVirtualProjectPath to make relative paths when building from VS
2016-12-01 16:45:57 +02:00
Jeffrey Stedfast b2a86cc534 [msbuild] Don't rm -rf the .dSYM dir in the _CompileToNative target (#1261)
That logic wrongly assumed that mtouch will always output a new
native executable file and that the dSYMs will need to be regenerated,
but that is not the case.

Move the rm -rf logic into the _GenerateDebugSymbols target instead,
so that we only delete the dSYMs if we've already committed to
regenerating them.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=41231

For a walk-through of the problem, see
https://bugzilla.xamarin.com/show_bug.cgi?id=47803#c9
2016-11-30 10:59:31 -05:00
Emanuel dfcea77a69 Changes GetVirtualProjectPath to make relative paths when building from VS
This change fixes the build of solutions that contain Shared Projects with BundleResources from VS. In that case the ItemSpec of the BundleResource is the full Windows path, so we ended up with an invalid path.

Fixes Bug #47570 - On building "FilterDemoApp", it gives "path's format is not supported" build error.

https://bugzilla.xamarin.com/show_bug.cgi?id=47570
2016-11-30 11:40:20 -03:00
Jeffrey Stedfast 5682c4d8e9 [msbuild] Touch the .dSYM Info.plist after stripping the native exe (#1233)
The idea here is to prevent future builds from calling dsymutil
if the native executable hasn't changed since the previous build.

The reason we need to touch the dSYM Info.plist after stripping
is because the SymbolStrip task *may* modify the native executable
thereby giving it a newer mtime timestamp than the dSYM Info.plist
which would cause later builds to re-run the dsymutil task on an
already-stripped native executable.

It should be noted, however, that the _CodesignAppBundle target
already updates the mtime timestamp of the dSYM Info.plist for
precisely the same reason and since it is run *after* the
_GenerateDebugSymbols target, the 'touch' should generally not
be needed in the _GenerateDebugSymbols target.
2016-11-29 08:16:48 -05:00
Vincent Dondain 8ea1509dec [msbuild] Add msbuild error code logic
- `LoggingExtensions` has a new `MTError` extension method that helps generate
  an msbuild error with the proper MTxxx format.
- Added error codes for 44 msbuild errors.
- Updated `docs/website/mtouch-errors.md` and `tools/mtouch/error.cs` accordingly.
- MT7001 contains some extra documentation (troubleshooting steps).
2016-11-24 15:24:30 +01:00
Vincent Dondain 011bb14212 [msbuild/tests] Add watch-companion test (#1187) 2016-11-16 16:51:33 -05:00
Jeffrey Stedfast 19ae097f79 [msbuild] Log warnings and errors for the ibtool --link stage as well (#1188)
* [msbuild] Log warnings and errors for the ibtool --link stage as well

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44674

* [msbuild] Only need to log warnings and errors when ibtool returns error in --link phase

* [msbuild] Don't log empty errors from ibtool

* [msbuild] Moved LogWarningsAndErrors() logic into XcodeCompilerToolTask.Compile()

* [msbuild] Tweak minor glitches

- rc is not needed anymore since we don't *yet* do anything with the error code.
- copy&paste issue on the LogError.
2016-11-16 16:20:51 -05:00
Chris Hamons 7004944a6b Fix mmp rebuild logic to detect mmp failures and rebuild (#1149)
- https://bugzilla.xamarin.com/show_bug.cgi?id=46508

Since we were previously looking for the .exe instead of the launcher, mmp
failures would come back as good and we wouldn't rebuild. What we want
to do is look for the native launcher, which we perviously were doing wrong.
2016-11-14 10:58:50 -06:00
Vincent Dondain c76fd77ac0 [msbuild] Don't replace * by bundle id in entitlements (#1147)
- Fixes bug #46298: Xamarin seems to replace asterisk with bundle id in Entitlements.plist file
  https://bugzilla.xamarin.com/show_bug.cgi?id=46298

The CompileEntitlementsTaskBase logic is still good wrt TeamIdentifierPrefix, AppIdentifierPrefix and CFBundleIdentifier
replacements but asterisks that represent wildcards shouldn't be replaced. Note that Apple doesn't do it in Xcode either.

* [msbuild/test] Add CompileEntitlementsTaskTests

Makes sure that for a given Entitlement.xcent and provisioning profile in input and output the right thing.

These tests also cover the changes made in e32efb0310
in response to bug #46298 (https://bugzilla.xamarin.com/show_bug.cgi?id=46298).
2016-11-11 20:18:14 -05:00
Chris Hamons d4e32a96f2 Merge branch 'master' into xm_mmp_rebuildfix 2016-11-09 14:20:41 -06:00
Chris Hamons 7ed3f17a6e Fix mmp rebuild logic to detect mmp failures and rebuild
- https://bugzilla.xamarin.com/show_bug.cgi?id=46508

Since we were previously looking for the .exe instead of the launcher, mmp
failures would come back as good and we wouldn't rebuild. What we want
to do is look for the native launcher, which we perviously were doing wrong.
2016-11-09 14:16:53 -06:00
Jeffrey Stedfast a055313a0d [msbuild] The CoreCodesignDependsOn target list does not start with an _ (#1140) 2016-11-08 15:59:09 -05:00
Ankit Jain 05c8420f6c [msbuild] Fix Metal project builds with msbuild for XI/XM (#1130)
Building `MetalKitEssentials.Mac` project from `mac-ios-samples` repo with
msbuild fails with:

```
"/Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/MetalKitEssentials.Mac.csproj" (default target) (1) ->
(_SmeltMetal target) ->
  /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets : error : Tool exited with code: 1. Output: warning: unable to open file obj/Debug/metal/../../../../../../../Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/Resources/Shaders.dia for serializing diagnostics (Error opening output file 'obj/Debug/metal/../../../../../../../Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/Resources/Shaders.dia': No such file or directory) [-Wserialized-diagnostics] [/Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/MetalKitEssentials.Mac.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets : error : warning: '-std=osx-metal1.0' is equivalent to '-std=osx-metal1.1' [/Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/MetalKitEssentials.Mac.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets : error : error: unable to open output file 'obj/Debug/metal/../../../../../../../Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/Resources/Shaders.air': 'Error opening output file 'obj/Debug/metal/../../../../../../../Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/Resources/Shaders.air': No such file or directory' [/Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/MetalKitEssentials.Mac.csproj]
```

The path
`obj/Debug/metal/../../../../../../../Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/Resources/Shaders.dia`
should be just `Resources/Shaders.dia`. This is from the `@(Metal)` item
passed to the `Metal` task as:

	<Metal SourceFile="%(Metal.Identity)" ..

- This item is defined in the user's project file.
- And the task invocation is in
	`/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets`.

- The `Metal` task (indirectly[2]) uses the `DefiningProjectFullPath`
  metadata from that `SoureFile`, and expects to get the path to the
  file that defined that `@(Metal)` item. But since we are using
  `%(Metal.Identity)`, to use task batching, msbuild converts the
  `%(Metal.Identity)` to a string and then "boxes" that as an ITaskItem,
  and thus newly created item passed to `SourceFile` will have
  `DefiningProjectFullPath` set to the `Xamarin.Mac.Common.targets`!

- And trying to create a relative path using that gives us
  `obj/Debug/metal/../../../../../../../Users/ankit/dev/mac-ios-samples/MetalKitEssentials/MetalKitEssentials.Mac/Resources/Shaders.dia`

- The fix is to use `'%(Metal.Identity)` in the `Condition` to cause
  task batching, but use `SourceFile="@(Metal)"` so that we get the
  original item!

- Fixed for iOS targets too

---
1. The actual code is in `BundleResources.GetVirtualProjectPath`.
   Other tasks using this were looked at and they are all using
   `ITaskItem[]` and so passing `@(Items)` and thus get the original
   items.

2. And the build works in xbuild, because it has `DefiningProjectFullPath`
   for the "boxed" item set to `""`. And `GetVirtualProjectPath` works
   around that.
2016-11-07 13:37:59 -05:00
Ankit Jain 945c2043e3 [msbuild] Fix app extension builds with msbuild for XI and XM (#1124)
Some samples from the `ios-samples` repo failed with an error in running
`ditto`:

```
  Tool /usr/bin/ditto execution started with arguments: -rsrc /Users/ankit/dev/ios-samples/ios9/FilterDemoApp/FilterDemoAppExtension/bin/iPhoneSimulator/Debug/FilterDemoAppExtension.appex bin/iPhoneSimulator/Debug/FilterDemoApp.app/PlugIns/FilterDemoAppExtension.appex                                                  Environment variables being passed to the tool:
  ditto: can't get real path for source '/Users/ankit/dev/ios-samples/ios9/FilterDemoApp/FilterDemoAppExtension/bin/iPhoneSimulator/Debug/FilterDemoAppExtension.appex'                                                                                                                                                       Tool /usr/bin/ditto execution finished.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets : error : Tool exited with code: 1. Output: ditto: can't get real path for source '/Users/ankit/dev/ios-samples/ios9/FilterDemoApp/FilterDemoAppExtension/bin/iPhoneSimulator/Debug/FilterDemoAppExtension.appex' [/Users/ankit/dev/ios-samples/ios9/FilterDemoApp/FilterDemoApp/FilterDemoApp.csproj]
```

The directory
`/Users/ankit/dev/ios-samples/ios9/FilterDemoApp/FilterDemoAppExtension/bin/iPhoneSimulator/Debug/FilterDemoAppExtension.appex`
did exist *after* the full build was over, but just before `ditto` ran,
it didn't[1].

But it should have been created as part of the `FilterDemoAppExtension`
build, before `ditto` was called as the `FilterDemoAppExtension` project
is referenced by `FilterDemoApp`. And this builds fine with xbuild.

Debugging+hair-pulling revealed:

a. `FilterDemoApp.csproj` has a `ProjectReference` pointing to
`FilterDemoAppExtension.csproj`

b. xbuild figures out the build order based on the .sln and the project
references and builds the individual projects in that order.

c. But msbuild doesn't do that anymore. It seems to build in "some"
order (probably the order in which the projects appear in the sln), and
depends on each project's `ResolveProjectReferences` target building
such referenced projects! So, msbuild starts with building
`FilterDemoApp` project and should have built the extension project, as
it is referenced, but that does not happen.

d. It does not happen because XI, in `_SeparateAppExtensionReferences`,
moves any `Extension` projects from `@(ProjectReferences)` to other
items to handle them itself in `Xamarin.iOS.Common.targets`. So, the
`ResolveProjectReferences` does not see the extension project at all.

e. But XI targets handle this in `_ResolveAppExtensionReferences`, just
like `ResolveProjectReferences` from x/msbuild targets. BUT.. they depend
on the xbuild's behavior, where if you are building a `.sln` file, then
any dependent projects have already been built, and thus it just skips
them!!
	- Since, msbuild no longer does this.. the extension project is
	not built and instead proceeds to creating the apple bundle.

So, the fix is effectively to remove the `$(BuildingSolutionFile) == true`
check from that target.

- The same change is required for Watch extensions target too.
- And the corresponding changes for XamMac

- This fixes ~7 demos in ios-samples.

---
1. The directory and the corresponding files existed *after* the full
build but not before the `ditto` execution because after `ditto`
caused the `FilterDemoApp` project to fail, msbuild continued to build
the remaining `FilterDemoAppExtension` project! too late :)
2016-11-06 19:15:30 -05:00
Vincent Dondain 1f056d6a3e [msbuild] Fix minor typos in DetectSdkLocationsTaskBase (#1121) 2016-11-04 10:53:32 -04:00
Rolf Bjarne Kvinge 3351e2a633 Add a 'repositorypath' to our NuGet.Config and update paths everywhere accordingly. (#1110)
This makes us only put packages in one directory (saves disk space and time),
and it also makes project files in multiple solutions work properly
(mtouch.csproj is in tests/tests.sln and tests/mtouch/mtouch.sln).
2016-11-04 09:13:33 +01:00
Sebastien Pouliot 738a33afca Merge pull request #1087 from xamarin/msbuild-use-latest-profile
[msbuild] Allow Provisioning Profile lookups by name and use only the…
2016-11-03 11:09:41 -04:00
Jeffrey Stedfast 350f497e7a [msbuild] Validate that WatchOS2 App Extensions do not have watch-companion set (#1089) 2016-11-02 10:52:40 +01:00
Jeffrey Stedfast 146e7b3962 [msbuild] Allow Provisioning Profile lookups by name and use only the most recent version
Use the 'unique' argument to MobileProvisionIndex's lookup methods
to only get back the most recent versions of each provisioning
profile so that we don't accidentally pick an older version.
2016-11-01 12:27:18 -04:00
Chris Hamons 612f52bd80 Fix binding project LinkWithAttributes generation to prevent unnecess… (#1029)
* Fix binding project LinkWithAttributes generation to prevent unnecessary rebuilds

- https://bugzilla.xamarin.com/show_bug.cgi?id=45762

* Remove duplicate ToString call
2016-10-31 10:37:10 +01:00
Chris Hamons 82bfb2fe39 Fix XM dependency tracking of mmp bundle to prevent rebuilds (#1014)
- https://bugzilla.xamarin.com/show_bug.cgi?id=45764
- _CompileToNative's output in msbuild was incorrectly set to:
 $(_AppBundlePath)Contents\MacOS\$(TargetFileName) when the generated
 file lives at $(_AppBundlePath)Contents\MonoBundle\$(TargetFileName).
- This means we'd always try to rebuild, which can be rather time consuming.
- The XI target file is just different enough to require a seperate fix.
2016-10-27 20:15:28 +02:00
Sebastien Pouliot 8c93e7758d Merge branch 'xcode8.1' 2016-10-26 15:56:34 -04:00
Emanuel d8362f6ff6 Fixes Bug #44724 - Failed to read file attributes for "/Users/admin/Assets.xcassets" (#1039)
The ProjectDir could exist under certain circumstances (e.g. referenced assemblies are being copied to the Mac in the same folder path that those are located in Windows) so we cannot assume the existence or not of ProjectDir means the build comes from VS.

The only way to ensure we're building from VS is to check the SessionId parameter.

https://bugzilla.xamarin.com/show_bug.cgi?id=44724
2016-10-26 13:08:11 -04:00
Rolf Bjarne Kvinge 1e4b395368 Revert "Fix binding project LinkWithAttributes generation to prevent rebuilds" (#1018) 2016-10-24 07:13:51 +02:00
Chris Hamons a8daab7cdd Fix binding project LinkWithAttributes generation to prevent unnecessary rebuilds (#1017)
- https://bugzilla.xamarin.com/show_bug.cgi?id=45762
2016-10-21 18:24:15 -04:00
Jeffrey Stedfast 707b0e683f [msbuild] Added BeforeCodesign and AfterCodesign hooks for Mac (just like iOS has) (#1003) 2016-10-19 09:31:35 -05:00
Rolf Bjarne Kvinge c4b5fa5f44 [msbuild] Remove support for XI/Classic. (#976)
* [msbuild] Remove unused FrameworkList.xmls

* [msbuild] Make files in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS the real deal, not a symlink.

* [msbuild] Make /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS a symlink, instead of each file inside.

* [msbuild] Don't put anything in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1 anymore.

* [msbuild] Remove support for XI/Classic binding projects.

* Improve 'install-system' to clean up old files.

* [msbuild] Simplify XI/Classic targets files a bit.

* [msbuild] Remove dead XI/Classic code.

* Bump maccore to get fix for xamarin-analysis.

commit xamarin/maccore@34c04c2bf1
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Mon Oct 10 16:46:18 2016 +0200

    [analysis] Update to put files in /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS.

    XI/Classic is being removed now, which means files should go into
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/msbuild/iOS/ instead of into
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1.
2016-10-13 10:47:46 +02:00
Jeffrey Stedfast fa114b2565 [msbuild] Fixed parsing of --gcc_flags=... for mtouch (#982)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=45240
2016-10-12 20:49:34 -04:00
Jeffrey Stedfast 03e44859b3 [msbuild] Drop the fancy Mono.Unix logic and just call realpath() once (#967) 2016-10-10 10:24:41 +02:00
Jeffrey Stedfast 2a02804d81 [msbuild] Fixed IsWatchExtension state property (#913)
The problem was that this property was evaluating to True
for the main app bundle because it assumed that if the
project contained a Watch app, that it was the WatchExtension.

This logic only holds true for WatchOS1, but not WatchOS2.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44841
2016-10-03 13:44:31 -04:00
Ankit Jain 6f37730293 [msbuild] Set $(CscDebugFileExt) also, whenever overriding $(CscToolExe) (#896)
* [msbuild] Set $(CscDebugFileExt) also, whenever overriding $(CscToolExe)

- This property was introduced in mono's msbuild, but will be upstream
  also
- This *must* be set before Microsoft.CSharp.targets file is imported.
- Even though the msbuild targets will automatically select `.mdb` if
  the `$(CscToolExe)` is `mcs` or `mcs.exe`, it would be a good
  practice to set both the properties together.

- This came up in cases where we use `smcs`, because in that case the
  msbuild targets end up using `.pdb`.

* [msbuild] Set `$(CscDebugFileExt)` == `.mdb`

Xamarin.ObjcBinding.CSharp.targets: Set the debug file extension also,
since we are overriding the compiler via `$(CscToolExe)`. Also, move
the property definition around to ensure that they are set *before*
importing `Microsoft.CSharp.targets`.
2016-09-28 14:37:44 -04:00
Jeffrey Stedfast 5922215e72 [msbuild] Add watch-companion to UIRequiredDeviceCapabilities for watchOS1 extensions (#868)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44257
2016-09-22 19:09:10 +02:00
Rolf Bjarne Kvinge d4edc453a6 Fix default http message handler for watchOS. (#873)
* Fix default http message handler for watchOS.

Fix default http message handler for watchOS to be NSUrlSessionHandler (the
previous attempt at eb7c2fd was quite incomplete), and make sure
HttpClientHandler is never used (show errors if someone tries).

* [tests] Remove explicit http client handler from project files.

Just use the default instead, since the set of valid http client handlers varies between platforms.
2016-09-22 14:29:18 +02:00
Rolf Bjarne Kvinge 9000e48034 [tests] Remove Classic test projects, and make the Unified test projects the master projects. (#858) 2016-09-21 22:55:10 +02:00
Jeffrey Stedfast 8da5e2b538 [msbuild] Require Xcode >= 7.2 in order to make use of ibtool --link (#851)
I'm not 100% sure when --link was added to ibtool, but since our
release notes say that we now require Xcode >= 7.2 anyway, might
as well make that version a requirement for ibtool --link

(Based on forum comments, we know it didn't exist in Xcode 7.0 Beta 3)
2016-09-20 12:34:03 +02:00
Emanuel 4f5fc6d263 Enables CoreCompile target for WatchOS App projects (#826)
* Enables CoreCompile target for WatchOS App projects

The iOS Designer depends on Roslyn Workspace APIs to inspect and get notified of project changes, which needs CoreCompile target to work.

Fixes Bug #41766 (https://bugzilla.xamarin.com/show_bug.cgi?id=41766)

* [msbuild] Adds empty cs file to avoid errors and warnings when building watchOS apps

Xbuild fails to build projects with no @(Compile). This change workaround it for watchOS apps.
2016-09-16 14:16:32 -04:00
Sebastien Pouliot f1804cce67 Merge branch 'cycle8' into xcode8 2016-09-16 13:24:24 -04:00
Jeffrey Stedfast 9ba3bf77a0 Cycle8 msbuild codesign simulator no cert (#835)
* [msbuild] Even iOS Simulator builds now require signing certificates (#809)

Now that dylibs and frameworks are required to be signed in order to
run on the Simulator, we cannot allow the DetectSigningIdentity task
to return success if it didn't find a codesign key.

* [msbuild] Allow codesigning Simulator builds w/o the need of a developer cert (#833)
2016-09-16 13:17:52 -04:00
Jeffrey Stedfast fca8a0c397 Cycle8 msbuild codesign simulator no cert (#835)
* [msbuild] Even iOS Simulator builds now require signing certificates (#809)

Now that dylibs and frameworks are required to be signed in order to
run on the Simulator, we cannot allow the DetectSigningIdentity task
to return success if it didn't find a codesign key.

* [msbuild] Allow codesigning Simulator builds w/o the need of a developer cert (#833)
2016-09-16 13:16:09 -04:00
Ankit Jain 4a87ccf948 [msbuild] Ensure that `BuildOnlySettings` is the first target to run for a `Build` (#841)
When building the `inspector` project with msbuild, the build fails
because of a missing `System.Runtime` reference,
-> which can be traced to the `ResolveAssemblyReferences` task not resolving dependencies.
	-> which can be traced to `$(_FindDependencies)` property being set to false
		-> which is false, because `$(BuildingProject)` is false, which should
		   have been set by the `BuildOnlySettings` target, run as a dependency of
		   `CoreBuild`.

We override `$(BuildDependsOn)` as:

  <BuildDependsOn>
     ...
     _UnpackLibraryResources;
     $(BuildDependsOn);
     ...
  </BuildDependsOn>

.. so, `_UnpackLibraryResources` runs before `BuildOnlySettings`. And
`_UnpackLibraryResources` depends on `ResolveReferences`, so the
`ResolveAssemblyReferences` task runs with the incorrect properties. And
later, during the build when `ResolveAssemblyReferences` is invoked
again, it gets skipped and the incorrect outputs get used.

`$(BuildingProject)` should be true for a project build. So,
`Xamarin.Mac.Common.targets` are fixed for that. And other similar
target files are also fixed.

Note: `Xamarin.iOS.Common.targets` already does this correctly.
Note: `$(BuildingProject)` is not used in xbuild, so this bug is seen
only when building with msbuild.
2016-09-15 21:38:55 -04:00
Jeffrey Stedfast f9e2e18794 [msbuild] Include the CFBundleVersion in the archive manifest (#839)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44348
2016-09-15 14:50:02 -04:00
Jeffrey Stedfast 0eda3276b7 [msbuild] Allow codesigning Simulator builds w/o the need of a developer cert (#833) 2016-09-14 15:43:25 -04:00
Sebastien Pouliot 38148c718a Merge branch 'xcode8' 2016-09-09 15:29:37 -04:00
Jeffrey Stedfast b8a90fd243 [msbuild] Even iOS Simulator builds now require signing certificates (#809)
Now that dylibs and frameworks are required to be signed in order to
run on the Simulator, we cannot allow the DetectSigningIdentity task
to return success if it didn't find a codesign key.
2016-09-09 19:14:05 +02:00
Jeffrey Stedfast 5f73edaac1 [msbuild] Check that ExtraArgs is not null before parsing (#795)
* [msbuild] Check that ExtraArgs is not null before parsing

* [msbuild] FIxed accidental typo in last commit
2016-09-07 17:42:04 -04:00
Jeffrey Stedfast c1e5fa0150 Cycle8 msbuild mmp fixes (#796)
* [msbuild] Fixed the mmp task to make sure the MonoBundle dir exists before enumerating its files (#787)

* [msbuild] Parse the mmp ExtraArgs to get the custom mono bundle dir name (#790)

The mmp utility allows users to pass -custom_bundle_name to specify
a custom directory name to use instead of MonoBundle, so we need to
parse the extra args to extract this value so that we can scan that
directory for dylibs to codesign.

* [msbuild] Check that ExtraArgs is not null before parsing

* [msbuild] FIxed accidental typo in last commit
2016-09-07 14:19:32 -04:00
Vincent Dondain 5ddee0dcbf [msbuild] Update classic build error (#791)
We now want the build error to always show up.
monotouch.dll will be shipped with XI 10 to allow migration (dependent on the dll being available).
Therefore the check wasn't valid anymore because it was only applying the error if monotouch.dll wasn't there.
This was done to avoid breaking our internal tests but we should actually be fine, if not we'll update the tests.
2016-09-07 12:50:22 -04:00
Vincent Dondain df7b2a5165 [msbuild] Add missing iOS+tvOS 10 Extension points (#786) 2016-09-07 17:42:14 +02:00
Jeffrey Stedfast d079b8afcb [msbuild] Parse the mmp ExtraArgs to get the custom mono bundle dir name (#790)
The mmp utility allows users to pass -custom_bundle_name to specify
a custom directory name to use instead of MonoBundle, so we need to
parse the extra args to extract this value so that we can scan that
directory for dylibs to codesign.
2016-09-07 11:30:29 -04:00
Jeffrey Stedfast 4d4decdad1 [msbuild] Fixed the mmp task to make sure the MonoBundle dir exists before enumerating its files (#787) 2016-09-07 09:15:40 -04:00
Vincent Dondain e4093d5908 [msbuild] ACTool update for iMessage Extension (#778) 2016-09-07 00:59:45 +02:00
Sebastien Pouliot 0cc8b176e8 Merge branch 'cycle8' into xcode8 2016-09-06 18:46:23 -04:00
Vincent Dondain 562b9564f1 [msbuild] Show proper build error when monotouch.dll doesn't exist (#750)
Due to the deprecation of classic we needed to provide a better and single error message
rather than the countless msbuild errors you'd have because you'd be missing monotouch.dll

* Migrate MySingleView & MyLibrary to Unified
2016-09-06 14:50:54 -04:00
Rolf Bjarne Kvinge f2c4c191c6 [msbuild] Set NSAllowArbitraryLoads when debugging watchOS apps. (#746)
* [msbuild] Move detection of network configuration to a separate task.

* [msbuild] Set NSAllowArbitraryLoads when debugging watchOS apps.

The only way to have reliable http connections from the watchOS 2 device
to the mac is to set NSAllowArbitraryLoads.

See also: https://forums.developer.apple.com/thread/6205
2016-09-02 08:30:15 -04:00
Rolf Bjarne Kvinge b7570c09d4 [msbuild] Remove debug spew. (#747) 2016-09-02 08:25:52 -04:00
Jeffrey Stedfast ee8eac1237 [msbuild] Only include *.dylibs from the app bundle for codesigning (i.e. not from child PlugIns) (#725)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43890
2016-09-01 11:43:26 -04:00
Rolf Bjarne Kvinge 88dcc52a35 Merge pull request #707 from rolfbjarne/msbuild-allow-http-for-watchos-debugging
[msbuild] Set NSAllowArbitraryLoads when debugging watchOS apps.
2016-09-01 16:48:56 +02:00
Jeffrey Stedfast 3ebed206e1 [msbuild] Only include *.dylibs from the app bundle for codesigning (i.e. not from child PlugIns) (#725)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43890
2016-09-01 15:42:07 +02:00
Rolf Bjarne Kvinge 91b8f958b9 [msbuild] Set NSAllowArbitraryLoads when debugging watchOS apps.
The only way to have reliable http connections from the watchOS 2 device
to the mac is to set NSAllowArbitraryLoads.

See also: https://forums.developer.apple.com/thread/6205
2016-08-31 19:43:21 +02:00
Rolf Bjarne Kvinge 7d96d81e52 [msbuild] Move detection of network configuration to a separate task. 2016-08-31 19:43:21 +02:00
Jeffrey Stedfast 73a1d74cab Cycle8 codesign simulator (#674)
* [msbuild] Always codesign iOS frameworks (#642)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43264

* [msbuild] Always codesign *.dylibs, even for Simulator builds (#672)

Another fix for https://bugzilla.xamarin.com/show_bug.cgi?id=43264
2016-08-25 18:22:20 -04:00
Jeffrey Stedfast f42e9ee935 [msbuild] Explicitly check that IsMacEnabled == true (#673) 2016-08-25 16:46:34 -04:00
Jeffrey Stedfast 3fbfcf7b22 [msbuild] Always codesign *.dylibs, even for Simulator builds (#672)
Another fix for https://bugzilla.xamarin.com/show_bug.cgi?id=43264
2016-08-25 16:40:31 -04:00
Jeffrey Stedfast 11c4f6bdd9 [msbuild] Always codesign iOS frameworks (#642)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43264
2016-08-25 13:08:03 -04:00
Jeffrey Stedfast 791423f4f1 [msbuild] Add the Insights API Key to the iOS archive manifest (#656)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43489
2016-08-25 11:45:55 -04:00
Jeffrey Stedfast 248635f5a7 [msbuild] Add the Insights API Key to the iOS archive manifest (#656)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43489
2016-08-24 16:29:46 -04:00
Daniel Cazzulino a744c7ad51 [msbuild] Add forward compatibility with symlinks support (#649)
See https://github.com/Microsoft/msbuild/issues/928
2016-08-23 15:35:57 -04:00
Daniel Cazzulino d45f52f1c1 [msbuild] Add forward compatibility with symlinks support (#648)
See https://github.com/Microsoft/msbuild/issues/928
2016-08-23 15:35:16 -04:00
Jason Imison 39b13fecba Fix fsharp targets to detect 'F#' language. Fixes #43356 (#626) 2016-08-18 14:11:02 -04:00
Jason Imison 07e3ad785e Fix fsharp targets to detect 'F#' language. Fixes #43356 (#625) 2016-08-18 14:01:35 -04:00
Jeffrey Stedfast 67bdff568b [msbuild] code cleanup (#607) 2016-08-15 15:07:34 -04:00
Mikayla Hutchinson 07c6835608 Remove leftover/broken import in F# targets 2016-08-15 10:06:16 -04:00
Mikayla Hutchinson 740d91ad08 Remove leftover/broken import in F# targets 2016-08-12 16:20:37 -04:00
joj 44721a0a9e Modifying the way GAC elimination works so it will work in MSBuild (#540)
XBuild adds extra semi-colons to the string when serializing. I remove them via split to make MSBuild work.
2016-08-10 11:59:09 -03:00
Jeffrey Stedfast f77fbeb016 [msbuild] When doing device-specific builds, ignore incompatible devi… (#579)
[msbuild] When doing device-specific builds, ignore incompatible device OS's

If the user has tvOS, watchOS, and iOS projects in their solution
and goes to build for one of them for a specific device, it passes
along the device specific info to MSBuild. The build would then
fail for the tvOS and/or watchOS projects because of incompatible
architecture requirements.

This fixes that problem by short-cutting the ParseDeviceSpecificBuildInfo
task to output the default values (the values used when not building
for a specific device).
2016-08-09 14:40:17 -04:00
Jeffrey Stedfast ec56c6103d [msbuild] When doing device-specific builds, ignore incompatible devi… (#579)
[msbuild] When doing device-specific builds, ignore incompatible device OS's

If the user has tvOS, watchOS, and iOS projects in their solution
and goes to build for one of them for a specific device, it passes
along the device specific info to MSBuild. The build would then
fail for the tvOS and/or watchOS projects because of incompatible
architecture requirements.

This fixes that problem by short-cutting the ParseDeviceSpecificBuildInfo
task to output the default values (the values used when not building
for a specific device).
2016-08-09 14:39:08 -04:00
Mikayla Hutchinson 51b7f81eca Fix F# targets on xbuild 12.0 & 14.0 (#542) 2016-08-09 11:24:12 -04:00
Mikayla Hutchinson 3e04819622 Fix F# targets on xbuild 12.0 & 14.0 (#541) 2016-08-09 11:23:56 -04:00
Chris Hamons 309c3b5c9e [XM] Fix msbuild incompatibility in binding target file (#375) 2016-08-08 13:53:33 -05:00
Jeffrey Stedfast 235a4ab226 [msbuild] Fixed spelling of MacOSX to Mac OS X (#538)
* [msbuild] Fixed spelling of MacOSX to Mac OS X

* [msbuild] Use the name 'macOS' instead of 'Mac OS X' :)
2016-08-04 14:08:15 -04:00
joj 0034839244 Modifying the way GAC elimination works so it will work in MSBuild (#540)
XBuild adds extra semi-colons to the string when serializing. I remove them via split to make MSBuild work.
2016-08-03 14:34:54 -05:00
Jeffrey Stedfast c2295c65e9 [msbuild] Don't use a user-defined Mac OS X SDK version, it's useless (#528)
Recent Xcode versions only ship 1 version of the SDK, so it is
pointless to have a user-defined SDK version to link against.

We already use the LSMinimumOSVersion to determine the proper
-mmacosx-version-min argument to pass.
2016-08-03 10:53:07 -04:00
nosami 1c82491de6 Add F# targets to Xamarin.Mac.FSharp.targets 2016-08-02 20:17:34 +01:00
nosami 5df2224f71 Add F# targets to Xamarin.Mac.FSharp.targets 2016-08-02 20:14:55 +01:00
nosami a90fe3ce8a Fix the other FSharp templates. Fixes #42828 2016-08-02 16:59:56 +01:00
nosami f7c84735c8 Fixes #42828 2016-08-02 16:59:44 +01:00
Jason Imison 44b3920511 Fixes #42828 (#512)
* Fixes #42828

* Fix the other FSharp templates. Fixes #42828
2016-08-02 11:49:22 -04:00
Chris Hamons 9c00c941dc [XM] Allow 64-bit system mono in XM apps (#508)
- Back when this check was added, 64-bit mono was not standard/shipped. Now it is.
2016-07-29 14:21:45 -05:00
Chris Hamons ff1f30b305 [XM] Fix msbuild incompatibility in binding target file (#375) 2016-07-11 13:56:04 -04:00
Jeffrey Stedfast b604792a3e [msbuild] Replaced uses of $(_IpaOutputDir) with $(IpaPackageDir) (#336)
* [msbuild] Replaced uses of $(_IpaOutputDir) with $(IpaPackageDir)

Fixes the unit tests

* [msbuild] Define IpaPackageDir/Name based on IpaPackagePath if defined
2016-06-30 21:22:41 -07:00
Rolf Bjarne Kvinge 93e100688d [msbuild] Don't Assert.Ignore in ctors, it ends up as failures. 2016-06-29 00:06:43 +02:00