Skip to content

SharedWithYou tvOS xcode14.0 beta4

Manuel de la Pena edited this page Aug 30, 2022 · 3 revisions

#SharedWithYou.framework https://github.com/xamarin/xamarin-macios/pull/15819

diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SharedWithYou.framework/Headers/SWHighlightCenter.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SharedWithYou.framework/Headers/SWHighlightCenter.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SharedWithYou.framework/Headers/SWHighlightCenter.h	2022-06-29 02:34:36.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SharedWithYou.framework/Headers/SWHighlightCenter.h	2022-07-22 10:05:35.000000000 -0400
@@ -36,6 +36,7 @@
      @abstract Provides the application with a priority-ordered list of universal links which have been shared with the current user.
      @discussion The system decides which links should be surfaced. The app is responsible for updating its UI to reflect the latest provided list.
  */
+API_AVAILABLE(ios(16.0), tvos(16.0), macos(13.0))
 SW_EXTERN @interface SWHighlightCenter : NSObject
 
 /*!
@@ -51,16 +52,18 @@
  */
 @property (class, nonatomic, readonly) NSString *highlightCollectionTitle;
 
-/// Post a given event to the highlight center for display in Messages.
-/// @param event The event to add for a specific highlight
-- (void)postNoticeForHighlightEvent:(id<SWHighlightEvent>)event;
+/*!
+    @abstract Whether the current software version has full support for Messages collaboration features.
+    @discussion Use this property at runtime to conditionally enable Messages collaboration features in your app. This property will be permantently set to YES on a software version with full support for these features.
+ */
+@property (class, nonatomic, readonly, getter=isSystemCollaborationSupportAvailable) BOOL systemCollaborationSupportAvailable;
 
 /*!
-    @abstract A convience method to get a SWCollaborationHighlight for a given URL
-    @param URL The URL used to find the SWCollaborationHighlight
-    @param error The error describing the failure.
-*/
-- (SWCollaborationHighlight * __nullable)collaborationHighlightForURL:(NSURL *)URL error:(NSError **)error;
+ @abstract A convenience method to get a SWHighlight for a given URL
+ @param URL The URL used to find the SWHighlight
+ @param completionHandler an SWHighlight if it  was fetched. The completion handler will always be invoked on the main queue
+ */
+- (void)getHighlightForURL:(NSURL *)URL completionHandler:(void (^)(SWHighlight * _Nullable highlight, NSError * _Nullable fetchError))completionHandler;
 
 /*!
     @abstract A convience method to get a SWCollaborationHighlight for a given collaboration Identifier
@@ -70,6 +73,19 @@
 - (SWCollaborationHighlight * __nullable)collaborationHighlightForIdentifier:(SWCollaborationIdentifier)collaborationIdentifier error:(NSError **)error;
 
 /*!
+ @abstract A convience method to get an SWCollaborationHighlight for a given URL
+ @param URL The URL used to find the SWCollaborationHighlight
+ @param completionHandler  an SWCollaborationHighlight if it was fetched. The completion handler will always be invoked on the main queue
+ */
+- (void)getCollaborationHighlightForURL:(NSURL *)URL completionHandler:(void (^)(SWCollaborationHighlight * _Nullable highlight, NSError * _Nullable fetchError))completionHandler;
+
+/*!
+    @abstract Post a given event to the highlight center for display in Messages.
+    @param event The event to add for a specific highlight
+ */
+- (void)postNoticeForHighlightEvent:(id<SWHighlightEvent>)event;
+
+/*!
     @abstract Method to sign passed in data with local device's private key
     @param data NSData that needs to be signed
     @param collaborationHighlight The corresponding collaboration highlight.
@@ -77,13 +93,6 @@
  */
 - (void)getSignedIdentityProofForCollaborationHighlight:(SWCollaborationHighlight *)collaborationHighlight usingData:(NSData *)data completionHandler:(void (^)(SWSignedPersonIdentityProof * _Nullable, NSError * _Nullable))completionHandler NS_SWIFT_ASYNC_NAME(signedIdentityProof(for:using:));
 
-/*!
-    @abstract A convenience method to get a SWHighlight for a given URL
-    @param URL The URL used to find the SWHighlight
-    @param error The error describing the failure.
- */
-- (SWHighlight * __nullable)highlightForURL:(NSURL *)URL error:(NSError **)error;
-
 @end
 
 NS_ASSUME_NONNULL_END
Clone this wiki locally