[CarPlay] Update bindings to Xcode 12.2 Beta 1 (#9719)

* [CarPlay] Update bindings to Xcode 12.2 Beta 1

CPEntity docs got removed https://developer.apple.com/documentation/carplay/cpentity
so it is very likely that Apple will keep this out from the API.

* Better obsolete and hide it from autocompletion

* Fix

* Ups I broke it again...

* Apply feedback
This commit is contained in:
Alex Soto 2020-10-01 15:22:45 -04:00 коммит произвёл GitHub
Родитель 522eafdf1b
Коммит 94dc5ebd5d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 38 добавлений и 7 удалений

37
src/CarPlay/CPCompat.cs Normal file
Просмотреть файл

@ -0,0 +1,37 @@
//
// CPCompat.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright (c) Microsoft Corporation.
//
using System;
using Foundation;
using ObjCRuntime;
using System.ComponentModel;
#if !XAMCORE_4_0
namespace CarPlay {
[Register (SkipRegistration = true)]
[Introduced (PlatformName.iOS, 14, 0)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("This API has been removed from the native SDK.")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class CPEntity : NSObject, INSSecureCoding {
public CPEntity () => throw new NotSupportedException ();
public CPEntity (NSCoder coder) => throw new NotSupportedException ();
protected CPEntity (NSObjectFlag t) => throw new NotSupportedException ();
protected internal CPEntity (IntPtr handle) => throw new NotSupportedException ();
public virtual void EncodeTo (NSCoder encoder) => throw new NotSupportedException ();
public override IntPtr ClassHandle => throw new NotSupportedException ();
}
}
#endif

Просмотреть файл

@ -1771,10 +1771,6 @@ namespace CarPlay {
string PhoneOrEmail { get; } string PhoneOrEmail { get; }
} }
[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (NSObject))]
interface CPEntity : NSSecureCoding {}
[NoWatch, NoTV, NoMac, iOS (14,0)] [NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))] [BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingShuffleButton {} interface CPNowPlayingShuffleButton {}

Просмотреть файл

@ -301,6 +301,7 @@ CALLKIT_SOURCES = \
# CarPlay # CarPlay
CARPLAY_SOURCES = \ CARPLAY_SOURCES = \
CarPlay/CPCompat.cs \
CarPlay/CPNavigationAlert.cs \ CarPlay/CPNavigationAlert.cs \
CarPlay/CPMessageListItem.cs \ CarPlay/CPMessageListItem.cs \

Просмотреть файл

@ -11,6 +11,3 @@
# As of Xcode 12 beta 6 the CarPlay framework does not have an error enum # As of Xcode 12 beta 6 the CarPlay framework does not have an error enum
!missing-field! CarPlayErrorDomain not bound !missing-field! CarPlayErrorDomain not bound
# introduced in Xcode 12 but it is not included yet in Xcode 12.2
!unknown-type! CPEntity bound