I tried cleaning the build folder and quitting then reopening Xcode to no avail.
Using Xcode 12.0.1 previewing on iPhone 11.
Code Block RemoteHumanReadableError: Failed to update preview. Error encountered when sending 'display' message to agent. ================================== | RemoteHumanReadableError | | LoadingError: failed to load library at path "/private/var/mobile/Containers/Data/Application/16712E81-3730-4827-A26F-A9AA2399EB0B//tmp/C791BCFF-36DF-4238-8C18-38E85FD6FEE0-ContentView.2.preview-thunk.dylib": Optional(dlopen(/private/var/mobile/Containers/Data/Application/16712E81-3730-4827-A26F-A9AA2399EB0B/tmp/C791BCFF-36DF-4238-8C18-38E85FD6FEE0-ContentView.2.preview-thunk.dylib, 2): no suitable image found. Did find: | /private/var/mobile/Containers/Data/Application/16712E81-3730-4827-A26F-A9AA2399EB0B/tmp/C791BCFF-36DF-4238-8C18-38E85FD6FEE0-ContentView.2.preview-thunk.dylib: code signature invalid for '/private/var/mobile/Containers/Data/Application/16712E81-3730-4827-A26F-A9AA2399EB0B/tmp/C791BCFF-36DF-4238-8C18-38E85FD6FEE0-ContentView.2.preview-thunk.dylib' | )
Code Block RemoteHumanReadableError: Failed to update preview. Error encountered when sending 'display' message to agent. ================================== | RemoteHumanReadableError | | LoadingError: failed to load library at path "/private/var/mobile/Containers/Data/Application/66168AF1-A427-4DD2-BC79-C9B0BF1198DB//tmp/13AA5AC6-EB80-4560-980A-7DE8E77CE026-ContentView.2.preview-thunk.dylib": Optional(dlopen(/private/var/mobile/Containers/Data/Application/66168AF1-A427-4DD2-BC79-C9B0BF1198DB/tmp/13AA5AC6-EB80-4560-980A-7DE8E77CE026-ContentView.2.preview-thunk.dylib, 2): no suitable image found. Did find: | /private/var/mobile/Containers/Data/Application/66168AF1-A427-4DD2-BC79-C9B0BF1198DB/tmp/13AA5AC6-EB80-4560-980A-7DE8E77CE026-ContentView.2.preview-thunk.dylib: code signature invalid for '/private/var/mobile/Containers/Data/Application/66168AF1-A427-4DD2-BC79-C9B0BF1198DB/tmp/13AA5AC6-EB80-4560-980A-7DE8E77CE026-ContentView.2.preview-thunk.dylib' | )
When you get an error in Xcode Previews, an error banner appears in the canvas
Click the "Diagnostics" button in that banner
In the sheet that appears, click "Generate Report" in the bottom left of the sheet
Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
Hi,
Sorry in the delay in getting back to you. I've made sure both your feedback reports have been assigned to the right team so they can get triaged as soon as possible.
I’ve tried again with Xcode 13 beta 2 previewing on a device with iOS 15 beta 2 and the same error appears in the preview canvas.
Hopefully, this will be resolved in time for the final release.
After seeing that my feedback report (FB8991275) has a potential fix in Xcode 13, I tried previewing on a device running iOS 15 beta 4 using Xcode 13 beta 4 and unfortunately I am getting the same error message, again. I really hope that this fix will be available in future betas or at least the official release of Xcode 13.
I have tried this once more using Xcode 13 beta 5 using a device running iOS 15 beta 8 and it works.
Thank you very much to those who got this working!