Skip to content

VideoSubscriberAccount tvOS xcode9 beta1

Vincent Dondain edited this page Jun 5, 2017 · 3 revisions

#VideoSubscriberAccount.framework

diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSAccountManager.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSAccountManager.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSAccountManager.h	2016-11-01 23:49:10.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSAccountManager.h	2017-05-19 23:29:18.000000000 -0400
@@ -12,6 +12,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @class NSDictionary<KeyType, ValueType>;
+@class NSString;
 @class NSError;
 @class UIViewController;
 @class VSAccountManagerResult;
@@ -42,7 +43,7 @@
 VS_EXPORT API_AVAILABLE(ios(10.0), tvos(10.0))
 @interface VSAccountManager : NSObject
 
-/// An object that can help the account manager by presenting and dismissing view controllers when needed.
+/// An object that can help the account manager by presenting and dismissing view controllers when needed, and deciding whether to allow authentication with the selected provider.
 /// Some requests may fail if a delegate is not provided.  For example, an account metadata request may require a delegate if it allows interruption.
 @property (nonatomic, weak) id<VSAccountManagerDelegate> delegate;
 
@@ -51,7 +52,7 @@
 /// @param completionHandler A block to be called when the request finishes.  It will always be called exactly once.  It may be called before the method call returns.  It may be called on any queue.
 /// @param accessStatus The current state the application's access to the user's subscription information.
 /// @param error If the user did not grant access to the app, this will contain an error describing the result of the operation.
-- (void)checkAccessStatusWithOptions:(NSDictionary<VSCheckAccessOption, id> *)options completionHandler:(void (^)(VSAccountAccessStatus accessStatus, NSError * __nullable error))completionHandler;
+- (void)checkAccessStatusWithOptions:(NSDictionary<VSCheckAccessOption, id> *)options completionHandler:(void (^)(VSAccountAccessStatus accessStatus, NSError * _Nullable error))completionHandler;
 
 /// Begins requesting information about the subscriber's account.
 /// @param request This identifies what specific information the app wants to know.
@@ -59,7 +60,7 @@
 /// @param metadata If the request finished successfully, this will contain information about the subscriber's account.
 /// @param error If the request did not finish successfully, this will contain an error describing the result of the operation.
 /// @returns A result object that may be used to cancel the in-flight request.  Cancellation is advisory, and does not guarantee that the request will finish immediately.
-- (VSAccountManagerResult *)enqueueAccountMetadataRequest:(VSAccountMetadataRequest *)request completionHandler:(void (^)(VSAccountMetadata * __nullable metadata, NSError * __nullable error))completionHandler;
+- (VSAccountManagerResult *)enqueueAccountMetadataRequest:(VSAccountMetadataRequest *)request completionHandler:(void (^)(VSAccountMetadata * _Nullable metadata, NSError * _Nullable error))completionHandler;
 
 @end
 
@@ -80,6 +81,19 @@
 /// @param viewController The view controller that is being presented to the user.  You must use -dismissViewControllerAnimated:completion: to begin dismissing the view controller before returning from this method.
 - (void)accountManager:(VSAccountManager *)accountManager dismissViewController:(UIViewController *)viewController;
 
+@optional
+
+/// This method can be used to temporarily refrain from authenticating with an
+/// otherwise-supported provider during a transient outage.
+/// This method will be called when the user chooses a supported provider from
+/// the list of providers.
+/// If you do not implement this method, the user will be able to authenticate
+/// with all supported providers.
+/// @param accountManager The account manager instance that received a metadata request.
+/// @param accountProviderIdentifier Identifies the otherwise-supported account provider.
+/// @returns Returning NO will cause the request will fail with an unsupported provider error.
+- (BOOL)accountManager:(VSAccountManager *)accountManager shouldAuthenticateAccountProviderWithIdentifier:(NSString *)accountProviderIdentifier;
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscription.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscription.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscription.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscription.h	2017-05-30 01:25:19.000000000 -0400
@@ -0,0 +1,71 @@
+//
+//  VSSubscription.h
+//  VideoSubscriberAccount
+//
+//  Copyright © 2016 Apple Inc. All rights reserved.
+//
+
+#import <Availability.h>
+#import <Foundation/NSObject.h>
+#import <VideoSubscriberAccount/VideoSubscriberAccountDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class NSArray<ObjectType>;
+@class NSDate;
+@class NSString;
+
+/// Describes the level of access to content.
+typedef NS_ENUM(NSInteger, VSSubscriptionAccessLevel)
+{
+    VSSubscriptionAccessLevelUnknown,/// The default access level.
+    VSSubscriptionAccessLevelFreeWithAccount, /// The customer has access to content that is offered for free to users with a valid account.  This value corresponds content in your availability feed with the "account" offering type.
+    VSSubscriptionAccessLevelPaid, /// The customer also has access to content that is offered as part of a paid subscription.  The value corresponds content in your availability feed with the "subscription" offering type.
+}
+#if TARGET_OS_IPHONE
+API_AVAILABLE(ios(11.0), tvos(11.0));
+#else
+;
+#endif // TARGET_OS_IPHONE
+
+/// A VSSubscription instance describes the extent to which a subscriber has
+/// access to content.
+#if TARGET_OS_IPHONE
+VS_EXPORT API_AVAILABLE(ios(11.0), tvos(11.0))
+#else
+VS_EXPORT
+#endif // #if TARGET_OS_IPHONE
+@interface VSSubscription : NSObject
+
+/// After this point in time, the subscription will be considered inactive.
+///
+/// If the current subscription becomes inactive, the system will behave as
+/// though the user is not subscribed at all, i.e. as though the registration
+/// center's current subscription had been set to nil.
+///
+/// Defaults to distantFuture.
+///
+/// Providing a value is useful in a limited number of scenarios, e.g. when the
+/// a subscriber decides not to renew their subscription, you should provide an
+/// expiration date that corresponds to the point in time when the final billing
+/// cycle will end.
+///
+/// This might also be useful if the subscription only grants access to content
+/// that is time-limited, e.g. a single season of games for a sports league.
+@property (nonatomic, copy, null_resettable) NSDate *expirationDate;
+
+/// Describes the level of access the subscriber has to your catalog of content.
+///
+/// It is an error to provide a subscription with an unknown access level as
+/// the current subscription.  Instead, choose the access level that describes
+/// the content that the subscriber can play.
+@property (nonatomic, assign) VSSubscriptionAccessLevel accessLevel;
+
+/// Identifies a subset of content from your catalog that subscriber can play.
+///
+/// Only provide values that are used in your availability feed's tier restrictions.
+@property (nonatomic, copy, null_resettable) NSArray<NSString *> *tierIdentifiers;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscriptionRegistrationCenter.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscriptionRegistrationCenter.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscriptionRegistrationCenter.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VSSubscriptionRegistrationCenter.h	2017-05-30 01:25:19.000000000 -0400
@@ -0,0 +1,46 @@
+//
+//  VSSubscriptionRegistrationCenter.h
+//  VideoSubscriberAccount
+//
+//  Copyright © 2016 Apple Inc. All rights reserved.
+//
+
+#import <Availability.h>
+#import <Foundation/NSObject.h>
+#import <VideoSubscriberAccount/VideoSubscriberAccountDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class VSSubscription;
+
+/// VSSubscriptionRegistrationCenter stores subscription information.
+#if TARGET_OS_IPHONE
+VS_EXPORT API_AVAILABLE(ios(11.0), tvos(11.0))
+#else
+VS_EXPORT
+#endif // #if TARGET_OS_IPHONE
+@interface VSSubscriptionRegistrationCenter : NSObject
+
+/// Use the default subscription registration center to tell the system about
+/// the customer's ability to access content within your app.
++ (VSSubscriptionRegistrationCenter *)defaultSubscriptionRegistrationCenter;
+
+/// Provide a subscription when the subscriber first authenticates, and when the
+/// subscription changes.
+///
+/// When the subscriber signs out or otherwise loses access to subscription
+/// content, invoke this method with nil.
+///
+/// You might also want to call this method opportunistically, if you happen to
+/// have just confirmed the validity of the subscription, or in response to app
+/// lifecycle events, e.g. when your app becomes active.  The system may use
+/// this activity as a hint that the user is actively using the subscription.
+///
+/// It is an error to provide a current subscription with an unknown access
+/// level; you should not provide a subscription if the user only has access to
+/// content that is offered for free without any account requirements.
+- (void)setCurrentSubscription:(nullable VSSubscription *)currentSubscription;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.apinotes /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.apinotes
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.apinotes	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.apinotes	2017-05-30 01:25:19.000000000 -0400
@@ -0,0 +1,5 @@
+---
+Name: VideoSubscriberAccount
+Tags:
+- Name: VSErrorCode
+  NSErrorDomain: VSErrorDomain
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.h	2016-11-30 01:13:38.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/VideoSubscriberAccount.framework/Headers/VideoSubscriberAccount.h	2017-05-30 01:25:20.000000000 -0400
@@ -12,3 +12,5 @@
 #import <VideoSubscriberAccount/VSAccountMetadata.h>
 #import <VideoSubscriberAccount/VSAccountMetadataRequest.h>
 #import <VideoSubscriberAccount/VSAccountProviderResponse.h>
+#import <VideoSubscriberAccount/VSSubscription.h>
+#import <VideoSubscriberAccount/VSSubscriptionRegistrationCenter.h>
Clone this wiki locally