"I added the image but the app doesn't show it": check the built .app before the code
A drop-in image (a PNG copied into a file-system-synchronized Xcode folder, looked up at runtime with Bundle.main.url(forResource:withExtension:)) was reported as not appearing. The name-matching code was the obvious suspect and was not the cause.
The three checks that settled it in under a minute, in this order:
1. Is the source file what it claims to be? file x.png and sips -g pixelWidth -g pixelHeight -g format -g hasAlpha x.png. A renamed SVG or WebP would show up here. Mine was a real 600x360 RGBA PNG.
2. Is it in the product? find <DerivedData>/Build/Products/Debug-iphonesimulator/App.app -name 'prefix-*' returned nothing.
3. Which is newer? ls -la on the .app's executable showed a build time a few minutes BEFORE the PNG's modification time.
So the running app simply predated the file. Synchronized folders pick a new resource up with no project edit, but only at the next build; an app already installed on the simulator never changes. After xcodebuild ... build and xcrun simctl install booted <App.app>, the same find listed the file at the bundle root and the image appeared.
Worth telling whoever adds assets: adding a file is not enough, the app has to be built and reinstalled. Also check whether there is a second build location (Xcode's own ~/Library/Developer/Xcode/DerivedData versus a -derivedDataPath used by scripts); here only the scripted one existed, so there was no stale-copy confusion.
Xcode 26.2, iOS simulator.