With the latest Xcode 16 RC version, the Live Preview on iPhone device problem has been fixed.
However, it still fails on the iPhone 16 pro preview emulator even for the simplest hello world view.
Apparently in Xcode 16, introducing any 3rdParty package impacts the preview build, even if the package is not referenced in the view. I feel this is an incorrect behaviour.
Following are the steps to reproduce the problem:
- Create a new iOS project in the latest Xcode 16 beta
- Select ContentView in the project and verify the live preview is working and fast
- Go the project’s Package Dependencies tab, add gRPC-Swift (https://github.com/grpc/grpc-swift.git) as a 3rdParty library of this project.
- Go the main project target, select General tab.
- Under Frameworks, Libraries, and Embedded Content section, add “GRPC”
- Go back to ContentView and verify its live preview rendering now takes very long time and eventually failed.
- Select Live Preview Diagnostic, verify error message: Failed to launch app ”PreviewBug.app” in reasonable time…
I have also created a feedback to Apple: FB15110765