Xcode Previews

RSS for tag

Create 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

SwiftUI Previews broken on local Swift Package with dependencies
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
6
1
1.9k
Oct ’24
SwiftUI Previews not working Xcode 15 iOS 17 simulator
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.
9
4
4.1k
Dec ’24
Xcode 15 Beta Stuck on preparing iphone simulator for previews
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
6
2
4.5k
Dec ’24
Using @Namespace in #Preview Xcode 15 gives an error message
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.
3
0
2.2k
Mar ’25