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

14 Коммитов

Автор SHA1 Сообщение Дата
Alex Soto 2e5ef1eb1c
[xcode15.3] Bump to Xcode 15.3 bindings (#20780)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2024-07-11 11:41:31 +02:00
Manuel de la Pena b73cb11dc1
[Foundation] Add support for Xcode 15 beta 7. (#19007)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-10-17 11:27:20 -04:00
Alex Soto 9c9a2beb72 [Xtro] Update ginore/todo files for Xcode 15. 2023-08-04 11:47:28 -04:00
JonnHard d1d3dcdf68
Add getFileProviderConnectionWithCompletionHandler signature to start… (#18533)
… supporting XPC on File Provider instance

File Provider Service can act as an standalone XPC that you can
establish the connection with.
To open up the capability this new signature has to be exposed

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-07-20 10:39:08 -04:00
Rolf Bjarne Kvinge cb6f555665 Merge main into xcode14.1. 2022-10-17 11:35:33 +02:00
Rolf Bjarne Kvinge 05939b5e86
[xtro] Don't allow entries in 'common' ignore files that aren't actually common to all platforms for a given framework. Fixes #12769. (#16342)
This makes it possible to run xtro consistently when not all platforms are
enabled.

Fixes https://github.com/xamarin/xamarin-macios/issues/12769.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-10-14 09:29:59 +02:00
Chris Hamons 3c359f5838
[foundation] Xcode 13 & Xcode 14 beta 1-3 bindings (#15579)
- Xcode 13 section Based upon https://github.com/xamarin/xamarin-macios/pull/13328- 
- Some disabled due to https://github.com/xamarin/maccore/issues/2608
2022-08-01 10:22:39 -05:00
Rolf Bjarne Kvinge d1b5507111
[xtro] Skip numerous validations for deprecated API. (#13383)
There are numerous checks that don't make much sense to report for deprecated
API, so skip those. This also required updating a few .ignore and .todo files.
2021-11-18 16:26:30 +01:00
Rolf Bjarne Kvinge 6a40d45337
[AppKit/Foundation] Numerous API adjustments. (#12243)
* Merged a MonoMac-only version of NSMutableCharacterSet + a non-MonoMac version
  of NSMutableCharacterSet into a single definition.
* Add a few [NullAllowed] where new API triggered xtro warnings (I either had to
  add more ignores to xtro, or fix the issues - I decided to fix the issues).
* Remove numerous "#if MONOMAC" blocks and switched to availability attributes.
* Merged a MonoMac-only list of NSWindow fields and a non-MonoMac list of NSWindow
  fields into a single definition (which was quite useless because NSWindow is only
  present on macOS, so the non-MonoMac list was just dead code). 
* Misc other availability attribute additions/fixes.
2021-07-28 09:18:48 +02:00
Sebastien Pouliot 8d3987b84a
[xtro][bindings] Add xtro support for nullability and fix some bindings (#8335)
Enabling this will ensure that future bindings (and Xcode updates that
change nullability information) are spotted right away.

The binding fixes are **not** complete, i.e. what was done was mostly
to debug the xtro rule and find corner cases. The backlog will be
_ignored_ so the builds won't fail.
2020-04-10 11:00:47 -04:00
William Kent 8425129eeb Add bindings for NSXpcConnection and related types (#7001)
* Add bindings for NSXpcConnection and related types

* Re-add accidentally deleted file

* Typo fix

* Add NSXpcInterface.CreateForType()

* Add MethodInfo-taking overloads to NSXpcInterface

* Add null check

* Mark methods with wrappers as internal

Also fixed a formatting bug that I didn't catch earlier.

* Change NSXPCProxyCreating methods to be strongly typed

I got rid of the NSXpcProxyCreating interface in this change,
because its only user was NSXpcConnection, and I needed to
inline the protocol methods into the class definition so I
could mark them as [Internal].

* Add missing casts

* Add NSXpcConnectionOptions enum

* Convert NSXpcConnection constructor to use new enum

* Remove now-unneeded manual constructor

* Fix bgen warning

* Typo fix

* Fix selector

* Remove incorrect use of BindAsAttribute

Per the docs, this only works for enums backed
by NSNumber and NSValue, not for enums
passed directly as integers.

* Fix duplicated selector errors

* Throw ArgumentException instead of InvalidOperationException

* Extend AppExtension targets to produce XPC services

Rather than create an entirely new set of targets
(that would require VS and VSMac updates to properly
consume), I have decided to use the existing AppExtension
build targets to produce XPC services as well. All the
user must do is set the $(IsXPCService) property to true in
their project file, and the targets will do The Right Thing™.

Note that this support is Mac-only for now; I may need a bit
of help adjusting them to work on for iOS/watchOS/tvOS, as I
am not as familiar with those platforms.

* Copy XPC service bundles into the correct location

* Move IsXPCService property definition to props file

* Don't pass /extension to mmp for XPC service targets

This would cause the XPC service binary to
be linked incorrectly.

* Add NSXpcConnection/NSXpcInterface.cs files to the build

* Fix build

* Fix build

* Add required type parameter requirements

* Fix type parameter requirements

* Fix return type

* Fix return type of NSXpcInterface.CreateForProtocol ()

* Take ownership of the returned object types

* Adjust XPC service mmp invocation

I need to link the XPC service bundle as if it is an app extension, but
I must not use xamarin_mac_extension_main. I added a new flag to make
this possible.

* Change mmp to correctly construct XPC service bundle

* Set the MonoBundleExecutable Info.plist key for XPC services

* Use the runtime to get the protocol

* Make NSXpcInterface.CreateForProtocol() public

The static registrar must be used for Cocoa to accept the protocol
as a valid XPC interface, but that then seems to break resolving
the protocol from the type. I must therefore hard-code the protocol
name in my code, and that requires I make this constructor public.

* Add XpcInterfaceAttribute

See the doc comment in XpcInterfaceAttribute.cs for why
this type is required. The referenced mmp optimizations
will be added in future commits.

* Add XpcInterfaceAttribute to generator build

* Add support for XpcInterfaceAttribute to the generator

* Force static generation of protocols decorated with XpcInterfaceAttribute

* Change how static registrar translates block parameters

Previously, they would always be marshalled as "id".
This would throw off the XPC subsystem, which parses
the block signature to determine the communication
protocol.

* Undo whitespace noise

* Remove unneeded casts

* Add trailing comma

* Use HasAttribute instead of GetCustomAttribute

* Fix style issues

* Bind NSXpcConnection.auditSessionIdentifier

* Address naming feedback

* Make Get/SetAllowedClasses public

IMHO, passing the selector as a string is just as
usable as passing a MethodInfo, and is also less
verbose if you copy/paste the selector string
from the ExportAttribute. There is no reason why
we cannot have both overloads be public.

* Update overload names to match

* Update more overload names to match

* Make mmp --xpc imply --extension

* Reformat if statement

* Fix build

* Conditionalize creation of PlugIns and XPCServices directories

* Add AutoGeneratedName

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Get rid of ProtocolizeAttribute

* Update availability attributes to please xharness

I actually think xharness is wrong here, since the
NSXPCConnection header lists these types as being
available starting in macOS 10.8.

* Update sharpie ignore files to reflect changes

This should fix the xtro-sharpie test failures CI has been reporting.

* Fix MM4105 error generation

* Adjust error message in test to match mmp

I had to change the error text slightly, because the type of the parameter
cannot be determined where the error is thrown anymore. However, the newer
exception message IMO is just as clear.

* Make exception message match test exactly

* Remove outdated copyright header text

* Remove more outdated copyright header text

* Revert changes to MM4105 error generation

I have a more elegant way of fixing this test now.

* Return "id" if Invoke method cannot be found

This fixes the MM4105 error unit test,
without requiring modification to that test.

* Remove redundant availability attributes

* Add DesignatedInitializerAttribute

* Re-add required code to macOS-Foundation.ignore

* Put DesignatedInitializer on the right constructor

* Update xtro-sharpie ignore files
2019-10-22 15:38:01 +02:00
Sebastien Pouliot 52d0483bfe
[foundation] Remove iOS 5.0.1 specific code from NSFileManager (#3167)
This was short-lived (changed in iOS 5.1) and it's now below our
minimum support (iOS 6)
2018-01-05 15:01:15 -05:00
Sebastien Pouliot 3ea8ad4041
[tests][xtro] Annotation update (#3143) 2018-01-02 08:18:32 -05:00
Sebastien Pouliot 8d854a0f3d
[xtro] Split results by framework and add an HTML report (#3093)
* Not every old annotations have been migrated (work in progress, to be completed in another PR);

* Sanitation of the data files (e.g. removal of dupes and fixed, by Apple, entries) is done, but not automated (also a work in progress)

Even then this is immediately useful, i.e. better merged before 15.6 gets branched.
2017-12-15 14:08:09 -05:00