Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/CoreTelephony/CTEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum CTErrorDomain {
}

/// <summary>Enumerates data restrictions for <see cref="CoreTelephony.CTCellularData.RestrictedState" />.</summary>
[NoMacCatalyst]
[MacCatalyst (13, 1)]
[Native]
public enum CTCellularDataRestrictedState : ulong {
/// <summary>To be added.</summary>
Expand All @@ -29,7 +29,7 @@ public enum CTCellularDataRestrictedState : ulong {
NotRestricted,
}

[NoMacCatalyst]
[MacCatalyst (13, 1)]
[Native]
public enum CTCellularPlanProvisioningAddPlanResult : long {
/// <summary>To be added.</summary>
Expand Down
57 changes: 54 additions & 3 deletions src/coretelephony.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
using System;

namespace CoreTelephony {

[iOS (26, 0), Mac (26, 0), MacCatalyst (26, 0)]
[Native]
public enum CTCellularPlanCapability : long {
Only,
AndVoice,
}

/// <summary>Encapsulates a unique identifier for a call and it's state.</summary>
///
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCall/index.html">Apple documentation for <c>CTCall</c></related>
Expand All @@ -26,7 +34,7 @@ interface CTCall {
}

/// <related type="externalDocumentation" href="https://developer.apple.com/reference/CoreTelephony/CTCellularData">Apple documentation for <c>CTCellularData</c></related>
[NoMacCatalyst]
[MacCatalyst (13, 1)]
[BaseType (typeof (NSObject))]
interface CTCellularData {
/// <summary>To be added.</summary>
Expand Down Expand Up @@ -385,7 +393,7 @@ partial interface CTSubscriberInfo {
CTSubscriber [] Subscribers { get; }
}

[NoMacCatalyst]
[MacCatalyst (13, 1)]
[BaseType (typeof (NSObject))]
interface CTCellularPlanProvisioningRequest : NSSecureCoding {
/// <summary>To be added.</summary>
Expand Down Expand Up @@ -425,7 +433,7 @@ interface CTCellularPlanProvisioningRequest : NSSecureCoding {
string Eid { get; set; }
}

[NoMacCatalyst]
[MacCatalyst (13, 1)]
[BaseType (typeof (NSObject))]
interface CTCellularPlanProvisioning {
/// <summary>To be added.</summary>
Expand All @@ -450,5 +458,48 @@ interface CTCellularPlanProvisioning {
[iOS (16, 0)]
[Export ("supportsEmbeddedSIM")]
bool SupportsEmbeddedSim { get; }

[Async]
[NoTV, NoMac, iOS (26, 0), MacCatalyst (26, 0)]
[Export ("addPlanWithRequest:properties:completionHandler:")]
void AddPlan (CTCellularPlanProvisioningRequest request, [NullAllowed] CTCellularPlanProperties properties, CTCellularPlanProvisioningAddPlanCompletionHandler completionHandler);

[Async]
[NoTV, NoMac, iOS (26, 0), MacCatalyst (26, 0)]
[Export ("updateCellularPlanProperties:completionHandler:")]
void UpdateCellularPlan (CTCellularPlanProperties properties, CTCellularPlanProvisioningUpdateCellularPlanCompletionHandler completionHandler);
}

delegate void CTCellularPlanProvisioningAddPlanCompletionHandler (CTCellularPlanProvisioningAddPlanResult result);
delegate void CTCellularPlanProvisioningUpdateCellularPlanCompletionHandler ([NullAllowed] NSError error);

[NoTV, NoMac, iOS (26, 0), MacCatalyst (26, 0)]
[BaseType (typeof (NSObject))]
interface CTCellularPlanProperties : NSSecureCoding {
[NullAllowed, Export ("associatedIccid")]
string AssociatedIccid { get; set; }

[Export ("simCapability", ArgumentSemantic.Assign)]
CTCellularPlanCapability SimCapability { get; set; }

[Export ("supportedRegionCodes", ArgumentSemantic.Assign)]
string [] SupportedRegionCodes { get; set; }
}

[iOS (26, 0), MacCatalyst (26, 0), NoTV, NoMac]
[BaseType (typeof (NSObject))]
interface CTCellularPlanStatus {
[Async]
[Static]
[Export ("getTokenWithCompletion:")]
void GetToken (CTCellularPlanStatusGetTokenCompletionHandler completionHandler);

[Async]
[Static]
[Export ("checkValidityOfToken:completionHandler:")]
void CheckValidity (string token, CTCellularPlanStatusCheckValidityCompletionHandler completionHandler);
}

delegate void CTCellularPlanStatusGetTokenCompletionHandler ([NullAllowed] string token, [NullAllowed] NSError error);
delegate void CTCellularPlanStatusCheckValidityCompletionHandler (bool isValid, [NullAllowed] NSError error);
}
20 changes: 20 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2402,6 +2402,8 @@ F:CoreSpotlight.CSSuggestionKind.None
F:CoreSpotlight.CSUserInteraction.Default
F:CoreSpotlight.CSUserInteraction.Focus
F:CoreSpotlight.CSUserInteraction.Select
F:CoreTelephony.CTCellularPlanCapability.AndVoice
F:CoreTelephony.CTCellularPlanCapability.Only
F:CoreTelephony.CTCellularPlanProvisioningAddPlanResult.Cancel
F:CoreText.CTFontManagerError.AssetNotFound
F:CoreText.CTFontManagerError.CancelledByUser
Expand Down Expand Up @@ -10443,6 +10445,14 @@ M:CoreSpotlight.CSUserQuery.UserEngaged(CoreSpotlight.CSSuggestion,CoreSpotlight
M:CoreSpotlight.CSUserQueryContext.Create(CoreSpotlight.CSSuggestion)
M:CoreSpotlight.ICSSearchableIndexDelegate.DidUpdate(CoreSpotlight.CSSearchableItem[])
M:CoreSpotlight.ICSSearchableIndexDelegate.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler)
M:CoreTelephony.CTCellularPlanProvisioning.AddPlan(CoreTelephony.CTCellularPlanProvisioningRequest,CoreTelephony.CTCellularPlanProperties,CoreTelephony.CTCellularPlanProvisioningAddPlanCompletionHandler)
M:CoreTelephony.CTCellularPlanProvisioning.AddPlanAsync(CoreTelephony.CTCellularPlanProvisioningRequest,CoreTelephony.CTCellularPlanProperties)
M:CoreTelephony.CTCellularPlanProvisioning.UpdateCellularPlan(CoreTelephony.CTCellularPlanProperties,CoreTelephony.CTCellularPlanProvisioningUpdateCellularPlanCompletionHandler)
M:CoreTelephony.CTCellularPlanProvisioning.UpdateCellularPlanAsync(CoreTelephony.CTCellularPlanProperties)
M:CoreTelephony.CTCellularPlanStatus.CheckValidity(System.String,CoreTelephony.CTCellularPlanStatusCheckValidityCompletionHandler)
M:CoreTelephony.CTCellularPlanStatus.CheckValidityAsync(System.String)
M:CoreTelephony.CTCellularPlanStatus.GetToken(CoreTelephony.CTCellularPlanStatusGetTokenCompletionHandler)
M:CoreTelephony.CTCellularPlanStatus.GetTokenAsync
M:CoreTelephony.CTSubscriber.Dispose(System.Boolean)
M:CoreTelephony.CTSubscriber.RefreshCarrierToken
M:CoreTelephony.CTTelephonyNetworkInfo.Dispose(System.Boolean)
Expand Down Expand Up @@ -19888,6 +19898,9 @@ P:CoreSpotlight.CSUserQueryContext.MaxRankedResultCount
P:CoreSpotlight.CSUserQueryContext.MaxResultCount
P:CoreSpotlight.CSUserQueryContext.MaxSuggestionCount
P:CoreSpotlight.CSUserQueryContext.UserQueryContext
P:CoreTelephony.CTCellularPlanProperties.AssociatedIccid
P:CoreTelephony.CTCellularPlanProperties.SimCapability
P:CoreTelephony.CTCellularPlanProperties.SupportedRegionCodes
P:CoreTelephony.CTCellularPlanProvisioning.SupportsEmbeddedSim
P:CoreTelephony.CTSubscriber.IsSimInserted
P:CoreTelephony.CTTelephonyNetworkInfo.DataServiceIdentifier
Expand Down Expand Up @@ -26359,9 +26372,16 @@ T:CoreSpotlight.CSSuggestionKind
T:CoreSpotlight.CSUserInteraction
T:CoreSpotlight.CSUserQuery
T:CoreSpotlight.CSUserQueryContext
T:CoreTelephony.CTCellularPlanCapability
T:CoreTelephony.CTCellularPlanProperties
T:CoreTelephony.CTCellularPlanProvisioning
T:CoreTelephony.CTCellularPlanProvisioningAddPlanCompletionHandler
T:CoreTelephony.CTCellularPlanProvisioningAddPlanResult
T:CoreTelephony.CTCellularPlanProvisioningRequest
T:CoreTelephony.CTCellularPlanProvisioningUpdateCellularPlanCompletionHandler
T:CoreTelephony.CTCellularPlanStatus
T:CoreTelephony.CTCellularPlanStatusCheckValidityCompletionHandler
T:CoreTelephony.CTCellularPlanStatusGetTokenCompletionHandler
T:CoreTelephony.CTTelephonyNetworkInfoDelegate
T:CoreTelephony.ICTSubscriberDelegate
T:CoreTelephony.ICTTelephonyNetworkInfoDelegate
Expand Down
9 changes: 7 additions & 2 deletions tests/xtro-sharpie/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@ $(XTRO_SANITY): $(wildcard xtro-sanity/*.cs) $(wildcard xtro-sanity/*.csproj) $(

CORETELEPHONY_HEADERS = \
-i CoreTelephony/CoreTelephonyDefines.h \
-i CoreTelephony/CTCarrier.h \
-i CoreTelephony/CTCall.h \
-i CoreTelephony/CTCallCenter.h \
-i CoreTelephony/CTTelephonyNetworkInfo.h \
-i CoreTelephony/CTCarrier.h \
-i CoreTelephony/CTCellularData.h \
-i CoreTelephony/CTCellularPlanProperties.h \
-i CoreTelephony/CTCellularPlanProvisioning.h \
-i CoreTelephony/CTCellularPlanProvisioningRequest.h \
-i CoreTelephony/CTCellularPlanStatus.h \
-i CoreTelephony/CTSubscriber.h \
-i CoreTelephony/CTSubscriberInfo.h \
-i CoreTelephony/CTTelephonyNetworkInfo.h \

SWIFT_FRAMEWORKS = \
CoreTransferable \
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# CoreTelephony doesn't make much sense on macOS, so we're not exposing it.
!missing-enum! CTCellularDataRestrictedState not bound
!missing-enum! CTCellularPlanCapability not bound
!missing-enum! CTCellularPlanProvisioningAddPlanResult not bound
Loading