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

47 Коммитов

Автор 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 9d259a539d
[monotouch-tests] Fix HK tests on sonoma. (#19446)
Before this commit we had the following failing test:

```
Error: Exception Message
Expected: String matching "Objective-C exception thrown. Name: _HKObjectValidationFailureException Reason: Type HKSample can not have endDate of NSDate.distantFuture"
But was: "Objective-C exception thrown. Name: _HKObjectValidationFailureException Reason: startDate (0001-01-01 00:00:00 +0000) and endDate (4001-01-01 00:00:00 +0000) exceed the maximum allowed duration for this sample type. Maximum duration for type
```

The new exception does not happen on macOS but does on iOS.
2023-11-14 11:15:13 -05:00
Haritha Mohan ae6ef4af3e
[HealthKit] Add support for Xcode 15 beta 7 (#18927)
Looking into a intro failure on iOS: Selector not found for
HealthKit.HKHealthStore : workoutSessionMirroringStartHandler in
System.Action`1[HealthKit.HKWorkoutSession]
get_WorkoutSessionMirroringStartHandler() on HealthKit.HKHealthStore

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@soto.dev>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-11 08:40:52 -07:00
GitHub Actions Autoformatter a845018772 Auto-format source code 2023-08-04 11:47:29 -04:00
Manuel de la Pena 814d84cf63 [Tests] Fix healthkit tests for xcode 15. 2023-08-04 11:47:29 -04:00
Rolf Bjarne Kvinge 9e2143032f
Use Enum.GetValues<T> instead of Enum.GetValues in numerous places for .NET. (#18382)
NativeAOT warns about Enum.GetValues and suggests using Enum.GetValues<T>
instead, so do just that.
2023-06-07 08:47:55 +02:00
dustin-wojciechowski 3eeb7691dc
Add ventura to mac tests configurations (#17349)
Added Ventura machines to macTestConfigurations within both the
build-ci-pipeline and the build-pr-pipelines.

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-02-13 11:08:18 -05:00
Rolf Bjarne Kvinge 0140122668
[autoformat] Add the Security, SensorKit, Social, SpriteKit, StoreKit, SystemConfiguration, TVServices, VideoToolbox, Vision and WKWebKit frameworks. (#16763) 2022-11-16 07:38:18 +01:00
Rolf Bjarne Kvinge f4bfa0d0bb
[monotouch-test] Update QuantityTypeIdentifier.EnumValues_22351 after recent API additions. Fixes #16443. (#16498)
Fixes https://github.com/xamarin/xamarin-macios/issues/16443.

Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-10-28 09:49:34 +02:00
TJ Lambert 7bd98383e1
[HealthKit] Update bindings for Xcode 14 beta 1-4 (#15612)
This one has been a toughy 😮‍💨
@mandel-macaque I am creating the draft PR and here is a gist with the MacModern failures that you mentioned you would take a closer look at: https://gist.github.com/tj-devel709/24f5c63d4b698a0e2387524a0d2666c6

There were also monotouch-test failures that seem to be related to enabling mac that I could use some help with as well.

Lastly, @chamons there was a failing Cecil test regarding ios in DidGenerateEvent method found here: https://gist.github.com/tj-devel709/2c8aee7325c0c2751e29269d3eb77fef. I did not touch this method so I am not sure why this would be a problem.
Here is the Cecil failure: https://gist.github.com/tj-devel709/cfb2576c75de2ee100a8f2b7ee6e3923

Thanks for the help!

Edit *: Issues mentioned in the code comments
https://github.com/xamarin/maccore/issues/2609
https://github.com/xamarin/maccore/issues/2610

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-09-01 10:24:35 -05:00
TJ Lambert 6dc0eed0a8
[healthkit] Add nullability to (generated and manual) bindings (#14730)
* remove null ignores and add nullability

* throw better exception

* use is null

* remove extra ignores

* Add the tests

* use a progma ignore instead

* revert monotouch-test.csproj

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-04-28 11:54:23 -05:00
Rolf Bjarne Kvinge 2af5fc3c56
[monotouch-test] Attempt to fix monotouch-tests on macOS 10.15. (#14520) 2022-03-29 07:51:40 +02:00
Rolf Bjarne Kvinge c98a6d01cc
[HealthKit] Add this framework to Mac Catalyst. (#14312) 2022-03-09 18:18:48 +01:00
Rolf Bjarne Kvinge b1ce33ba51
[Foundation/ObjCRuntime] Use 'ObjCException' as the native exception type name for all platforms in .NET. Fixes #13855. (#13915)
* Use 'ObjCException' instead of 'MonoTouchException' as the managed exception
  type wrapping an NSException for all platforms in .NET (that was already the
  case for macOS, so no change there).
* Make the ObjCException class behave like the MonoTouchException class does.
* Move the ObjCException type to the ObjCRuntime namespace in .NET.

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

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-02-01 17:24:57 +01:00
Rolf Bjarne Kvinge d8c2e5e040
[HealthKit] Adopt XAMCORE_4_0 changes in .NET. (#13968) 2022-01-31 16:57:26 +01:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge d506a13466
[monotouch-test] Teach HealthKit tests about new HKQuantityTypeIdentifiers/HKCategoryTypeIdentifiers. (#12317)
Fixes these test failures:

    MonoTouchFixtures.HealthKit.CategoryTypeIdentifier
    	[FAIL] EnumValues_22351 : AppleWalkingSteadinessEvent could not be created: System.ArgumentNullException: Value cannot be null.
    Parameter name: hkCategoryTypeIdentifier
      at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x00003] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:27
      at HealthKit.HKObjectType.GetCategoryType (Foundation.NSString hkCategoryTypeIdentifier) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/HealthKit/HKObjectType.g.cs:111
      at HealthKit.HKCategoryType.Create (HealthKit.HKCategoryTypeIdentifier kind) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/HealthKit/HKObjectType.cs:26
      at MonoTouchFixtures.HealthKit.CategoryTypeIdentifier.EnumValues_22351 () [0x001fd] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs:115
      at MonoTouchFixtures.HealthKit.CategoryTypeIdentifier.EnumValues_22351 () [0x0024f] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs:120

    MonoTouchFixtures.HealthKit.QuantityTypeIdentifier
    	[FAIL] EnumValues_22351 : AppleWalkingSteadiness could not be created: System.ArgumentNullException: Value cannot be null.
    Parameter name: hkTypeIdentifier
      at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x00003] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:27
      at HealthKit.HKObjectType.GetQuantityType (Foundation.NSString hkTypeIdentifier) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/HealthKit/HKObjectType.g.cs:162
      at HealthKit.HKQuantityType.Create (HealthKit.HKQuantityTypeIdentifier kind) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/HealthKit/HKObjectType.cs:19
      at MonoTouchFixtures.HealthKit.QuantityTypeIdentifier.EnumValues_22351 () [0x0017a] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs:87
      at MonoTouchFixtures.HealthKit.QuantityTypeIdentifier.EnumValues_22351 () [0x001cc] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs:92

Also make these tests show all failing enum values at once, instead of having
to run the test after adding each new case.
2021-08-02 17:41:51 +02:00
Manuel de la Pena dab0f2ed9a
[HealthKit] Add support for xcode13 beta4. (#12184) 2021-07-29 11:11:39 -04:00
Rolf Bjarne Kvinge abb7d1f6b6
[monotouch-test] Ignore HKQuantityTypeIdentifier.AppleMoveTime on iOS versions where it didn't exist. (#11765)
It was introduced with Xcode 12.5, so ignore it on earlier OS versions.

Partial fix for #11504.
2021-06-02 07:39:34 +02:00
Sebastien Pouliot a0634460ce
[catalyst] Remove more framework that are not available on catalyst (#10678)
Follow up to https://github.com/xamarin/xamarin-macios/pull/10658

This includes a `.ctor` chaining fix for the forwarder tool which
resulted in several errors like:

```
build/dotnet/maccatalyst/ref/Xamarin.iOS.cs(12640,17): error CS1729: 'UIScene' does not contain a constructor that takes 0 arguments
```

There's two different issues blocking ARKit and AddressBookUI that
will be solved in different PR.

When used with Xamarin.MacCatalyst we must still consider Xamarin.iOS.dll
as a platform assembly (and not user code) so the linker will remove more
code (that usual).

This is even more important as the stubs are unusable - so we do not want
to keep any extra pieces there since they would not work anyway.
2021-02-23 09:11:14 -05:00
Rolf Bjarne Kvinge aa1bf71cd6 [monotouch-test] Make it work with Mac Catalyst.
* Fix system version checks to work properly on Mac Catalyst (which uses the macOS
  version as its system version).

* Add the framework-specific defines to the build for monotouch-test.csproj (using
  the generated response files), this way we can use them in the tests.

* Sprinkle conditionals in numerous places - I tried using either framework-specific
  or XAMCORE_3_0 whenever that made since (instead of using Mac Catalyst as a condition).

* Updated a few tests to use non-deprecated API (because the deprecated API often
  doesn't exist in Mac Catalyst).

* Also a few minor API fixes to make any corresponding tests compile.
2021-01-15 17:52:28 +01:00
Rolf Bjarne Kvinge 48080d2d03
[monotouch-test] Add version checks for new HKCategoryTypeIdentifier fields. (#10424) 2021-01-15 08:24:29 +01:00
Manuel de la Pena dcb0c93ab0 [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Rolf Bjarne Kvinge f516fcfb07 [tests] Use the Does.[BeginWith|Contain|EndWith] constraints instead of the Is.[StringStarting|StringContaining|StringEnding] constraints.
The latter don't exist in the official NUnitLite anymore.
2020-08-03 11:53:17 +02:00
Whitney Schmidt c999bd5f57
[HealthKit][Xcode12] Update beta 1 (no b2, b3 changes) (#9249)
* HealthKit updates for Xcode12
2020-07-30 16:41:38 -04:00
Whitney Schmidt 8fc88096ad
Revert "[Xcode12] HealthKit b1 update (#9152)" (#9217)
This reverts commit 74e8421f2c.
2020-07-28 14:04:31 -04:00
Whitney Schmidt 74e8421f2c
[Xcode12] HealthKit b1 update (#9152)
* HealthKit updates for beta 3
2020-07-28 14:03:56 -04:00
Alex Soto ac42dad8de [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-26 18:27:06 -04:00
Alex Soto 10059f1add [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-22 15:44:42 -04:00
Rolf Bjarne Kvinge 2995cd086a
[tests] Update tests to make native type vs normal type comparison explicit (#9097)
We've modified our NUnitLite to special-case the native types, so that they
can easily be compared with the standard types, but that doesn't work anymore
when switching to the official NUnit[Lite], so change all asserts to
explicitly convert whenever needed.
2020-07-17 08:48:09 +02:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Whitney Schmidt 7b63a38698
[HealthKit] updates for beta 1 - beta 4 xcode11 (#6692)
* healthkit b1-b3 updates

* fixes for first round of comments

* remove whitespace noise

* move hkcategorytype enums

* update mono-touch tests, remove [designatedinitializer] attr

* alex nit fixes

* fix formatting for [Deprecated]

* update mono-touch tests with even more enums

* InsertQuantity -> Insert

* remove references to xcode13, which does not exist

* add HKCharacteristicTypeIdentifierActivityMoveMode to .ignore files
2019-08-02 14:06:22 -04:00
Rolf Bjarne Kvinge 1d85078962 [monotouch-test] Adjust tests to cope with changes in Xcode 11 beta 1. 2019-06-14 20:02:27 +02:00
Vincent Dondain b59b608a7e
[healthkit] Update for Xcode 10.2 beta 1 (#5497)
- Fix `CategoryTypeIdentifierTest` for 10.2 APIs
2019-01-29 13:07:48 -05:00
Rolf Bjarne Kvinge 239d9031d6 [HealthKit] Use generated NSString-backed enums. Fixes #4183. (#4786)
This means less (duplicated) manual code, which means less errors, which also
means we're now getting some new members that previously weren't duplicated
correctly.

Fixes https://github.com/xamarin/xamarin-macios/issues/4183.
2018-09-12 11:23:02 -04:00
Sebastien Pouliot 395feca0d9 Merge branch 'xcode9.1' into master-merge-xcode91-take2 2017-11-03 10:30:07 -04:00
Timothy Risi 2926a13f7e
[test] Change monotouch-test and xammac_tests to use all .cs files in monotouch-test/ Fixes #60290 (#2930)
Exclude the registrar/trampoline generated files from xammac_tests
Remove CoreLocation.LocationTest since is covered by introspection
2017-10-31 08:09:21 -08:00
Timothy Risi 1595206541 [HealthKit] Bind Xcode 9 APIs (#2817)
* [HealthKit] Update to Xcode 9 GM

* Add new xcode 9 beta APIs

* Fix PR comments

Marking SyncVersion as an int based on SpeedySloth sample from Apple:

            guard let version = route.metadata?[HKMetadataKeySyncVersion] as? NSNumber else {
                print("Route does not have a sync version for route \(route)")
                return
            }

            if version.intValue == 1 {
                self.makeWorkoutRouteSlothy(workout: workout, route: route)
            }

* Didn't save after deleting the FIXME

* Fix build issue

* Fix introspection tests

* Add new enum values to HKQuantityType.ToKey

* QuantityTypeIdentifierTest needs xcode version check for new enum types
2017-10-05 07:48:53 +02:00
Vincent Dondain 9a7f86d81a [healthkit] Update for iOS 10 GM (#800) 2016-09-07 18:19:19 -04:00
Sebastien Pouliot f5052c105c [healthkit] Change binding for HKDetailedCdaErrors (#757)
* [healthkit] Change binding for HKDetailedCdaErrors

* Hide [Fields]
* Easier access to the information from NSError
* Unit test (mostly to make sure of the returned type)

* [healthkit] Remove HKDetailedCDAValidationErrorKey from watchOS profile

It's used from an NSError returned from an API that is not available in
watchOS.
2016-09-03 11:36:05 -04:00
Sebastien Pouliot 4c09e91f91 [watchos] Remove several [Obsolete] API when alternatives exists (#742) 2016-09-02 10:02:29 -04:00
Sebastien Pouliot 3428fdc400 [tests] Update monotouch-test to add version checks when executing on older iOS versions. Fixes #43920 (#729)
Tested with iOS 9.3, 8.4 and 6.1.

https://bugzilla.xamarin.com/show_bug.cgi?id=43920
2016-08-31 23:08:54 -04:00
Sebastien Pouliot a0fd00c083 [tests] Fix monotouch-test failures when executed on iOS 9.x. Fixes bug #43520 (#632) 2016-08-18 22:59:26 -04:00
Vincent Dondain c932422e9e [healthkit] Update for iOS 10 beta 1 (#572) 2016-08-09 10:23:12 -04:00
Rolf Bjarne Kvinge 0a8c6e3342 [tests] Check versions using Xcode version instead of platform version.
This is required to match API to the required platform version,
since our platforms have different version numbers.
2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00