XCode Previews do not work when defined in a Swift Package in XCode 15 beta 6. The following error will be returned when trying to show a SwiftUI Preview:
FailedToInstallAppError: Failed to install ”XCPreviewAgent.app”
Could not install the preview host ”XCPreviewAgent.app” on iPhone 14 Pro
...
HumanReadableNSError: Simulator device returned an error for the requested operation.
Ensure your bundle contains a valid CFBundleShortVersionString.
As far as I know, a Swift Package doesn't need a CFBundleShortVersionString declared? Am I missing something?
Replicate Error
To replicate the error, simply create a new SPM package from XCode, and create a Preview:
struct Preview: PreviewProvider {
static var previews: some View {
Group {
Text("Hello")
}
}
}
Does anyone know of any workaround this issue?
Post
Replies
Boosts
Views
Activity
I have written a small iOS app that I run as a MacOS app using the build target "My Mac (Designed for iPad)". It runs fine, however I cannot find where the app itself is installed on my system.
When running the app multiple times I see that a number is appended to the title of my app is incremented indicating that old versions of the app are still installed somewhere. Where are they located on my system?
Many thanks for the help!