Skip to content

Commit

Permalink
[MapKit] Implement Xcode 16.0 beta 1-6 changes. (#20893)
Browse files Browse the repository at this point in the history
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
  • Loading branch information
rolfbjarne authored Sep 5, 2024
1 parent afb561b commit e2c0cb3
Show file tree
Hide file tree
Showing 23 changed files with 500 additions and 583 deletions.
42 changes: 42 additions & 0 deletions src/MapKit/MKAddressFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#if !WATCH

using System;
using System.Runtime.InteropServices;
using Foundation;
using ObjCRuntime;
using MapKit;

#nullable enable

namespace MapKit {
/// <summary>This enum is used to select how to initialize a new instance of a <see cref="MKAddressFilter" />.</summary>
public enum MKAddressFilterConstructorOption {
/// <summary>The <c>options</c> parameter passed to the constructor are inclusive.</summary>
Include,
/// <summary>The <c>options</c> parameter passed to the constructor are exclusive.</summary>
Exclude,
}

public partial class MKAddressFilter {
/// <summary>Create a new <see cref="MKAddressFilter" /> with the specified address filter options.</summary>
/// <param name="options">The address filter options to use.</param>
/// <param name="constructorOption">Specify whether the <paramref name="options" /> argument is including or excluding the given options.</param>
/// <returns>A new <see cref="MKAddressFilter" /> instance with the specified address filter options.</returns>
public MKAddressFilter (MKAddressFilterOption options, MKAddressFilterConstructorOption constructorOption)
: base (NSObjectFlag.Empty)
{
switch (constructorOption) {
case MKAddressFilterConstructorOption.Include:
InitializeHandle (_InitIncludingOptions (options));
break;
case MKAddressFilterConstructorOption.Exclude:
InitializeHandle (_InitExcludingOptions (options));
break;
default:
throw new ArgumentOutOfRangeException (nameof (constructorOption), constructorOption, "Invalid enum value.");
}
}
}
}

#endif
136 changes: 136 additions & 0 deletions src/MapKit/MKEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ public enum MKLocalSearchCompleterResultType : ulong {
Address = 1 << 0,
PointOfInterest = 1 << 1,
Query = 1 << 2,
[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
PhysicalFeature = 1 << 3,
}

[Flags]
Expand All @@ -184,6 +186,8 @@ public enum MKLocalSearchCompleterResultType : ulong {
public enum MKLocalSearchResultType : ulong {
Address = 1 << 0,
PointOfInterest = 1 << 1,
[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
PhysicalFeature = 1 << 2,
}

[Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)]
Expand Down Expand Up @@ -356,6 +360,138 @@ public enum MKPointOfInterestCategory {

[Field ("MKPointOfInterestCategoryZoo")]
Zoo,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryAnimalService")]
AnimalService,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryAutomotiveRepair")]
AutomotiveRepair,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryBaseball")]
Baseball,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryBasketball")]
Basketball,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryBeauty")]
Beauty,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryBowling")]
Bowling,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryCastle")]
Castle,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryConventionCenter")]
ConventionCenter,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryDistillery")]
Distillery,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryFairground")]
Fairground,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryFishing")]
Fishing,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryFortress")]
Fortress,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryGolf")]
Golf,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryGoKart")]
GoKart,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryHiking")]
Hiking,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryKayaking")]
Kayaking,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryLandmark")]
Landmark,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryMailbox")]
Mailbox,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryMiniGolf")]
MiniGolf,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryMusicVenue")]
MusicVenue,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryNationalMonument")]
NationalMonument,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryPlanetarium")]
Planetarium,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryRockClimbing")]
RockClimbing,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryRVPark")]
RVPark,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySkatePark")]
SkatePark,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySkating")]
Skating,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySkiing")]
Skiing,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySoccer")]
Soccer,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySpa")]
Spa,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySurfing")]
Surfing,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategorySwimming")]
Swimming,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryTennis")]
Tennis,

[NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Field ("MKPointOfInterestCategoryVolleyball")]
Volleyball,
}

#endif
Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,7 @@ MAPKIT_CORE_SOURCES = \
MapKit/MapKit.cs \

MAPKIT_SOURCES = \
MapKit/MKAddressFilter.cs \
MapKit/MKCompat.cs \
MapKit/MKDirections.cs \
MapKit/MKFeatureDisplayPriority.cs \
Expand Down
Loading

7 comments on commit e2c0cb3

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.