Exactly the same problem here. I openned a thread here https://developer.apple.com/forums/thread/704607. And I do think it's a duplicate here.
I worked arround by working on simulator and downgrading to Xcode 13.2.1 to archive but I cannot build on real device to access features like camera or push notification (from out backoffice).
I narrowed down the problem to a custom struct that a members is of another custom that has another custom structs as a member. Using only build in types compiles ins seconds. Using my custom types jumps to 10 minutes and I removed a lot of my code for this test.
The more I look at it the more I think the compiler struggle to order the files for compilation/linking.
I am not an expert in swift nor in compilation but if I had clues of what is happening I could spend time to refactor my code to ease the compiler work but it just hangs for hours before succeeding.
Hope an apple dev will see those message an take an action to correct it.
btw: there is no such compile time for simulator (using an intel mbp)
EDIT: if an apple dev passes by I can provide some more information or code
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: