Skip to content

ClassKit iOS xcode26.4 b2

Rolf Bjarne Kvinge edited this page Feb 27, 2026 · 1 revision

#ClassKit.framework

diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ClassKit.framework/Headers/CLSDataStore.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ClassKit.framework/Headers/CLSDataStore.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ClassKit.framework/Headers/CLSDataStore.h	2025-11-09 05:18:04
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ClassKit.framework/Headers/CLSDataStore.h	2026-02-16 07:06:51
@@ -124,4 +124,62 @@
                  completion:(void(^)(CLSActivity * _Nullable activity, NSError * _Nullable error))completion API_AVAILABLE(ios(14.5), macos(11.3), macCatalyst(14.5)) API_UNAVAILABLE(watchos, tvos);
 @end
 
+@interface CLSDataStore (StudentAPI)
+/*!
+ @abstract      Determines whether a URL to the document was assigned to the student.
+ 
+ @discussion    This method checks if the document at the specified URL is assigned to the current student
+                signed into the device.
+ 
+                This is particularly useful for implementing student-specific workflows, such as:
+                - Showing submission UI only for assigned documents
+                - Displaying assignment-specific metadata or instructions
+                - Enabling special features or restrictions for assigned work
+ 
+                The completion handler's `isAssignedDocument` parameter will be `YES` when:
+                - The document URL corresponds to an active assigned document
+                - The current user is authenticated as a student and assigned to this specific document
+ 
+                The completion handler's `isAssignedDocument` parameter will be `NO` when:
+                - The document is not part of any assigned document
+                - The current user is not a student (e.g., teacher)
+                - The document has been unassigned or deleted
+                - The student does not have permission to access this assignment
+ 
+ @note          This method is designed to be called from ClassKitUI clients and requires proper ClassKit entitlements.
+                The completion handler may be called on a background thread, so dispatch to the main queue if you need
+                to update UI based on the result.
+ 
+ @param         documentURL         The file URL of the document to check.
+ 
+ @param         completion          A block called when the check is complete. The block takes two parameters:
+                                     - isAssignedDocument: A Boolean indicating whether the document is assigned to the current user.
+                                     - error: An error object if the check failed, or nil if successful.
+ 
+ @code
+ [[CLSDataStore shared] checkIsAssignedDocument:documentURL completion:^(BOOL isAssignedDocument, NSError * _Nullable error) {
+     dispatch_async(dispatch_get_main_queue(), ^{
+         if (error) {
+             NSLog(@"Error checking assignment status: %@", error);
+             return;
+         }
+         
+         if (isAssignedDocument) {
+             // Show UI with submission options
+             [self showAssignedDocumentSubmissionUI];
+         } else {
+             // Show standard document UI
+             [self showStandardDocumentUI];
+         }
+     });
+ }];
+ @endcode
+ */
+- (void)checkIsAssignedDocument:(NSURL *)documentURL
+                     completion:(void(^)(BOOL isAssignedDocument, NSError * _Nullable error))completion
+                     NS_SWIFT_NAME(checkIsAssignedDocument(_:completion:))
+                     NS_SWIFT_ASYNC_NAME(isAssignedDocument(_:))
+                     API_AVAILABLE(ios(26.4), macos(26.4), macCatalyst(26.4), visionos(26.4)) API_UNAVAILABLE(watchos, tvos);
+@end
+
 NS_ASSUME_NONNULL_END

Clone this wiki locally