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

9694 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 714876d55f
[coretelephony] Update for Xcode 12.1 GM (#9878) 2020-10-14 22:22:55 -04:00
Sebastien Pouliot 3a35c2425c
[xcode12.1] Bump for GM (#9876) 2020-10-14 20:06:20 -04:00
monojenkins a72ad286d7
[Tests] Fix a test that crashes on devices due to possible bonjour services present. (#9868)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-10-14 15:12:13 -04:00
monojenkins 4804009a65
[Tests] Fix a test that crashes on devices due to possible bonjour services present. (#9869)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-10-14 14:52:46 -04:00
Sebastien Pouliot c379544def
[xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856)
This can easily happen when existing type(s) or framework are added to a platform. E.g.

```csharp
[Watch (6,0)][iOS (9,0)]
interface AVFoo {
   [Watch (6,0)][iOS (13,0)]
   void NewMember ();
}
```

Here we have duplicate attributes and, while not confusing, it does mean extra (and non required) metadata into the platform assemblies.

```csharp
[Watch (6,0)][iOS (9,0)]
interface AVFoo {
   [Watch (5,0)][iOS (13,0)]
   void NewMember ();
}
```

Here we declare a member as available when the type is not. I'm not sure how the IDE will react - but this should be audited since one of them is wrong (whatever the IDE behaviour is).

Fix https://github.com/xamarin/xamarin-macios/issues/6856

Backport of https://github.com/xamarin/xamarin-macios/pull/9825

Includes additional fixes for XM (disabled in `main`)
2020-10-14 13:57:14 -04:00
Manuel de la Pena 5db939f329
[Tools] Remove compilation warning CS0105 (#9865) 2020-10-14 13:37:44 -04:00
Rolf Bjarne Kvinge 9cbde483a9
[tests] Set DEVELOPER_DIR when calling xcrun manually. (#9859)
This fixes build problems that may occur when the various versions of Xcode
(system Xcode, VSMac Xcode, '/Applications/Xcode.app' symlink) don't agree on
which Xcode is THE Xcode:

    CustomMetalSmelting:
      Creating directory "bin/iPhone/Debug-unified/monotouchtest.app".
      xcrun -sdk iphoneos metal -c Resources/fragmentShader.metal -o obj/iPhone/Debug-unified//fragmentShader.air -mios-version-min=11.0
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEWatchSupportUI.ideplugin (com.apple.dt.IDEWatchSupportUI) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEWatchSupportCore.ideplugin (com.apple.dt.IDEWatchSupportCore) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IBCocoaTouchBuildSupport.ideplugin (com.apple.dt.IDE.IBCocoaTouchBuildSupport) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for GPUDebuggerOSXSupport.ideplugin (com.apple.dt.gpu.GPUDebuggerOSXSupport) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEOSXSupportCore.ideplugin (com.apple.dt.IDE.IDEOSXSupportCore) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEOSXSupportUI.ideplugin (com.apple.dt.IDE.IDEOSXSupportUI) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IBAppleTVBuildSupport.ideplugin (com.apple.dt.IDE.IBAppleTVBuildSupport) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEInterfaceBuilderAppleTVIntegration.ideplugin (com.apple.dt.IDE.IDEInterfaceBuilderAppleTVIntegration) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEInterfaceBuilderWatchKitIntegration.ideplugin (com.apple.dt.IDE.IDEInterfaceBuilderWatchKitIntegration) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEInterfaceBuilderWatchKitBuildSupport.ideplugin (com.apple.dt.IDE.IDEInterfaceBuilderWatchKitBuildSupport) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for GPUDebuggertvOSSupport.ideplugin (com.apple.dt.gpu.GPUDebuggertvOSSupport) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEAppleTVSupportUI.ideplugin (com.apple.dt.IDEAppleTVSupportUI) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEAppleTVSupportCore.ideplugin (com.apple.dt.IDEAppleTVSupportCore) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for DVTAppleTVSupportCore.dvtplugin (com.apple.dt.DVTAppleTVSupportCore) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for GPUDebuggeriOSSupport.ideplugin (com.apple.dt.gpu.GPUDebuggeriOSSupport) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEiOSPlatformSupportCore.ideplugin (com.apple.dt.IDEiOSPlatformSupportCore) not present
      2020-10-14 09:09:04.081 xcodebuild[59510:1676867] [MT] DVTPlatform: Required content for platform watchOS is missing.
      Domain: DVTFoundationErrorDomain
      Code: 4
      Recovery Suggestion: Please reinstall Xcode.
      --
      No Xcode.DVTFoundation.ExtendedPlatformInfo extension found for platform with identifier com.apple.platform.watchos
      Domain: DVTExtendedPlatformInfoErrorDomain
      Code: 2
      --
    xcodebuild : error : Initialization failed. [[...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]
      	Reason: Required content for platform watchOS is missing.
    xcrun : error : sh -c '/Applications/Xcode_11.7.0.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos -find metal 2> /dev/null' failed with exit code 17920: (null) (errno=No such file or directory) [[...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]
    xcrun : error : unable to find utility "metal", not a developer tool or in PATH [[...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]
    [...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj(385,5): error MSB3073: The command "xcrun -sdk iphoneos metal -c Resources/fragmentShader.metal -o obj/iPhone/Debug-unified//fragmentShader.air -mios-version-min=11.0" exited with code 72.
2020-10-14 19:19:00 +02:00
Rolf Bjarne Kvinge f3376541b5
[msbuild] Re-use existing code to launch processes. (#9858)
There was a race condition in the code that has been removed, which may have
caused actool to randomly hang at exit (https://github.com/xamarin/maccore/issues/1124).
Fix this by re-using existing code we have to launch processes.
2020-10-14 19:15:53 +02:00
Rolf Bjarne Kvinge e707fb691c
[dotnet] Remove workaround for mono/linker#1435, which has now been fixed. (#9863) 2020-10-14 15:13:46 +02:00
Manuel de la Pena ffd59b8b4a
[Mono] Bump mono to ca11fb0f to match Xamarin.Android. (#9849)
Commits:

  * mono/mono@ca11fb0fd8: [2020-02] Bump ikvm-fork to include https://github.com/mono/ikvm-fork/pull/20 (#20452)

Full diff: be2226b5a1...ca11fb0fd8
Related PR: https://github.com/xamarin/xamarin-android/pull/5194
2020-10-14 07:33:21 -04:00
Rolf Bjarne Kvinge f730014daf
[compare-commits] Ignore Publish.*.txt files when comparing generator output. Fixes #9852. (#9853)
Fixes https://github.com/xamarin/xamarin-macios/issues/9852.
2020-10-14 08:46:00 +02:00
Juan Marcelo Tondato e741262e90
[dotnet] Add some project capabilities. (#9840)
Visual Studio uses CPS to load SDK-style projects. In CPS, most things are keyed-off so-called capabilities[0] which replace other methods that were used previously like project type GUIDs.

While capabilities can be defined in the IDE, they make most sense to be directly expressed in the targets themselves where CPS will pick them up automatically.

[0] https://github.com/microsoft/VSProjectSystem/blob/master/doc/overview/about_project_capabilities.md
2020-10-14 08:43:46 +02:00
Manuel de la Pena ebc81460c9
[monotouch-test] Don't assert any specific value for the ReusedConnection value in UrlSessionTaskTransactionMetricsTest. Fixes #xamarin/maccore@2281. (#9660) (#9854)
Fixes https://github.com/xamarin/maccore/issues/2281.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-10-13 15:11:56 -04:00
Sebastien Pouliot 11aafadd86
[intro] check for duplicate or inconsistent availability attributes (#9825)
This can easily happen when existing type(s) or framework are added to a platform. E.g.

```csharp
[Watch (6,0)][iOS (9,0)]
interface AVFoo {
   [Watch (6,0)][iOS (13,0)]
   void NewMember ();
}
```

Here we have duplicate attributes and, while not confusing, it does mean extra (and non required) metadata into the platform assemblies.

```csharp
[Watch (6,0)][iOS (9,0)]
interface AVFoo {
   [Watch (5,0)][iOS (13,0)]
   void NewMember ();
}
```

Here we declare a member as available when the type is not. I'm not sure how the IDE will react - but this should be audited since one of them is wrong (whatever the IDE behaviour is).

Fix https://github.com/xamarin/xamarin-macios/issues/6856
2020-10-13 14:16:33 -04:00
Rolf Bjarne Kvinge 86cb7468b9
[tests] Fix ignoring dotnet tests when certain platforms have been disabled. (#9851)
Fixes an issue where some of the non-macOS dotnet tests where ignored because
the logic to disable the macOS ones were incorrect.
2020-10-13 17:55:20 +02:00
Filip Navara 5e79ca4f23
[dotnet] Avoid using install_name_tool on macOS and specify correct rpath instead (#9819)
* [dotnet] Avoid using install_name_tool on macOS and specify correct rpath instead

* Update Xamarin.Shared.Sdk.targets
2020-10-13 13:00:35 +02:00
Filip Navara 0c0662c46f
[dotnet] Remove workaround for F# projects (#9845)
Contributes to #8901. Issue dotnet/sdk#12954 was marked as fixed, the dotnet version was recently bumped to one that should contain the fix.
2020-10-13 09:21:33 +02:00
Rolf Bjarne Kvinge 80db37dca7
[msbuild] Set DEVELOPER_DIR to the Xcode we're using when calling ibtool. (#9836)
* [msbuild] Set DEVELOPER_DIR to the Xcode we're using when calling ibtool.

This fixes strange problems that occur when the system Xcode isn't the same as
the Xcode configured in Visual Studio for Mac, because we'd end up directly
launching VSMac's Xcode's ibtool, which would end up confused because it
wasn't the system ibtool.

Setting DEVELOPER_DIR tells VSMac's Xcode's ibtool that it's the system's ibtool.

* [msbuild] Set IBToolTask.SdkDevPath from the tests as well.

It's already set in the .targets files.
2020-10-13 09:15:04 +02:00
Rolf Bjarne Kvinge a40c21cd88
[msbuild] Don't use exceptions as control flow in CollectITunesArtworkTaskBase. (#9837)
* It's slow (because exceptions are way slower than just returning a value).
* It's annoying when debugging with breakpoints on exceptions.
2020-10-13 09:14:40 +02:00
Alex Soto 2a6320ba55
[tests] Fix macOS 11 intro/apitest (#9844)
* 'GKGameCenterViewController' init throws on macOS 11 and makes sense
  to remove the DefaultCtor since it has other init methods that
  should be used instead. Added XAMCORE_4_0 removal.

* 'ModelIO' seems to be broken in macOS 11.0, if you touch several
  types you end up getting some C++ errors

* 'CoreSpotlight.CSLocalizedString' crashes in Xcode 12.0 GM and now
  in Xcode 12.2 Beta 2 on macOS.

Added issues to check for future betas/GM here #9744
2020-10-12 13:37:22 -04:00
Alex Soto cb524b13a8
[introspection] Do not let intro check on QTKit now that is just stubs (#9843)
* [introspection] Do not let intro check on QTKit now that is just stubs

* Update ApiCtorInitTest.cs

* [QTKit] Fix more QT Tests

* Remove some more QT leftovers
2020-10-11 14:43:41 -04:00
monojenkins 3924a30c4b
[AppKit] Allow NSGraphicsContext.CurrentContext to be null (#9842)
- Fixes https://github.com/xamarin/xamarin-macios/issues/9827

Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2020-10-09 15:33:37 -05:00
Chris Hamons 05303cfec3
[AppKit] Allow NSGraphicsContext.CurrentContext to be null (#9838)
- Fixes https://github.com/xamarin/xamarin-macios/issues/9827
2020-10-09 13:44:34 -05:00
Rolf Bjarne Kvinge 54a553a900
[dotnet] Add storyboards and xibs to the our items included by default. (#9834) 2020-10-09 18:24:45 +02:00
Chris Hamons ee2eabe971
Bind CarTemplateApplication as part of UIWindowSceneSessionRole enum (#9811)
- https://github.com/xamarin/xamarin-macios/issues/9749
- See https://developer.apple.com/documentation/uikit/uiscenesessionrole?language=objc to see that Apple groups them together despite the name 

I did not test it in a full CarPlay app but this:
```
            return UISceneConfiguration.Create ("Default Configuration", UIWindowSceneSessionRole.CarTemplateApplication);

```

doesn't crash in Sim.
2020-10-09 09:50:51 -05:00
Filip Navara 5caec8986f
[dotnet] Default to static libxamarin.a builds on macOS (#9833)
This seems to match the default on classic mmp-based projects. It also avoids the relaunching of the app which can result in the UI not being displayed in front of other apps.
2020-10-09 16:41:59 +02:00
Rolf Bjarne Kvinge 9ade64930f
[msbuild] Move all the msbuild tests to tests/msbuild to put all the tests together. (#9824)
* [msbuild] Move msbuild/tests to tests/msbuild to put all the tests together.

* [tests] Move test projects for Xamarin.Mac to tests/common/TestProjects

* [tests] Move test projects for Xamarin.iOS to tests/common/TestProjects
2020-10-09 16:06:19 +02:00
Filip Navara d602cf76cf
[dotnet] Fix install name for libxamarin[-debug].dylib on macOS (#9821)
* [dotnet] Fix install name for libxamarin[-debug].dylib on macOS

* When using DYNAMIC_MONO_RUNTIME pass down the bundle directory in MONO_PATH to the relaunched process. Also fix support for custom bundle names in the surrounding code.

* Fix pattern matching
2020-10-09 14:55:00 +02:00
Rolf Bjarne Kvinge eb5733ab93
[msbuild] Remove some watchOS 1 code. (#9797) 2020-10-09 14:11:04 +02:00
Rolf Bjarne Kvinge 3d906e7000
[dotnet] Add support for 'dotnet build -t:run'. (#9823)
* Ship mlaunch in the iOS, tvOS and watchOS NuGets. It should probably go into
  a separate NuGet (to avoid shipping the same mlaunch executable in three different
  packages), but that can be done at a later stage.

* Add a GetMlaunchArguments task that computes the mlaunch arguments to install
  or launch an app in either the simulator or on device.

* Implement the MSBuild logic to make the Run target (provided by .NET) launch
  mlaunch (for iOS, tvOS and watchOS) or the built app (for macOS). This is done
  by setting the RunCommand and RunArguments properties (which the Run target uses)
  to the correct values.

Ideally I'd would make 'dotnet run' work too, but that runs into a different problem which
I haven't figured out yet:

    A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/dotnet/MySingleView/bin/Debug/net5.0-ios/ios-x64/'.
    Failed to run as a self-contained app.
      - The application was run as a self-contained app because '/Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/dotnet/MySingleView/bin/Debug/net5.0-ios/ios-x64/MySingleView.runtimeconfig.json' did not specify a framework.
      - If this should be a framework-dependent app, specify the appropriate framework in '/Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/dotnet/MySingleView/bin/Debug/net5.0-ios/ios-x64/MySingleView.runtimeconfig.json'.

That's for a different pull request though.

Ref: https://github.com/xamarin/net6-samples/issues/35.
2020-10-09 13:01:13 +02:00
Alex Soto 1efee685f9
[CoreGraphics] Update bindings to Xcode 12.2 Beta 2 (#9828) 2020-10-09 06:34:00 -04:00
Alex Soto ef7515d190
[Foundation] Update up to Xcode 12.2 Beta 2 (#9826)
* [Foundation] Update up to Xcode 12.2 Beta 2

* Update src/foundation.cs
2020-10-09 06:32:52 -04:00
Rolf Bjarne Kvinge caba0a66be
[msbuild] Move PathUtils.cs to tools/common so that other code can use it too. (#9801)
In particular the code to resolve symlinks and relative paths is useful.
2020-10-09 08:32:10 +02:00
Rolf Bjarne Kvinge 4b5be94592
[msbuild] Add SceneKit assets to our items included by default. (#9798)
* [msbuild] Add SceneKit assets to our items included by default.

There's a minor wrinkle here: we need to calculate the virtual path of the
SceneKit items (relative to the project), but for items included by default
their defining project is not the user's project, but our
Xamarin.Shared.Sdk.DefaultItems.targets file.

The solution is to add metadata for items included by default
('IsDefaultItem'), and if that's found when we calculate the virtual path, use
the executable project to calculate the virtual path, instead of the project
that defined the SceneKit items.

* [msbuild] Use a different temporary directory based on the platform.
2020-10-09 08:31:52 +02:00
Sebastien Pouliot c5a43ac2b7
[oslog] New framework in macOS 11 (#9820)
Fix https://github.com/xamarin/xamarin-macios/issues/9480
2020-10-08 16:33:03 -04:00
Alex Soto 340ab9f8cb
[HealthKit] Update bindings up to Xcode 12.2 Beta 2 (#9822) 2020-10-08 15:54:48 -04:00
Sebastien Pouliot 030e1476cd
[xcode12.2][qtkit] Stub removed API. Fix #7704 (#9815)
Xamarin.Mac only supports 64 bits - since the supported macOS and
Xcode have dropped 32bits last year.

QTKit headers were removed but we still had bindings code generated
and kept to avoid braking changes.

This is now replaced by stubs, which are a smaller (no code and less
metadata).

```
Current Xamarin.Mac.dll 23,990,784 bytes
QTKit-stubbed XM.dll    23,843,840 bytes
Difference                 146,944 bytes
```

reference: https://github.com/xamarin/xamarin-macios/issues/7704
2020-10-08 14:22:38 -04:00
Filip Navara 59db084141
Respect xamarin_executable_name on macOS if specified (#9803) 2020-10-08 18:23:39 +02:00
Sebastien Pouliot 8c174308c2
[photos] Update for Xcode 12.2 beta 2 (#9813) 2020-10-08 08:04:42 -04:00
Alex Soto d3d278e367
[CoreFoundation] Update bindings up to Xcode 12.2 Beta 2 (#9720)
* [CoreFoundation] Update bindings to Xcode 12.2

* Fix NRE

* Add tests for manual API

* Oops, fix spacing
2020-10-08 06:38:38 -04:00
Filip Navara 4f30a27f3a
[dotnet] Use correct relative path for install_name_tool on macOS (#9804)
* Use correct relative path for install_name_tool on macOS

* Replace hard-coded `MonoBundle` with $(_CustomBundleName)
2020-10-08 12:32:37 +02:00
Filip Navara e40974d414
Copy native executable to Contents/MacOS directory in the .app bundle for macOS platform (#9802) 2020-10-08 08:18:29 +02:00
Filip Navara 1e960b8780
Update GenerateMainStep to generate code compatible with libxamarin on macOS (#9799) 2020-10-08 08:09:40 +02:00
Alex Soto f85083b9ac
[xcode12.2] [maccore] Bump maccore to get CredScan fixes (#9810)
New commits in xamarin/maccore:

* xamarin/maccore@5e97cc52a4 [xcode12][CredScan] Avoid scanning src/cfnetwork.cs due to false positives (#2325)

Diff: ba332d4d07..5e97cc52a4
2020-10-07 22:22:32 -04:00
Sebastien Pouliot 97b25bb56f
[security] Update for Xcode 12.2 beta 2 (#9812) 2020-10-07 21:45:10 -04:00
Sebastien Pouliot 95c929e487
[mlcompute] Update for Xcode 12.2 beta 2 (#9806) 2020-10-07 20:25:17 -04:00
Alex Soto 30d01fbbb1
[xcode12] [maccore] Bump maccore to get CredScan fixes (#9809)
New commits in xamarin/maccore:

* xamarin/maccore@5e97cc52a4 [xcode12][CredScan] Avoid scanning src/cfnetwork.cs due to false positives (#2325)

Diff: ba332d4d07..5e97cc52a4
2020-10-07 20:04:37 -04:00
Alex Soto 3c11942a8a
[maccore] Bump maccore to get CredScan fixes (#9807)
New commits in xamarin/maccore:

* xamarin/maccore@6a86f16e0f [CredScan] Avoid scanning src/cfnetwork.cs due to false positives (#2323)

Diff: d1f2dfa9a9..6a86f16e0f
2020-10-07 19:47:38 -04:00
Alex Soto 3067564d05
[UIKit] Update bindings up to Xcode 12.2 Beta 2 (#9795) 2020-10-07 19:06:09 -04:00
monojenkins fc158cb67d
correct the nullability attributes for the Photos framework (#9805)
Co-authored-by: Ryan Pendleton <me@ryanp.me>
2020-10-07 16:51:55 -04:00