Add the following item templates for all platforms:
* Controller (View Controller with UI written in code)
* View
* View Controller (View Controller with UI written in XIB)
* Storyboard
Item templates won't show up in VSMac until this is released:
https://github.com/xamarin/vsmac/pull/9133.
Fixes https://github.com/xamarin/xamarin-macios/issues/15836.
Also update the template tests accordingly.
This PR might be easier to review commit-by-commit due to the large number of generated localization files.
Also make the build go into the tools/devops directory, which will run
shellcheck on the bash files. This also required fixing a couple of issues in
one of the bash scripts.
We currently don't use yamllint, but that's coming very soon.
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.
* 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 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.
* Don't load maccore/mk/versions.mk anymore, which means we're not checking
any subsequent dependencies listed in maccore. Note that we still need the
maccore dependency itself for a little while longer.
* Remove some outdated testing code that called into maccore.
* Don't recurse into the maccore directory during make.
* Remove some code checking for ENABLE_XAMARIN that's not used anymore, in
particular in xharness.
It's not used by anyone anymore, and there are better alternatives for .NET.
This removes a dependency on a private component, which makes a potential move
into the dotnet org easier.
Context: dotnet/runtime#68610
Context: https://github.com/xamarin/xamarin-android-tools/commit/0be567a9
In Mono and .NET prior to .NET 8, the
[`System.Environment.SpecialFolder`][0]`.Personal` enum value would refer to
`$HOME` on Unix platforms.
This will be changing in .NET 8, such that
`Environment.SpecialFolder.Personal` will instead refer to
`$XDG_DOCUMENTS_DIR` (if set) or `$HOME/Documents`. This is for "semantic
compatibility" with .NET on Windows.
Replace usage of `Environment.SpecialFolder.Personal` with
`Environment.SpecialFolder.UserProfile`, so that our code continues to work as
expected under .NET 8.
[0]: https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=net-6.0
Apple has deprecated bitcode, and will apparently reject app submissions
containing bitcode starting with Xcode 14. So automatically disable bitcode if
building using Xcode 14+ (and show a warning so that app developers can remove
the 'MtouchEnableBitcode' property from their project files).
Fixes https://github.com/xamarin/xamarin-macios/issues/15210.
Backport of #15804
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Add support for two new MSBuild item groups:
* CodesignBundle: lists additional app bundles inside the main bundle which should
be signed (typically manually copied into the app bundle by the developer).
* SkipCodesignItems: lists files we'd sign by default, but which shouldn't be signed.
Fixes https://github.com/xamarin/xamarin-macios/issues/15594.
This pull request updates the following dependencies
## From https://github.com/dotnet/runtime
- **Subscription**: 0f76eea3-d4b0-4229-e732-08d9ecb01c9c
- **Build**: 20220916.13
- **Date Produced**: September 17, 2022 2:53:53 AM UTC
- **Commit**: cdf48abd370f148a537960141f73769e678660e7
- **Branch**: refs/heads/release/6.0
- **Updates**:
- **Microsoft.NETCore.App.Ref**: [from 6.0.9 to 6.0.10][15]
- **Microsoft.NET.Workload.Emscripten.Manifest-6.0.100**: [from 6.0.9 to
6.0.10][16]
[15]: 531f715...cdf48ab
[16]: 3f6c45a...c3fc739
## 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.Workload.Emscripten.Manifest-6.0.100**: from 6.0.9 to
6.0.10 (parent: Microsoft.NETCore.App.Ref)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Add support for specifying custom entitlements with an MSBuild item group.
* Use this new support to automatically add the 'com.apple.security.cs.allow-jit'
entitlement to .NET desktop apps when building for release, since all apps that
go through notarization will need it in order to be able to use the JIT.
It's possible to override the default behavior by adding something like this to the project file:
<ItemGroup>
<CustomEntitlements Include="com.apple.security.cs.allow-jit" Type="Remove" />
</ItemGroup>
Fixes https://github.com/xamarin/xamarin-macios/issues/15745.
This is the behavior in legacy Xamarin (for mobile projects): if a project
contains a CodesignEntitlements=Entitlements.plist property, we require a
provisioning profile (and failing the build if none is found).
In .NET, the expected behavior is that if a file is in the project directory,
it should be detected automatically and handled accordingly. We didn't do this
for the initial release of .NET, but we implemented it later
(https://github.com/xamarin/xamarin-macios/pull/15729).
However, this turned out to be complicated, because many templates provide an
Entitlements.plist file, and now suddenly just the presence of such a file
would require a provisioning profile, which also means setting up the whole
rigmarole of Apple's certificates and provisioning profiles (and even
potentially getting a paid Apple Developer account).
This usually worked well in legacy Xamarin, because in templates only the
Release configuration would set the CodesignEntitlements=Entitlements.plist
property, and thus we'd only require a provisioning profile for release builds
(and the Entitlements.plist file would be ignored for Debug builds).
Here we change the default behavior when building for .NET so that we only
require a provisioning profile if the Entitlements.plist file is empty (i.e.
doesn't request any entitlements).
I've also implemented an override, where setting the
CodesignRequireProvisioningProfile=true property will override our default
logic.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1613459.
I always have to look through all the namespaces to figure out where a
specific test is, so this simplifies things a bit.
It's also where the tasks themselves are headed at some point.
This PR has the AVKit updates and introduces the AVRouting bindings that
are interconnected with AVKit
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
This will increase app size a little bit: the space for the MVID + 4 bytes for each
assembly, but we'll be able to validate and show a helpful error message if the generated
static registrar code does not match the assembly loaded at runtime.
It's also a step toward per-assembly static registration (ref: #12067).
Since executables in frameworks usually don't have dots, `%(Filename)` will be
the entire filename, because `%(Extension)` is empty. However, if the
executable happens to have a dot, then we need to include the extension:
`%(Filename)%(Extension)`.
Fixes https://github.com/xamarin/xamarin-macios/issues/15727.
* Add additional app extensions to the list of items we need to sign.
* Improve msbuild test for additional app extensions:
* Build for both device and simulator.
* Hopefully fix the signing problems that occurred on the bots last time we tried.
* Assert that both the container and extension are signed during the build when we build for device.
A 10-line fix with 3300 lines of tests...
Fixes https://github.com/xamarin/xamarin-macios/issues/15598.
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
**Note:** This PR is almost entirely of manual (but simple) bindings, and the documentation of these CG methods is non-existent. I had to add add MarshalAs and change pointers to IntPtr by hand, so please review carefully.
I wrote "did not crash/return null" manual tests, which I could improve upon if desired, but I'd have to re-learn some matrix math and figure out what each method does under the hood (Alex thought this would likely be fine).
A few important notes:
- CGAffineTransformComponents is in CoreFoundation as it was defined (but not used) in those API diffs. There is a define `CF_DEFINES_CGAFFINETRANSFORMCOMPONENTS` which allows CoreGraphics to declare it in the headers, but I'm assuming that is a hack for Apple.
- The headers/docs for kCGColorSpaceITUR_709_HLG lie and claim it's in older OS than it seems to be, so I assumed latest instead.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This avoids one case where we we embed metadata tokens to a different assembly
in the generated static registrar code.
This is required for supporting per-assembly static registration
(https://github.com/xamarin/xamarin-macios/issues/12067).
I introduced a breaking change to the FileProvider Xcode14 binding from adding a new abstract method to the NSFileProviderPendingSetEnumerator protocol. Instead, add this method to be a Xamcore_5_0 addition.
PR where issue was introduced found here: https://github.com/xamarin/xamarin-macios/pull/15777#issuecomment-1228664877
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
We used to do the following:
1. Have abstract task classes in the Xamarin.*.Task.Core assembly (with all
the actual code for the task in question to work properly on macOS).
2. Subclassed task in the Xamarin.*.Task assembly, which did nothing.
3. On Windows we'd inject a different Xamarin.*.Task assembly, with
Windows-specific overrides for the implementation in the abstract base
class.
However, we no longer do point 3, which means that we no longer need to split
our tasks across two assemblies.
This means that we can remove the Xamarin.\*.Task.Core assemblies, and move all
the code into the corresponding Xamarin.\*.Task assembly instead.
This simplifies our code and speeds up the build.
There are more simplifications that can be done; those will come in later PRs.
NuGet seems to struggle with the network on the bots for this particular test,
so ignore the test if there are any nuget failures.
Fixes https://github.com/xamarin/maccore/issues/2612.
* Update dependencies from https://github.com/dotnet/runtime build 20220727.6
Microsoft.NETCore.App.Ref
From Version 6.0.8 -> To Version 6.0.8
* Update dependencies from https://github.com/dotnet/runtime build 20220727.6
Microsoft.NETCore.App.Ref
From Version 6.0.8 -> To Version 6.0.8
* Update dependencies from https://github.com/dotnet/runtime build 20220813.7
Microsoft.NETCore.App.Ref
From Version 6.0.8 -> To Version 6.0.9
Dependency coherency updates
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.4 -> To Version 6.0.8 (parent: Microsoft.NETCore.App.Ref
* Update dependencies from https://github.com/dotnet/runtime build 20220815.11
Microsoft.NETCore.App.Ref
From Version 6.0.8 -> To Version 6.0.9
Dependency coherency updates
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref
* Update dependencies from https://github.com/dotnet/runtime build 20220816.8
Microsoft.NETCore.App.Ref
From Version 6.0.8 -> To Version 6.0.9
Dependency coherency updates
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref
* Update dependencies from https://github.com/dotnet/runtime build 20220819.3
Microsoft.NETCore.App.Ref
From Version 6.0.8 -> To Version 6.0.9
Dependency coherency updates
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref
* [tests] Adjust InvalidRuntimeIdentifier_Restore to expect failure for Mac Catalyst.
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Update dependencies from https://github.com/dotnet/installer build 20220807.1
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22407.1
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220808.5
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22408.5
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220809.23
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22409.23
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220810.15
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22410.15
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220812.1
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22412.1
Dependency coherency updates
Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22411.2 (parent: Microsoft.Dotnet.Sdk.Internal
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220813.1
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22413.1
Dependency coherency updates
Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22412.1 (parent: Microsoft.Dotnet.Sdk.Internal
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220814.7
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22414.7
Dependency coherency updates
Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22412.1 (parent: Microsoft.Dotnet.Sdk.Internal
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220816.2
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22416.2
Dependency coherency updates
Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22415.1 (parent: Microsoft.Dotnet.Sdk.Internal
* Re-generate global.json
* Update dependencies from https://github.com/dotnet/installer build 20220817.1
Microsoft.Dotnet.Sdk.Internal
From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.2.22417.1
Dependency coherency updates
Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22415.4 (parent: Microsoft.Dotnet.Sdk.Internal
* Re-generate global.json
* [dotnet] Include the 'marshal-ilgen' component. Fixes#15668.
Fixes https://github.com/xamarin/xamarin-macios/issues/15668.
* [dotnet] Enable serialization discovery in the linker. Fixes#15676.
Fixes https://github.com/xamarin/xamarin-macios/issues/15676.
* [tests] Make the dont link tests actually not link for macOS.
* [tests] The 'trimmode copy' test needs an adjustment after recent linker changes.
* [dotnet] Don't set a default 'TrimMode' value.
We already compute a TrimMode value depending on other properties
(MtouchLink/LinkMode - or a default value if those aren't set), and the logic
to compute the default value is not executed if we set a TrimMode default (because
TrimMode overrides any MtouchLink/LinkMode values).
* [tests] Workaround a bug in 'dotnet build'.
Workaround a bug in 'dotnet build' where escaping semicolons interferes with
our ability to pass RuntimeIdentifiers to the build on the command line.
* [dotnet] Update expected bundle contents according to updated runtime.
* [tests] Update expected error message texts.
* Bump to RC 2.
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Starting Xcode14 changes for PassKit Beta 123
* use protocol correctly, ignore conformance
* make suggested changes
* add the abstract to the ignore files
* removing disabledefaultctor
* remove empty todo files
* use manual file for same type constructors and beta changes
* adjust apiselector test
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
* [xcode14] Bump to latest Xcode 14 Beta 5
* [CloudKit] Fix cloudkit intro on tvOS
* Revert "[Tests] Fix an monotouch-test test that landed broken. (#15503)"
This reverts commit 161de84bcf.
* Update tools/common/StaticRegistrar.cs
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
* Fix typo
* [CHIP] Tell our drivers to not link CHIP at all
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Fixes these compiler warnings:
xamarin-macios/src/ObjCRuntime/ErrorHelper.cs(22,17): warning CS0436: The type 'ProductException' in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../../tools/common/error.cs' conflicts with the imported type 'ProductException' in 'Xamarin.iOS.Tasks, Version=15.11.0.465, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Using the type defined in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../../tools/common/error.cs'. [xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj]
xamarin-macios/tools/common/error.cs(10,34): warning CS0436: The type 'ErrorHelper' in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../common/ErrorHelper.tests.cs' conflicts with the imported type 'ErrorHelper' in 'Xamarin.iOS.Tasks, Version=15.11.0.465, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Using the type defined in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../common/ErrorHelper.tests.cs'. [xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj]