For NSArray, implement:
* A ToArray () method that returns an NSArray[].
* A ToArray<T> () method that returns a T[].
* The IEnumerable<NSObject> interface.
For NSArray<T>, implement:
* A ToArray () method that returns a T[].
This should make NSArray much better to work with from managed code.
We have four branches that test releasing a single platform:
release/release-test-only-dotnet-$platform
In these branches, only the given platform is enabled (these are also
.NET-only branches), with the idea that we're testing the build and publish of
a single platform. These branches have a 'release/' prefix, so that the go
through as much as possible of our release pipeline.
Hopefully by testing and making sure the following builds and publishes correctly:
* All platforms (the default for our build)
* Each platform by itself
Building and publishing more than one (but less than all four) platforms also
work.
This PR will automatically update these four branches from main every
Saturday, so that we'll be able to find and fix any problems that occur before
release date.
actions/github-script was recently updated from 3.1.0 to 6.3.1 (69de14c668), but unfortunately there were breaking changes:
* https://github.com/actions/github-script#breaking-changes
* https://github.com/actions/github-script/issues/242#issuecomment-1049167283
This would manifest as:
TypeError: Cannot read properties of undefined (reading 'listWorkflowRunArtifacts')
Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'listWorkflowRunArtifacts')
at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13340:16), <anonymous>:3:38)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13341:12)
at main (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13436:26)
at Module.858 (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13413:1)
at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:24:31)
at startup (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:43:19)
at /home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:49:18
at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:52:10)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
So update our code to to use the new way to do things.
Fixes an issue where we'd end up trying to link with the managed assembly instead:
> ld: warning: ignoring file .../bin/Debug/net6.0-ios/MyBinding.dll, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0xFF 0xFF 0x00 0x00 )
Also add a warning if we run into other types of libraries in the future to
make it easier to diagnose.
This change splits the signing of the pkgs so that we can have botnet
pkgs as early as possible without needing to wait for the legacy ones to
be completed, this will allow to do VS insertions earlier.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Bumps [actions/github-script](https://github.com/actions/github-script) from 3.1.0 to 6.3.1.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The SensorKit framework isn't available on all devices (for instance iPads),
and as such we can't link with it strongly.
This seems to be a bug in Apple's toolchain, because Xcode runs into the same
problem if you try to use an app referencing SensorKit on an iPad.
Fixes https://github.com/xamarin/xamarin-macios/issues/9938.
We have some problems when autoformatting PRs and the PR branch isn't fully
up-to-date with regards to the target branch.
I believe this is what happens:
1. When a PR is created (or modified), GitHub Actions will merge the PR branch
with the target branch, and parse/load the merged *.yml files.
2. Then when we run the autoformatter, we're working on the tip of the PR
branch (and not the merged result).
3. This means that we were using the list of projects to autoformat from the
merged branch, but exeuting on the PR branch. This resulted in spurious
autoformatting, because the autoformatted would autoformat more code than
expected.
The fix I'm implementing is to move the list of projects to autoformat to a
separate script in source code. That way we'll work upon the list of projects
as they show up in the PR branch, and not the merged results.
When a property is declared as ArgumentSemantic.Copy, we'll copy the
input value in property setters.
Unfortunately this makes UIKit crash, because for
UITextField.SelectedTextRange UIKit might use a custom UITextRange
subclass,
with a broken 'copy' implementation (doesn't copy all the fields), that
subsequently makes the app crash.
On the other hand, UITextRange doesn't conform to NSCopying, and as such
is in
theory not necessarily copyable, and thus I believe the bug is really
that the
property is declared as a 'copy' property.
Fixes https://github.com/xamarin/xamarin-macios/issues/15677.
* Change EnumerateGateways to use the 'static_EnumerateGatewaysHandler'
callback. It looks like this was a c&p error, since the
'static_EnumerateGatewaysHandler' callback was implemented, just never
referenced anywhere.
* Add an overload to EnumerateGateways and EnumerateInterfaces that takes a
callback that returns a bool indicating whether the enumeration should
continue. This mirrors the native API.
* Obsolete the EnumerateGateways and EnumerateInterfaces overloads that take a
void callback (and remove in XAMCORE_5_0).
* Add a test for EnumerateGateways that works (the previous failed, but never
asserted the failure, so it would just silently time out).
Fixes https://github.com/xamarin/xamarin-macios/issues/13772.
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.AspNetCore.App.Ref**: from 7.0.0-rtm.22477.1 to 7.0.0-rtm.22479.3 (parent: Microsoft.Dotnet.Sdk.Internal)
## From https://github.com/dotnet/installer
- **Subscription**: fa8142cc-91f4-4845-3384-08da5a845ad2
- **Build**: 20220929.5
- **Date Produced**: September 30, 2022 2:50:41 AM UTC
- **Commit**: eb23d8cf9a11fd44bf8b07adf508bac6a9eae423
- **Branch**: refs/heads/release/7.0.1xx
- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.100-rtm.22478.24 to 7.0.100-rtm.22479.5][1]
- **Microsoft.AspNetCore.App.Ref**: [from 7.0.0-rtm.22477.1 to 7.0.0-rtm.22479.3][2]
[1]: 8153d0b...eb23d8c
[2]: 931abe3...02d62cf
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 7.0.100-1.22452.1 to 7.0.100-1.22471.3 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.AspNetCore.App.Ref**: from 7.0.0-rtm.22466.18 to 7.0.0-rtm.22477.1 (parent: Microsoft.Dotnet.Sdk.Internal)
## From https://github.com/dotnet/installer
- **Subscription**: fa8142cc-91f4-4845-3384-08da5a845ad2
- **Build**: 20220928.24
- **Date Produced**: September 29, 2022 2:53:36 AM UTC
- **Commit**: 8153d0b879cf60de1e8ffaecf08c3e5595855de8
- **Branch**: refs/heads/release/7.0.1xx
- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.100-rtm.22476.1 to 7.0.100-rtm.22478.24][4]
- **Microsoft.NET.ILLink.Tasks**: [from 7.0.100-1.22452.1 to 7.0.100-1.22471.3][5]
- **Microsoft.AspNetCore.App.Ref**: [from 7.0.0-rtm.22466.18 to 7.0.0-rtm.22477.1][6]
[4]: 9d07ef4...8153d0b
[5]: 5f9bfd9...219e84c
[6]: 282f781...931abe3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
This way XVS will copy the corresponding file to the mac during a build.
Fixes this error:
Target Name=_DetectSigningIdentity
Project=C:\Users\admin\source\repos\iOSApp4\iOSApp4\iOSApp4.csproj
DetectSigningIdentity
Assembly = C:\Program
Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.515\tools\msbuild\iOS\..\iOS\Xamarin.iOS.Tasks.dll
Parameters
AppBundleName = iOSApp4
BundleIdentifier = com.companyname.iOSApp4
CodesignEntitlements = Entitlements.plist
RequireCodeSigning = False
SdkIsSimulator = True
SdkPlatform = iPhoneSimulator
SessionId = ...
TargetFrameworkMoniker = .NETCoreApp,Version=v6.0,Profile=ios
DetectSigningIdentity: 2022-09-28T04:17:13.3947732-07:00 - Started
DetectSigningIdentity: 2022-09-28T04:17:13.3947732-07:00 - Initializing
[xma][info]: Trying to get a Build Connection for Session '...':
Xamarin.Messaging.Build.Client.BuildConnection...., Lifetime: AppDomain
DetectSigningIdentity: 2022-09-28T04:17:13.3947732-07:00 - Initialized
DetectSigningIdentity: 2022-09-28T04:17:13.3957722-07:00 - There's no
available inputs to copy to the Mac
DetectSigningIdentity: 2022-09-28T04:17:13.3957722-07:00 - Serializing
intputs
DetectSigningIdentity: 2022-09-28T04:17:13.4077719-07:00 - Executing
[xma][info]: Starting remote task execution for 'iOSApp4':
Xamarin.MacDev.Tasks.DetectSigningIdentity
[xma][info]: Sending Request
Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic
xvs/build/execute-task/iOSApp4/01e0050002fDetectSigningIdentity
[xma][err]: An error occurred on the receiver while executing a post for
topic xvs/build/execute-task/iOSApp4/01e0050002fDetectSigningIdentity
and client
build01e0050ee064bdc5af5fe8d051898268699b25ed1eeec849023e711753e8d82d6484admin
[xma][info]: An error occurred while executing the operation. The Build
Server connection is active and running so no retries will be attempted.
Errors
C:\Program
Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.515\tools\msbuild\iOS\Xamarin.Shared.targets(1699,3):
MessagingRemoteException: An error occurred on client Build while
executing a reply for topic
xvs/build/execute-task/iOSApp4/01e0050002fDetectSigningIdentity
FileNotFoundException: Could not find file
"/Users/vstester/Library/Caches/Xamarin/mtbs/builds/iOSApp4/.../Entitlements.plist"
[C:\Users\admin\source\repos\iOSApp4\iOSApp4\iOSApp4.csproj]
DetectSigningIdentity: 2022-09-28T04:17:13.4631033-07:00 - Finished
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1635214.