Skip to content

PencilKit macOS xcode26.0 b1

Alex Soto edited this page Jun 9, 2025 · 1 revision

#PencilKit.framework

diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKContentVersion.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKContentVersion.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKContentVersion.h	2025-04-19 04:56:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKContentVersion.h	2025-05-25 08:26:04
@@ -22,7 +22,10 @@
     
     /// New Fountain Pen
     PKContentVersion3 NS_SWIFT_NAME(version3) API_AVAILABLE(ios(17.5), macos(14.5)),
+    
+    /// New Reed Pen
+    PKContentVersion4 NS_SWIFT_NAME(version4) API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)),
 
     /// The latest version including all features.
-    PKContentVersionLatest = 3
+    PKContentVersionLatest = 4
 };
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkType.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkType.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkType.h	2025-04-19 04:56:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkType.h	2025-05-25 08:26:04
@@ -15,4 +15,6 @@
 API_AVAILABLE(ios(17.0), macos(14.0))  FOUNDATION_EXPORT PKInkType const PKInkTypeMonoline;
 API_AVAILABLE(ios(17.0), macos(14.0))  FOUNDATION_EXPORT PKInkType const PKInkTypeFountainPen;
 API_AVAILABLE(ios(17.0), macos(14.0))  FOUNDATION_EXPORT PKInkType const PKInkTypeWatercolor;
+API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0))  FOUNDATION_EXPORT PKInkType const PKInkTypeReed;
+API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0))  FOUNDATION_EXPORT PKInkType const PKInkTypeReedCalligraphyPen;
 API_AVAILABLE(ios(17.0), macos(14.0))  FOUNDATION_EXPORT PKInkType const PKInkTypeCrayon;
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkingTool.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkingTool.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkingTool.h	2025-04-19 04:56:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKInkingTool.h	2025-05-25 08:26:04
@@ -35,6 +35,18 @@
 - (instancetype)initWithInkType:(PKInkType)type color:(NSColor *)color width:(CGFloat)width NS_DESIGNATED_INITIALIZER;
 #endif
 
+/// Create a new inking tool, specifying its type, color, width, and angle.
+///
+/// @param type The type of ink.
+/// @param color The color of the ink.
+/// @param width The width of the ink.
+/// @param angle The angle of the ink.
+#if TARGET_OS_IPHONE
+- (instancetype)initWithInkType:(PKInkType)type color:(UIColor *)color width:(CGFloat)width azimuth:(CGFloat)angle NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0));
+#else
+- (instancetype)initWithInkType:(PKInkType)type color:(NSColor *)color width:(CGFloat)width azimuth:(CGFloat)angle NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0));
+#endif
+
 /// Create a new inking tool, specifying its type and color, using a default width.
 ///
 /// @param type The type of ink.
@@ -83,6 +95,9 @@
 
 /// The base width of the ink.
 @property (nonatomic, readonly) CGFloat width;
+
+/// The base angle of the ink.
+@property (nonatomic, readonly) CGFloat azimuth API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0));
 
 /// The ink that this tool will create strokes with.
 @property (nonatomic, readonly) PKInk *ink API_AVAILABLE(ios(14.0));
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKStrokePoint.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKStrokePoint.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKStrokePoint.h	2025-04-19 04:56:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKStrokePoint.h	2025-05-25 08:26:04
@@ -23,6 +23,9 @@
 /// Create a new point with the provided properties.
 - (instancetype)initWithLocation:(CGPoint)location timeOffset:(NSTimeInterval)timeOffset size:(CGSize)size opacity:(CGFloat)opacity force:(CGFloat)force azimuth:(CGFloat)azimuth altitude:(CGFloat)altitude secondaryScale:(CGFloat)secondaryScale NS_DESIGNATED_INITIALIZER;
 
+/// Create a new point with the provided properties.
+- (instancetype)initWithLocation:(CGPoint)location timeOffset:(NSTimeInterval)timeOffset size:(CGSize)size opacity:(CGFloat)opacity force:(CGFloat)force azimuth:(CGFloat)azimuth altitude:(CGFloat)altitude secondaryScale:(CGFloat)secondaryScale threshold:(CGFloat)threshold NS_DESIGNATED_INITIALIZER;
+
 /// Location of the point.
 @property (nonatomic, readonly) CGPoint location;
 /// Time offset since the start of the stroke path in seconds.
@@ -43,6 +46,12 @@
 ///
 /// For example the scaling of the pigment in the watercolor ink.
 @property (nonatomic, readonly) CGFloat secondaryScale API_AVAILABLE(ios(17.0), macos(14.0));
+
+/// The threshold for clipping the stroke rendering.
+///
+/// When rendering only pixels with an alpha greater than the threshold are drawn. A threshold of 0 has no affect on rendering,
+/// a threshold of 1 does not draw anything. Thresholds are only used for some inks, eg. `PKInkIdentifierReed`.
+@property (nonatomic, readonly) CGFloat threshold API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0));
 
 @end
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerEraserItem.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerEraserItem.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerEraserItem.h	1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerEraserItem.h	2025-05-25 08:26:04
@@ -0,0 +1,32 @@
+//
+//  PKToolPickerEraserItem.h
+//  PencilKit
+//
+//  Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <PencilKit/PKToolPickerItem.h>
+#import <PencilKit/PKEraserTool.h>
+
+#import <CoreGraphics/CoreGraphics.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// A user interface for an eraser tool item in PKToolPicker.
+API_AVAILABLE(ios(18.0), visionos(2.0), macos(26.0))
+@interface PKToolPickerEraserItem : PKToolPickerItem
+
+/// Create a new eraser tool item.
+- (instancetype)initWithEraserType:(PKEraserType)eraserType NS_REFINED_FOR_SWIFT;
+
+/// Create a new eraser tool item with a width.
+/// @param eraserType The type of eraser.
+/// @param width The width of the eraser.
+- (instancetype)initWithEraserType:(PKEraserType)eraserType width:(CGFloat)width NS_REFINED_FOR_SWIFT;
+
+/// An eraser tool for erasing parts of a drawing.
+@property (nonatomic, readonly) PKEraserTool *eraserTool NS_REFINED_FOR_SWIFT;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerInkingItem.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerInkingItem.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerInkingItem.h	1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerInkingItem.h	2025-05-25 08:26:04
@@ -0,0 +1,82 @@
+//
+//  PKToolPickerInkingItem.h
+//  PencilKit
+//
+//  Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <PencilKit/PKToolPickerItem.h>
+#import <PencilKit/PKInkType.h>
+
+#import <CoreGraphics/CoreGraphics.h>
+
+@class PKInkingTool;
+@class UIColor;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// A user interface for an inking tool item in PKToolPicker.
+API_AVAILABLE(ios(18.0), visionos(2.0), macos(26.0))
+@interface PKToolPickerInkingItem : PKToolPickerItem
+
+/// Create a new tool picker item with a `PKInkType`.
+/// @param inkType The ink type for the tool.
+- (instancetype)initWithInkType:(PKInkType)inkType NS_REFINED_FOR_SWIFT;
+
+/// Create a new tool picker item with a `PKInkType`.
+/// @param inkType The ink type for the tool.
+/// @param color The color for the tool.
+#if TARGET_OS_IPHONE
+- (instancetype)initWithInkType:(PKInkType)inkType color:(UIColor *)color NS_REFINED_FOR_SWIFT;
+#else
+- (instancetype)initWithInkType:(PKInkType)inkType color:(NSColor *)color NS_REFINED_FOR_SWIFT;
+#endif
+
+/// Create a new tool picker item with a `PKInkType`.
+/// @param inkType The ink type for the tool.
+/// @param width The width for the tool.
+- (instancetype)initWithInkType:(PKInkType)inkType width:(CGFloat)width NS_REFINED_FOR_SWIFT;
+
+/// Create a new tool picker item with a `PKInkType`.
+/// @param inkType The ink type for the tool.
+/// @param color The color for the tool.
+/// @param width The width for the tool.
+#if TARGET_OS_IPHONE
+- (instancetype)initWithInkType:(PKInkType)inkType color:(UIColor *)color width:(CGFloat)width NS_REFINED_FOR_SWIFT;
+#else
+- (instancetype)initWithInkType:(PKInkType)inkType color:(NSColor *)color width:(CGFloat)width NS_REFINED_FOR_SWIFT;
+#endif
+
+/// Create a new tool picker item with a `PKInkType`.
+/// @param inkType The ink type for the tool.
+/// @param color The color for the tool.
+/// @param width The width for the tool.
+/// @param identifier The identifier for the tool item. Passing `nil` resolves to a default value based on the `PKInkType`.
+#if TARGET_OS_IPHONE
+- (instancetype)initWithInkType:(PKInkType)inkType color:(UIColor *)color width:(CGFloat)width identifier:(nullable NSString *)identifier NS_REFINED_FOR_SWIFT;
+#else
+- (instancetype)initWithInkType:(PKInkType)inkType color:(NSColor *)color width:(CGFloat)width identifier:(nullable NSString *)identifier NS_REFINED_FOR_SWIFT;
+#endif
+
+/// Create a new tool picker item with a `PKInkType`.
+/// @param inkType The ink type for the tool.
+/// @param color The color for the tool.
+/// @param width The width for the tool.
+/// @param azimuth The azimuth for the tool.
+/// @param identifier The identifier for the tool item. Passing `nil` resolves to a default value based on the `PKInkType`.
+#if TARGET_OS_IPHONE
+- (instancetype)initWithInkType:(PKInkType)inkType color:(UIColor *)color width:(CGFloat)width azimuth:(CGFloat)azimuth identifier:(nullable NSString *)identifier API_AVAILABLE(ios(26.0), visionos(26.0)) NS_REFINED_FOR_SWIFT;
+#else
+- (instancetype)initWithInkType:(PKInkType)inkType color:(NSColor *)color width:(CGFloat)width azimuth:(CGFloat)azimuth identifier:(nullable NSString *)identifier NS_REFINED_FOR_SWIFT;
+#endif
+
+/// A tool for drawing on a `PKCanvasView`.
+@property (nonatomic, readonly) PKInkingTool *inkingTool NS_REFINED_FOR_SWIFT;
+
+/// Present color selection UI to the user.
+/// Default value is YES.
+@property (nonatomic, assign) BOOL allowsColorSelection;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerItem.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerItem.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerItem.h	1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PKToolPickerItem.h	2025-05-25 08:26:04
@@ -0,0 +1,30 @@
+//
+//  PKToolPickerItem.h
+//  PencilKit
+//
+//  Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class PKTool;
+
+/// A user interface for a tool item in PKToolPicker.
+API_AVAILABLE(ios(18.0), visionos(2.0), macos(26.0))
+@interface PKToolPickerItem : NSObject <NSCopying>
+ 
+- (instancetype)init NS_UNAVAILABLE;
+
+/// A string that identifies the item in the picker.
+/// For example, com.example.myapp.toolpicker.pencil.
+/// If multiple items with the same identifier are used to create the picker, only the first instance is used.
+@property (nonatomic, readonly) NSString *identifier;
+
+/// The `PKTool` this tool picker item represents.
+@property (nonatomic, nullable, readonly) PKTool *tool API_AVAILABLE(ios(26.0), visionos(26.0)) NS_REFINED_FOR_SWIFT;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PencilKit.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PencilKit.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PencilKit.h	2025-04-19 04:55:59
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PencilKit.framework/Headers/PencilKit.h	2025-05-25 08:26:04
@@ -11,19 +11,20 @@
 #import <PencilKit/PKCanvasView.h>
 #import <PencilKit/PKToolPicker.h>
 #import <PencilKit/PKToolPickerCustomItem.h>
-#import <PencilKit/PKToolPickerEraserItem.h>
-#import <PencilKit/PKToolPickerInkingItem.h>
 #import <PencilKit/PKToolPickerCustomItemConfiguration.h>
-#import <PencilKit/PKToolPickerItem.h>
 #import <PencilKit/PKToolPickerLassoItem.h>
 #import <PencilKit/PKToolPickerRulerItem.h>
 #import <PencilKit/PKToolPickerScribbleItem.h>
+#import <PencilKit/PKResponderState.h>
 #endif
 
 #import <PencilKit/PKTool.h>
 #import <PencilKit/PKLassoTool.h>
 #import <PencilKit/PKEraserTool.h>
 #import <PencilKit/PKInkingTool.h>
+#import <PencilKit/PKToolPickerEraserItem.h>
+#import <PencilKit/PKToolPickerInkingItem.h>
+#import <PencilKit/PKToolPickerItem.h>
 
 #import <PencilKit/PKDrawing.h>
 #import <PencilKit/PKStroke.h>
Clone this wiki locally