What’s new in Xcode 15

What’s new in Xcode 15

The next step Apple suggest is to learn about the tools, the first tool Xcode. It is important to know about the feature that are available and that you have next steps that you can look forward to implementing.

“Discover the latest productivity and performance improvements in Xcode 15. Explore enhancements to code completion and Xcode Previews, learn about the test navigator and test report, and find out more about the streamlined distribution process. We’ll also highlight improved navigation, source control management, and debugging.” -Apple

Editing

  • Code completion is faster, makes less mistakes
    • Press ➡️ key to get all overloads of a function in auto-complete
    • Function suggestions are now ordered by usage frequency and context-aware
  • Symbols are now generated for Images and Colors in Asset Catalogs
    • use via Image(.yourImage) or ImageResource.yourImage with autocompletion support & compiler checks
    • likewise you can use Color(.yourColor) or ColorResource.yourColor with autocompletion
  • String Catalogs replace .strings and .stringsdict files – migrate those legacy files via right-click “Migrate”
    • A visual editor shows all languages with their current translation progress and all singular & pluraized translations in one place
    • New translation keys in code are automatically detected and added to the file
    • For more see Discover String Catalogs
  • Real-time preview of documentation by using Assistant Editor For more see Create rich documentation with Swift-DocC

  • Macros make for more expressive APIs, help eliminate repeated code

    • @Observable, #Predicate, @Model examples of macros from Apple
    • New template for creating your own macro packages with sample code provided
    • “Expand Macro” in quick actions menu (Cmd + Shift + A) shows code that’s generated by macro – supports breakpoints
    • For more see Write Swift macros and Expand on Swift macros
  • #Preview { … } replaces PreviewProvider protocol, much easier & more flexible
    • #Preview even supports UIKit & AppKit directly, just create a ViewController for example
    • #Preview supports also Widget timeline, previewing all different time views
    • FOr more see Build programmatic UI with Xcode Previews
  • New Bookmarks navigator (in left menu), right-click any code or search query to add a bookmark
    • You can provide a description for the bookmark, which shows from right side of the code (like #warning)
    • Bookmarks are groupable (like folders), to give them different semantic meanings like TODOs/reminders/etc.
    • You can “complete” a bookmark by pressing a checkbox to its left, or simply delete them – same result
  • New type of search queries available: “conforming type” e.g. to find all conformances to ViewModifier protocol
    • When a search query is bookmarked, you need to press “refresh” button to re-execute query & update matches

Sharing

  • Uncommitted changes now presented in a single scrollable view
    • You can make smaller changes to your code right within that view if you find small issues like typos
    • Stage changes
    • Commit and Push

Testing

  • Teat are 45% fater reporting
  • Test Navigator organizes test
    • You can filter tests at the bottom left
    • New design for reports with a high-level summary of test plan: Top Insights, Stats with pie chart, & more
  • New “Performance Metrics” tab
    • UI tests have full recording until fail, plays automatically when stepping through test, timeline for scrubbing available
    • Even the UI hierarchy is recorded so you can see the hierarchy at any given time during the test
  • For more see Fix failures faster with Xcode test reports

Debugging

  • OSLog deeply integrated to Xcode
    • Initialize: let logger = Logger(subsystem:…)
    • Then call: logger.info(…), logger.warning(…), logger.error(…), logger.notice(…)
    • Clean presentation of logs in Console with background color & optional metadata fields
    • Filtering possible based on metadata, like log level
    • Right-clicking and selecting “Jump to Source” brings you to line where log happened
    • For more see Debug with structured logging

Distributing

  • Xcode Cloud: Test notes support, Notarization support
  • New TestFlight internal testing option during distribution to prevent accidental release to customers
  • New push notification when uploaded build processing finished on Connect (build ready for distribution)
  • For more see Simplify distribution in Xcode and Xcode Cloud

Notes mentioning this note


Here are all the notes in this garden, along with their links, visualized as a graph.

100DaysofSwiftUIAlgorithmsAffirmation TimerBPM ClapperBPM TrainingMetronome Vintage 3DHackingWithSwiftSwiftUI Accessibility Hiding and Grouping DataSwiftUI Accessibility Identifying ViewsSwiftUI Accessibility Read Value ControlsSwiftUI Accessibility Support as NeededSwiftUI AccessibilitySwiftUI Advanced ViewsSwiftUI CGAffineTransformSwiftUI Drawing animatableDataSwiftUI Drawing Special EffectsSwiftUI DrawingSwiftUI ImagePaintSwiftUI MetalSwiftUI PathsSwiftUI ShapesSwiftUI Image AlbumImage GeometryReaderSwiftUI Image InterpolationSwiftUI ImageSwiftUI Intergrate UIKitSwiftUI Basic ViewsSwiftUI ButtonsSwiftUI ColorSwiftUI GradientSwiftUI DatePickerSwiftUI Form ValidationSwiftUI FormSwiftUI SliderSwiftUI StepperSwiftUI TextEditorSwiftUI GridSwiftUI GroupsSwiftUI ListSwiftUI Navigation BarSwiftUI ScrollViewSwiftUI SpacersSwiftUI StacksSwiftUI Views And ModifiersSwiftUI Gestures AdvancedSwiftUI Gestures BasicSwiftUI Gestures CombinedSwiftUI GesturesSwiftUI Custom Row Swipe ActionsSwiftUI HapticsSwiftUI HitTestingSwiftUI InteractionsSwiftUI Searchable ViewsSwiftUI Absolute PositioningSwiftUI AlignmentSwiftUI AlignmentGuideSwiftUI Custom AlignmentSwiftUI GeometryReader BasicsSwiftUI GeometryReader UsageSwiftUI How Layout WorksSwiftUI Layout TechniquesSwiftUI Multiple Views Side by SideSwiftUI Switch View with EnumsSwiftUI Switch View with EnumsSwiftUI NavigationSwift NavigationLinkSwiftUI SheetsSwiftUI TabsSwiftUI BindingSwiftUI Environment WrapperSwiftUI FetchRequest WrapperSwiftUI FocusState WrapperSwiftUI MainActor WrapperSwiftUI ObservableObject WrapperSwiftUI ObservedObject WrapperSwiftUI Property WrappersSwift ObservableObject Manually Publishing ChangesSwiftUI State WrapperSwiftUI StateObject WrapperSwiftUI ViewBuilder WrapperSwiftUI ScenesSwiftUI AlertsSwiftUI Confirmation DialogSwiftUI Context MenuSwiftUI Popup WindowsSwiftUI SheetsCS193p Emoji ArtCS193p Matching GameCS193p Set GameStanford CS193pSwift Basic Data TypesSwift BooleanSwift FloatSwift IntSwift StringSwift ArraySwift ClassSwift Complex Data TypesSwift DictionarySwift EnumSwift SetSwift StructSwift Animating GesturesSwift Animating TransitionsSwift Animations TypesSwift animationsSwift Customize AnimationsSwift URLSessionSwift NetworkingSwift URLSessionSwift Comparable ProtocolsSwift ProtocolsSwift Codable @Published ComformanceSwift CodableSwift Documents DirectorySwift StorageSwift UserDefaultsSwiftSwift App BundleSwift Package DependenciesSwift TimerSwift ToolsSwift Basic TechniquesSwift ClosuresSwift ConditionsSwift ExtensionsSwift FunctionsSwift LoopsSwift OptionalsSwift Variable and ConstantsSwift TechniquesSwift Type AnnotationSwift Unique TypesSwift Result TypeSwift Framework CoreDataSwift Framework CoreImageSwift Framework LocalAuthenticationSwift Framework MLSwift Framework MapKitSwift Framework UNUserNotificationCenterSwift Framework Local NotificationsSwift Framework Remote NotificationsSwift Framework UserNotificationsSwift FrameworksSwiftUI FundamentalsSwiftUI WindowGroupA note about catsConsistency is keyHow to ThinkMove your body every dayYour first seedImage InterpolationCreate accessible spatial experiencesDevelop your first immersive appFundamental Design VisionOSGet started with building apps for spatial...Getting Started visionOSBuild great games for spatial computingCreate a great spatial playback experienceDeliver video content for spatial experiencesDiscover Metal for immersive appsStep Eight visionOSExplore rendering for spatial computingMeet Core Location for spatial computingMeet RealityKit TraceOptimize app power and performance for spatial...Step Five visionOSWhat’s new in Xcode 15Design considerations for vision and motionDesign for spatial inputDesign for spatial user interfacesDesign spatial SharePlay experiencesExplore immersive sound designStep Four visionOSDiscover Quick Look for spatial computingMeet Safari for spatial computingRediscover Safari developer featuresStep Nine visionOSWhat’s new in Safari extensionsBring your Unity VR app to a fully immersive spaceCreate immersive Unity appsExplore App Store Connect for spatial computingStep Seven visionOSExplore materials in Reality Composer ProExplore the USD ecosystemMeet Reality Composer ProStep Six visionOSWork with Reality Composer Pro content in XcodeBuild spatial SharePlay experiencesCreate 3D models for Quick Look spatial...Enhance your iPad and iPhone apps for the Shared...Run your iPad and iPhone apps in visionOSStep Ten visionOSBuilding Spatial Experiences with RealityKitEnhance your spatial computing app with RealityKitEvolve your ARKit app for spatial experiencesMeet ARKit for spatial computingStep Three visionOSElevate your windowed app for spatial computingGo beyond the window with SwiftUIMeet SwiftUI for spatial computingStep Two visionOSTake SwiftUI to the next dimensionTen Steps Overview of visionOS By AppleCreate multiple windows in VisionOSTap and Drag Spatial Gesture in VisionOSVisionOS Basic TutorialsvisionOS Documentation SeriesVisionOS Bear Balloon Reverse Gravity No CollisionVisionOS QuestionsWhy attend WWDCNew to WWDC