I have a project with two local packages
One client package with an interface and some models with dynamic type in the Package.Swift
One feature package with the UI and a dependency to the client package
When I try to preview a view that is not using any models or code from the client package, it loads just fine e.g. a view that is just a container to display things like a card
But when I tried to preview any other view that actually uses models from the client package, it just fails
the first few lines of the preview error display
LinkDylibError: Failed to build <filename>.swift
Linking failed: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: search path '/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks-iphonesimulator' not found
Undefined symbols for architecture arm64:
Also, I'm using Xcode 15.4 and iOS 17 as the min version
Xcode Previews
RSS for tagCreate an app UI and configure almost everything your users see using Xcode Previews.
Posts under Xcode Previews tag
107 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
In the first Xcode 16 beta, none of my SwiftUI previews work - they all just crash on start up.
Has anybody run into this and found a workaround? Have tried all the usual steps of cleaning the project/restarting Xcode.
SwiftUI preview hangs on "Preparing iPhone Simulator for Previews". Also simulator hangs when trying to build and run. This occurred after I installed iOS 17 simulator. I tried reverting back to an iOS 16 version of the simulator, but haven't figured out how to do that. Build and run to an iPhone device works fine. Any ideas would be appreciated. Thanks.
Hiya,
I am having issues trying to use previews in the xcode 15 beta, i am using an M2 macbook air with 8gb of ram.
I am using MacOS Sonoma and iOS 17.0 Beta 1 and am struggling using previews, the base simulator works but no previews.
I am not receiving any error so am very confused.
Any help would be majorly appreciated.
Thanks,
Gus
Greetings...
I am trying to use @Namespace for my matchedGeometryEffect use case.
prior to Xcode 15 beta the following code worked just fine:
struct ChapterItem_Previews: PreviewProvider {
@Namespace static var namespace
static var previews: some View {
ChapterItem(namespace: namespace, show: .constant(true))
}
}
However trying to do the same within the new Xcode 15 beta #Preview Macro
#Preview {
@Namespace var namespace
ChapterItem(namespace: namespace, show: .constant(true))
}
produces the following error message:
Ambiguous use of 'Preview(_:traits:body:)'
May I kindly get assistance on the proper way I can get this to work in Xcode 15 beta?
Please be as detail as you can since I'm still new to swiftUI as well Thank You.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Xcode
Xcode Previews
wwdc2023-10252
wwdc2023-10165
Is there any way to stop previews from live updating? It's constantly running and that's nice when I'm developing, but I'd like it to pause updating when I'm not using the Xcode. It heats up my m1 air and drains unnecessary power reducing the battery levels significantly.
The Build for Previews builds all my targets including the test targets. Is there a way to configure the relevant targets? I do not see an option in the schema editor, and disabling Find Implicit Dependencies has no effect either.