Share
Embed
What's new in AppKit on macOS 26
macOS native symposium (https://macos-native.github.io) #11 登壇資料
WWDC25で発表されたmacOS 26の、AppKitでの変更点洗い出しや注目ポイントなど、TahoeのためのmacOSアプリ開発のキャッチアップをお話しします。
1024jp
July 11, 2025
Transcript
49 slides
-
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp ࣗݾհ CotEditor Gapplin Qli application
works plain-text editor SVG viewer movie player macOS meet-up icon works @1024jp hobby macOS developer/designer ͞ΑͳΒݱߦΞΠίϯͨͪʜ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 88%$HVJEFGPSNBD04 w /FX%FTJHO w "QQMF*OUFMMJHFODF
w "QQ*OUFOUTGSBNFXPSLVQEBUFT w .FUBMQPXFSFEHBNFT w 7JEFP& ff FDUT"1* w -JWF"DUJWJUJFT https://developer.apple.com/news/?id=uf3qdaoe ࠓͷ߲ r 88%$ͷϓϥοτϑΥʔϜຖͷ·ͱΊϖʔδ r ηογϣϯಈը͚ͩͰͳ͘ɺ αϯϓϧίʔυղઆυΩϡϝϯτͷϦϯΫ͋Δ r "QQMFͷਪٕ͠ज़͕ฒΜͰΔ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp NBD04SFMBUFETFTTJPOTJO88%$ r ࣮࣭ɺ8IBU`T/FXJO"QQ,JU r 5BIPFͷ6*৽ؔ࿈ͷใ͜ΕͰΓΔɻ
310 Build an AppKit app with the new design https://developer.apple.com/videos/play/wwdc2025/310 256 What ’ s New in SwiftUI https://developer.apple.com/videos/play/wwdc2025/256 323 Build a SwiftUI app with the new design https://developer.apple.com/videos/play/wwdc2025/323 245 What ’ s New in Swift https://developer.apple.com/videos/play/wwdc2025/245 220 Say hello to the new look of app icons https://developer.apple.com/videos/play/wwdc2025/220 229 Make your Mac app more accessible to everyone https://developer.apple.com/videos/play/wwdc2025/229 ͦͷ΄͔NBD04ʹؔ࿈͢Δجຊηογϣϯ ͓͢͢Ίʂ 219 Meet Liquid Glass https://developer.apple.com/videos/play/wwdc2025/219 356 Get to know the new design system https://developer.apple.com/videos/play/wwdc2025/356 -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 88%$/PUFT https://wwdcnotes.com/documentation/wwdcnotes/ r Ͳ͔ͬͰΈͨ͜ͱͷ͋ΔϨΠΞτͷඇެࣜαΠτ
r ༗ࢤ͕88%$ͷ4FTTJPOಈըΛηογϣϯ͝ͱʹ هࣄͱͯ͠จࣈԽͯ͠·ͱΊ͍ͯΔ r ಈըݟΔͷ͕ͩΔ͍࣌ʹ࠷ద r ݟ͍͢ ඇެࣜ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 0 ffi DJBMEPDVNFOUBUJPO https://developer.apple.com/documentation/macos-release-notes/macos-26-release-notes?language=objc
r NBD04ؔͷϦϦʔεϊʔτ r "QQ,JUͷهࡌ΄΅ͳ͘04શൠ r 5FYU,JU"7'PVOEBUJPOͳͲ։ൃऀ͚هࡌ͋Δ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 8IBU`TOFXJO"QQ,JU 124 What ’ s
new in AppKit https://developer.apple.com/videos/play/wwdc2024/10124 r ·Ͱ͋ͬͨ r ·Ͱ͋ͬͨ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp "QQ,JUIFBEFSEJ f Xcode-beta.app/ └ Contents/
└ Developer/ └ Platforms/ └ MacOSX.platform/ └ Developer/ └ SDKs/ └ MacOSX.sdk/ └ System/ └ Library/ └ Frameworks/ └ AppKit.framework/ └ Headers/ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp -JRVJE(MBTTSFMBUFEWJFXT Glass Effect class NSGlassEffectView
class NSGlassEffectContainerView class NSBackgroundExtensionView 3 1 0 Build an AppKit app with the new design -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4QMJUWJFXT NSSplitViewItem var automaticallyAdjustsSafeAreaInsets: Bool
class NSSplitViewItemAccessoryViewController var topAlignedAccessoryViewControllers: [NSSplitViewItemAccessoryViewController] var bottomAlignedAccessoryViewControllers: [NSSplitViewItemAccessoryViewController] func addTopAlignedAccessoryViewController(NSSplitViewItemAccessoryViewController) func insertTopAlignedAccessoryViewController(NSSplitViewItemAccessoryViewController, at: Int) func removeTopAlignedAccessoryViewController(at: Int) func addBottomAlignedAccessoryViewController(NSSplitViewItemAccessoryViewController) func insertBottomAlignedAccessoryViewController(NSSplitViewItemAccessoryViewController, at: Int) func removeBottomAlignedAccessoryViewController(at: Int) 3 1 0 Build an AppKit app with the new design -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp $POUSPMT NSControl NSControl.ControlSize.extraLarge NSButton var
tintProminence: NSTintProminence var backgroundTintColor: NSColor var borderShape: NSControl.BorderShape NSButton.BezelStyle.glass ˡυΩϡϝϯτ͔Β ɹɹ࿙ΕͯΔ enum NSControl.BorderShape { case automatic case capsule case roundedRectangle case circle } NSSlider var tintProminence: NSTintProminence var naturalValue: Double 3 1 0 Build an AppKit app with the new design NSSegmentedControl var borderShape: NSControl.BorderShape -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 5PPMCBSJUFNT NSToolbarItem var style: NSToolbarItem.Style
var backgroundTintColor: NSColor var badge: NSItemBadge? NSToolbarItem.Style.prominent 3 1 0 Build an AppKit app with the new design -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 1SFGFSTDPNQBDUDPOUSPMTJ[FNFUSJDT NSView var prefersCompactControlSizeMetrics: Bool
3 1 0 Build an AppKit app with the new design r NBD04ʹ͓͚Δ-JRVJE(MBTTͷϨΠΞτͷᷤ౻Λࣽ٧Ίͨϑϥά r NBD04Ͱͷίϯτϩʔϧͷେ͖͞มߋΛࢭͯ͠ɺ NBD04·Ͱͷେ͖͞Λ࠾༻͢Δ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp Label "1*TJOUSPEVDFEJOTFTTJPOTCVUOPUFYJTU NSView struct
NSView.LayoutRegion func layoutGuide(for region: NSView.LayoutRegion) -> NSLayoutGuide func edgeInsets(for region: NSView.LayoutRegion) -> NSEdgeInsets func directionalEdgeInsets(for region: NSView.LayoutRegion) -> NSDirectionalEdgeInsets func rect(for region: NSView.LayoutRegion) -> NSRect 3 1 0 Build an AppKit app with the new design NSView.LayoutRegions func safeArea(cornerAdaption: AdaptivityAxis?) -> LayoutRegion func margins(cornerAdaption: AdaptivityAxis?) -> LayoutRegion -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4ZNCPMDPO fi HVSBUJPOT NSImage.SymbolConfiguration convenience
init(colorRenderingMode: NSImage.SymbolColorRenderingMode) convenience init(variableValueMode: NSImage.SymbolVariableValueMode) r 4'4ZNCPMͷ৽͍͠ඳըελΠϧ r 4XJGU6*ʹಉͷ"1*͕͋Δ ͷͰͦͬͪͰௐΔͱใ͕๛ enum SymbolVariableValueMode { case automatic case color case draw } enum SymbolColorRenderingMode { case automatic case flat case gradient } 3 3 7 What ’ s New in SF Symbol 7 -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4ZNCPMDPO fi HVSBUJPOT 3 3
7 What ’ s New in SF Symbol 7 SymbolEffect static var drawOff: DrawOffSymbolEffect static var drawOn: DrawOnSymbolEffect -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 5FYUMJTUNBSLFST NSTextContainerStorage var includesTextListMarkers: bool
NSTextList class var includesTextListMarkers: bool NSWritingToolsCoordinator var includesTextListMarkers: bool r ϦετϚʔΧʔΛ༰ʹؚΊΔ͔Ͳ͏͔ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp SFTPMWFT/BUVSBM"MJHONFOU8JUI#BTF8SJUJOH%JSFDUJPO var resolvesNaturalAlignmentWithBaseWritingDirection: Bool NSTextField
NSTextLayoutManager var resolvesNaturalAlignmentWithBaseWritingDirection: Bool r 35-༻ͷϨΠΞτղܾํ๏ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 8SJUJOHUPPMT static var presentationIntent: NSWritingToolsResultOptions
NSWritingToolsResultOptions r 3FTVMU0QUJPOTͷ͏ͪͷ.plainTextҎ֎ͱͳΔɺ.richText .list .tableΛଋͶͨͷ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp "DDFTTJCJMJUZSPMFT NSAccessibility.Role static let headingRole:
NSAccessibility.Role static let listMarkerRole: NSAccessibility.Role static let webAreaRole: NSAccessibility.Role NSAccessibility.subrole static let suggestionSubrole: NSAccessibility.Subrole FB18556966 New NSAccessibility.Role APIs should omit the `Role` suffix (macOS 26 SDK) -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp "DDFTTJCJMJUZBUUSJCVUFT NSAccessibility.Attribute static let blockQuoteLevelAttribute:
NSAccessibility.Attribute static let headingLevelAttribute: NSAccessibility.Attribute static let languageAttribute: NSAccessibility.Attribute static let visitedAttribute: NSAccessibility.Attribute NSAccessibility.ParameterizedAttribute static let indexForChildUIElementAttribute: NSAccessibility.ParameterizedAttribute static let indexForChildUIElementInNavigationOrderAttribute: NSAccessibility.ParameterizedAttribute static let uiElementForSearchPredicateParameterizedAttribute: NSAccessibility.ParameterizedAttribute -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp "DDFTTJCJMJUZTFBSDILFZT NSAccessibilitySearchKey anyTypeSearchKey, articleSearchKey, blockquoteSameLevelSearchKey,
blockquoteSearchKey, boldFontSearchKey, buttonSearchKey, checkBoxSearchKey, controlSearchKey, differentTypeSearchKey, fontChangeSearchKey, fontColorChangeSearchKey, frameSearchKey, graphicSearchKey, headingLevel1SearchKey, headingLevel2SearchKey, headingLevel3SearchKey, headingLevel4SearchKey, headingLevel5SearchKey, headingLevel6SearchKey, headingSameLevelSearchKey, headingSearchKey, italicFontSearchKey, keyboardFocusableSearchKey, landmarkSearchKey, linkSearchKey, listSearchKey, liveRegionSearchKey, misspelledWordSearchKey, outlineSearchKey, plainTextSearchKey, radioGroupSearchKey, sameTypeSearchKey, staticTextSearchKey, styleChangeSearchKey, tableSameLevelSearchKey, tableSearchKey, textFieldSearchKey, textStateChangeTypeKey, textStateSyncKey, underlineSearchKey, unvisitedLinkSearchKey, visitedLinkSearchKey -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp &WFOUT NSGestureRecognizer var modifierFlags: NSEvent.ModifierFlags
var name: String? func mouseCancelled(NSEvent) NSResponder func mouseCancelled(with: NSEvent) NSEvent.EventType case mouseCancelled FB18618763 New `.mouseCancelled(_:)` method in NSGestureRecognizer on macOS 26 should have `with` argument label -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp %JTQMBZ*% NSScreen var cgDirectDisplayID: CGDirectDisplayID?
r $PSF(SBQIJDTͷ%JTQMBZ*%͕/44DSFFO͔Β؆୯ʹऔΕΔΑ͏ʹͳͬͨ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 1MBDFIPMEFSTUSJOHT NSTextField var placeholderStrings: [String]
var placeholderAttributedStrings: [NSAttributedString] // Placeholder textField.placeholderString = “Dog” // Placeholder_s_ textField.placeholderStrings = ["Dog", "Cow", "Dogcow"] r ςΩετͷBSSBZΛड͚औΕΔϓϨʔεϗϧμ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp ͳͲ r ܕɾΞΫλʔ͖Ͱ/PUJ fi DBUJPOΛड͚ΒΕΔ
͔͍͍ͬͭ͜ʢʂʣ r NBD04 r /PUGPS"QQ,JU 5ZQFEOPUJ fi DBUJPOT ਖ਼֬ʹ͍͑"QQ,JUͰ͑Δͷ͕ͩɺ "QQ,JUͷΫϥεʹ͜ͷ"1*༻ͷϝοηʔδ໊͕ ΄ͱΜͲ༻ҙ͞Ε͍ͯͳ͍ɻ 6*8JOEPXͷ༷ࢠ ͳͲ NotificationCenter func addObserver<Message>(of: Message.Subject?, for: Message.Type, using: (Message) async -> Void) -> NotificationCenter.ObservationToken 2 4 5 What ’ s New in Swift -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 5ZQFEOPUJ fi DBUJPOT NSWorkspace struct
AccessibilityDisplayOptionsDidChangeMessage struct ActiveSpaceDidChangeMessage struct DidActivateApplicationMessage struct DidChangeFileLabelsMessage struct DidDeactivateApplicationMessage struct DidHideApplicationMessage struct DidLaunchApplicationMessage struct DidMountVolumeMessage struct DidRenameVolumeMessage struct DidTerminateApplicationMessage struct DidUnhideApplicationMessage struct DidUnmountVolumeMessage struct DidWakeMessage struct ScreensDidSleepMessage struct ScreensDidWakeMessage struct SessionDidBecomeActiveMessage struct SessionDidResignActiveMessage struct WillLaunchApplicationMessage struct WillSleepMessage struct WillUnmountVolumeMessage /48PSLTQBDF͚ͩඋࡁΈ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp )%3TVQQPSUTVQQSFTTJPO var applicationShouldSuppressHighDynamicRangeContent: Bool NSApplication
static var shouldBeginSuppressingHighDynamicRangeContent: NotificationCenter .BaseMessageIdentifier<NSApplication.ShouldBeginSuppressingHighDynamicRangeContent> static var shouldEndSuppressingHighDynamicRangeContent: NotificationCenter .BaseMessageIdentifier<NSApplication.ShouldEndSuppressingHighDynamicRangeContent> NotificationCenter.MessageIdentifier struct ShouldBeginSuppressingHighDynamicRangeContent struct ShouldEndSuppressingHighDynamicRangeContent r )%3ͷαϙʔτΛೳಈతʹΓସ͑Δ"1* ͜͜/PUJGJDBUJPO͕උ͞ΕͯΔ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4XJGU6*IPTUJOHTIFFUSFQSFTFOUBUJPO class HostingSheetRepresentation func beginSheet<V>(content:
() -> V, completionHandler: (() -> Void)?) -> NSWindow.HostingSheetRepresentation<V> func endSheet<V>(NSWindow.HostingSheetRepresentation<V>) NSWindow r /48JOEPX͔Β4XJGU6*ͷγʔτΛ։ดͰ͖Δ let token = window.beginSheet { Text("Hello Clarus!”) .scenePadding() } window.endSheet(token) .BDͩͱɺ ϝΠϯΠϯυ4XJGU6*ʹҠͤͳ͍͚Ͳ γʔτ͘Β͍4XJGU6*Ͱॻ͍ͨํָ͕ͳ͜ͱ͕ଟ͍ͷͰɺ ͚ͬ͜͏ศརͦ͏ 2 5 6 What ’ s New in SwiftUI -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4XJGU6*IPTUJOHTDFOFSFQSFTFOUBUJPO NSApplication func addSceneRepresentation<C>(NSHostingSceneRepresentation<C>) @main
final class AppDelegate: NSApplicationDelegate { let scene = NSHostingSceneRepresentation { Settings { SettingsView() } } func applicationWillFinishLaunching(_ notification: Notification) { NSApplication.shared.addSceneRepresentation(scene) } @IBAction func showAppSettings(_ sender: NSMenuItem) { scene.environment.openSettings() } } 2 5 6 What ’ s New in SwiftUI -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp /4%PDVNFOU $POUSPMMFST IBOEMFST macOS 26
SDK func save(to url: URL, ofType typeName: String, for saveOperation: NSDocument.SaveOperationType, completionHandler: @escaping @Sendable ((any Error)?)-> Void) func save(to url: URL, ofType typeName: String, for saveOperation: NSDocument.SaveOperationType, completionHandler: @escaping ((any Error)?)-> Void) macOS 15.5 SDK FB18474058 Completion handler of NSDocument.save(to:ofType:for: completionHandler:) should be annotated with @MainActor -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4XJGU6*TXJGUVOUFSGBDFEJ f w XJOEPXSFTJ[JOH w
-JTU5BCMFඳըͷ࠷దԽ w %SBH%SPQؔ࿈ w (FTUVSFؔ࿈ w WJTJPO04࿈ܞ r มߋͨ͘͞Μ͋Δ͠ɺ ࢿྉ·ͱ·ͬͯΔͷͰׂѪ r NBD04ݻ༗ͷͩͱҎԼ͔ɿ 4XJGU6*શൠͷهࣄͩͱ ݴٴ͞Εͳ͍Մೳੑ͋Γ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 'PVOEBUJPOIFBEFSEJ f NSCalendar.Identifier static let
bangla: NSCalendar.Identifier static let dangi: NSCalendar.Identifier static let gujarati: NSCalendar.Identifier static let kannada: NSCalendar.Identifier static let malayalam: NSCalendar.Identifier static let marathi: NSCalendar.Identifier static let odia: NSCalendar.Identifier static let tamil: NSCalendar.Identifier static let telugu: NSCalendar.Identifier static let vietnamese: NSCalendar.Identifier static let vikram: NSCalendar.Identifier -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 'PVOEBUJPOIFBEFSEJ f NSStringAttribute.Key static let
listItemDelimiter: NSAttributedString.Key static let writingDirection: NSAttributedString.Key -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 'PVOEBUJPOIFBEFSEJ f FileManager func fetchLatestRemoteVersionOfItem(at:
URL, completionHandler: ((NSFileVersion, (any Error)?) -> Void)?) func pauseSyncForUbiquitousItem(at url: URL, completionHandler: (((any Error)?) -> Void)?) func replaceItemAt(_ originalItemURL: URL, withItemAt: URL, backupItemName: String?, options: FileManager.ItemReplacementOptions) throws -> NSURL? func resumeSyncForUbiquitousItem(at url: URL, with: NSFileManagerResumeSyncBehavior, completionHandler: ((any Error)?) -> Void) func uploadLocalVersionOfUbiquitousItem(at url: URL, withConflictResolutionPolicy: NSFileManagerUploadLocalVersionConflictPolicy, completionHandler: ((NSFileVersion, (any Error)?) -> Void)?) struct UbiquityIdentityDidChangeMessage ໋໊͕ࡶ͗͢Δʜ -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 'PVOEBUJPOIFBEFSEJ f URLResourceKey static let
ubiquitousItemIsSyncPausedKey: URLResourceKey static let ubiquitousItemSupportedSyncControlsKey: URLResourceKey URLSessionConfiguration var enablesEarlyData: Bool -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 6OEPNBOBHFS macOS 26 SDK @MainActor
@preconcurrency func registerUndo<TargetType>(withTarget target: TargetType, handler: @escaping @MainActor (TargetType) -> Void) r handlerʹ@MainActor͕͍ͨɻ ͬͨͶʂ @preconcurrency func registerUndo<TargetType>(withTarget target: TargetType, handler: @escaping (TargetType) -> Void) macOS 15.5 SDK -
macOS native 8IBU`TOFXJO"QQ,JU ©2025 1024jp 4FUUJOHTXJOEPXMBZPVU 88%$Ͱ"QQMFͷΤϯδχΞʹ㘤͍ͯΈͨɿ ͦ͏ɺ͜Ε͕৽͍͠ઃఆͷελΠϧɻ ͜Ε͔ΒطଘΞϓϦɺͲΜͲΜ ͜ͷελΠϧʹγϑτ͢ΔͷΛΦεεϝʂ
SwiftUI for macOSΤϯδχΞ AppKitΤϯδχΞ ͍͊ɺ.BDͷઃఆΠϯυͱ͍͑͜ ͷैདྷͷͩΑɻʢ$PU&EJUPSͷઃఆΠϯυ Λݟͯʣͦ͏ɺ͜Εɻͦͷ··Ͱ͍͍ ΑɻҠߦͳΜͯඞཁͳ͍͔Βɻ 9DPEF·͊ɺಛघ͔ͩΒͶ͐ɻ ઃఆ߲ଟ͍͠ɻ͋Εྫ֎ɻ