Canvas Preview: Cannot preview in this file

Hi, I want to follow the SwiftUI tutorials from Apple Developer. After creating the “Landmarks” app and clicking on ContentView, the preview shows:

Cannot preview in this file
Failed to launch net.bayerthomas.Landmarks

with the Diagnostics:

== PREVIEW UPDATE ERROR:

    FailedToLaunchAppError: Failed to launch net.bayerthomas.Landmarks
    
    ==================================
    
    |  [Remote] JITError
    |  
    |  ==================================
    |  
    |  |  [Remote] CouldNotLoadInputObjectFile: Could not load object file during preview: /Users/thomas/Library/Developer/Xcode/DerivedData/Landmarks-gpfsfizlhntsahandeumxmhwbjfj/Build/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o
    |  |  
    |  |  path: /Users/thomas/Library/Developer/Xcode/DerivedData/Landmarks-gpfsfizlhntsahandeumxmhwbjfj/Build/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o
    |  |  
    |  |  ==================================
    |  |  
    |  |  |  [Remote] XOJITError
    |  |  |  
    |  |  |  XOJITError: '/Users/thomas/Library/Developer/Xcode/DerivedData/Landmarks-gpfsfizlhntsahandeumxmhwbjfj/Build/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o': No such file or directory

I am on a fresh install of Xcode 16.3 on macOS 15.4.1.

Why is the official tutorial from Apple not working?

Hi @thomasbayer

Could you give me some more information? Which simulator are you using? It should say in the lower left hand corner of the preview.

I was able to reproduce the error and fixed it by:

  • adding a code signing team
  • Going to ContentView, commenting out the MapView and the CircleImage view
  • Changing the simulator to iPad.

It seems like it could be an issue with the simulator itself. It'd help if you could file a feedback report at https://feedbackassistant.apple.com and put the FB number here to look into the iPhone simulator working as well.

Thank you!

On my Mac mini M4 Pro, I’ve installed macOS Tahoe 26.0 and Xcode 26.0.1. The error message still appears, even when testing with the iPhone 17 Pro and iPad Pro 11-inch M4 simulators.

The FB numer is: FB20362054

== PREVIEW UPDATE ERROR:

    GroupRecordingError
    
    Error encountered during update group #19
    
    ==================================
    
    |  FailedToLaunchAppError: Failed to launch net.thomasbayer.ChatPrototype
    |  
    |  ==================================
    |  
    |  |  [Remote] JITError
    |  |  
    |  |  ==================================
    |  |  
    |  |  |  [Remote] CouldNotLoadInputObjectFile: Could not load object file during preview: /Users/thomas/Library/Developer/Xcode/DerivedData/ChatPrototype-ebbbmisjgapzykawaadxudtxyjmg/Build/Intermediates.noindex/ChatPrototype.build/Debug-iphonesimulator/ChatPrototype.build/Objects-normal/arm64/ChatPrototypeApp.o
    |  |  |  
    |  |  |  path: /Users/thomas/Library/Developer/Xcode/DerivedData/ChatPrototype-ebbbmisjgapzykawaadxudtxyjmg/Build/Intermediates.noindex/ChatPrototype.build/Debug-iphonesimulator/ChatPrototype.build/Objects-normal/arm64/ChatPrototypeApp.o
    |  |  |  
    |  |  |  ==================================
    |  |  |  
    |  |  |  |  [Remote] XOJITError
    |  |  |  |  
    |  |  |  |  XOJITError: '/Users/thomas/Library/Developer/Xcode/DerivedData/ChatPrototype-ebbbmisjgapzykawaadxudtxyjmg/Build/Intermediates.noindex/ChatPrototype.build/Debug-iphonesimulator/ChatPrototype.build/Objects-normal/arm64/ChatPrototypeApp.o': No such file or directory


Canvas Preview: Cannot preview in this file
 
 
Q