Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MapKit] Implement Xcode 16.0 beta 1-6 changes. #20893

Merged
merged 11 commits into from
Sep 5, 2024
Merged
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 @@ -1147,6 +1147,7 @@ MAPKIT_CORE_SOURCES = \
MapKit/MapKit.cs \

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