Skip to content

Commit

Permalink
[VideoSubscriberAccount] Update API to support Xcode 14 beta 5. (#15699)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Soto <alex@alexsoto.me>
  • Loading branch information
mandel-macaque and dalexsoto authored Aug 25, 2022
1 parent 5cdd06f commit 52cb506
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 186 deletions.
90 changes: 90 additions & 0 deletions src/videosubscriberaccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,32 @@ enum VSUserAccountQueryOption : ulong {
AllDevices,
}

[TV (16,0), NoMacCatalyst, iOS (16,0), Mac (13,0)]
[Flags]
[Native]
public enum VSUserAccountQueryOptions : long
{
None = 0x0,
AllDevices,
}

[TV (16,0), NoMacCatalyst, iOS (16,0), Mac (13,0)]
[Native]
public enum VSUserAccountType : long
{
Free,
Paid,
}

[TV (16,0), NoMacCatalyst, iOS (16,0), Mac (13,0)]
[Native]
public enum VSOriginatingDeviceCategory : long
{
Mobile,
Other,
}


[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14)]
Expand Down Expand Up @@ -373,4 +399,68 @@ interface VSAccountApplicationProvider {
[Export ("identifier")]
string Identifier { get; }
}

[TV (16,0), NoMacCatalyst, iOS (16,0), Mac (13,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface VSUserAccountManager
{
[Static]
[Export ("sharedUserAccountManager")]
VSUserAccountManager SharedUserAccountManager { get; }

[Async]
[Export ("updateUserAccount:completion:")]
void UpdateUserAccount (VSUserAccount account, [NullAllowed] Action<NSError> completion);

[Async]
[Export ("queryUserAccountsWithOptions:completion:")]
void QueryUserAccounts (VSUserAccountQueryOptions options, Action<NSArray<VSUserAccount>, NSError> completion);
}

[TV (16,0), NoMacCatalyst, iOS (16,0), Mac (13,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface VSUserAccount
{
[NullAllowed, Export ("updateURL", ArgumentSemantic.Copy)]
NSUrl UpdateUrl { get; set; }

[Export ("requiresSystemTrust")]
bool RequiresSystemTrust { get; set; }

[NullAllowed, Export ("accountProviderIdentifier", ArgumentSemantic.Strong)]
string AccountProviderIdentifier { get; set; }

[NullAllowed, Export ("identifier")]
string Identifier { get; set; }

[Export ("accountType", ArgumentSemantic.Assign)]
VSUserAccountType AccountType { get; set; }

[Export ("deleted")]
bool Deleted { [Bind ("isDeleted")] get; set; }

[NullAllowed, Export ("subscriptionBillingCycleEndDate", ArgumentSemantic.Copy)]
NSDate SubscriptionBillingCycleEndDate { get; set; }

[NullAllowed, Export ("tierIdentifiers", ArgumentSemantic.Copy)]
string[] TierIdentifiers { get; set; }

[NullAllowed, Export ("billingIdentifier")]
string BillingIdentifier { get; set; }

[NullAllowed, Export ("authenticationData")]
string AuthenticationData { get; set; }

[Export ("fromCurrentDevice")]
bool FromCurrentDevice { [Bind ("isFromCurrentDevice")] get; }

[Export ("deviceCategory")]
VSOriginatingDeviceCategory DeviceCategory { get; }

[Export ("initWithAccountType:updateURL:")]
NativeHandle Constructor (VSUserAccountType accountType, [NullAllowed] NSUrl url);
}

}
6 changes: 6 additions & 0 deletions tests/introspection/iOS/iOSApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ protected override bool Skip (Type type, string protocolName)
case "UISheetPresentationControllerDetent": // Conformance not in headers
case "UIWindowSceneActivationConfiguration": // Conformance not in headers
return true;
// Xcode 14
case "VSUserAccount": // Conformance not in headers
return true;
}
break;
case "NSSecureCoding":
Expand Down Expand Up @@ -712,6 +715,9 @@ protected override bool Skip (Type type, string protocolName)
case "UISheetPresentationControllerDetent": // conformance not in headers
case "CAConstraintLayoutManager": // Not declared in header file
return true;
// Xcode 14
case "VSUserAccount": // Conformance not in headers
return true;
}
break;
case "NSCopying":
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions tests/xtro-sharpie/iOS-VideoSubscriberAccount.todo

This file was deleted.

31 changes: 0 additions & 31 deletions tests/xtro-sharpie/macOS-VideoSubscriberAccount.todo

This file was deleted.

31 changes: 0 additions & 31 deletions tests/xtro-sharpie/tvOS-VideoSubscriberAccount.todo

This file was deleted.

4 comments on commit 52cb506

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • introspection
  • monotouch-test

Pipeline on Agent
Hash: 52cb5066f43c99bf446391a34310457049002d21 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 52cb5066f43c99bf446391a34310457049002d21 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-062.Monterey'
Hash: 52cb5066f43c99bf446391a34310457049002d21 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 5 tests failed, 223 tests passed.

Failures

❌ introspection tests

1 tests failed, 12 tests passed.
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 6.0): Crashed Known issue: HE0038)

Html Report (VSDrops) Download

❌ monotouch tests

4 tests failed, 19 tests passed.
  • monotouch-test/watchOS 32-bits - simulator/Debug: TimedOut
  • monotouch-test/watchOS 32-bits - simulator/Debug (LinkSdk): HarnessException (Harness exception for 'monotouch-test': System.InvalidOperationException: The Writer is closed or in error state.
    at System.Xml.XmlWellFormedWriter.AdvanceState (System.Xml.XmlWellFormedWriter+Token token) [0x001f6] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlWellFormedWriter.cs:1712
    at System.Xml.XmlWellFormedWriter.WriteCData (System.String text) [0x00029] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlWellFormedWriter.cs:771
    at Microsoft.DotNet.XHarness.iOS.Shared.Utilities.Extensions.WriteCDataSafe (System.Xml.XmlWriter writer, System.String text) [0x0001b] in //src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/Extensions.cs:130
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.TestReportGenerator.WriteFailure (System.Xml.XmlWriter writer, System.String message, System.IO.TextReader stderr) [0x00031] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/TestReportGenerator.cs:43
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.NUnitV3TestReportGenerator.GenerateFailure (System.Xml.XmlWriter writer, System.String title, System.String message, System.IO.TextReader stderr) [0x0030e] in //src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/NUnitV3TestReportGenerator.cs:124
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailureXml (System.String destination, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x00033] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:226
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailure (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILogs logs, System.String source, System.String appName, System.String variation, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x000a4] in //src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:248
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailure (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILogs logs, System.String source, System.String appName, System.String variation, System.String title, System.String message, System.String stderrPath, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x00008] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:236
    at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.GenerateXmlFailures (System.String failure, System.Boolean crashed, System.String crashReason) [0x00247] in //src/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs:575
    at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult () [0x0056f] in /
    /src/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs:713
    at Xharness.AppRunner.RunAsync () [0x01b78] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/AppRunner.cs:453
    at Xharness.Jenkins.TestTasks.RunSimulator.RunTestAsync () [0x002b1] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:128
    at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync () [0x001b9] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:113
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x00226] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:269 )
  • monotouch-test/watchOS 32-bits - simulator/Debug (static registrar): TimedOut
  • monotouch-test/watchOS 32-bits - simulator/Release (all optimizations): TimedOut

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

Please sign in to comment.