SwiftUI Previews in Xcode 14 failed to run with SettingsError: noExecutablePath(IDESwiftPackageStaticLibraryProductBuildable)

Hello :)

My iOS project does not work with SwiftUI Preview in Xcode 14 beta. The project builds and runs fine, but Preview never works. The error message is as follows.

HumanReadableSwiftError

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060002ac3e880):'AppCenterCrashes'>)

I do use the AppCenterCrashes dependency in my project. But I'm not sure if this error message is accurate, because sometimes it reports other packages.

After I executed Generate Report, I found the following error in SerializationErrors.txt.

Error Domain=NSCocoaErrorDomain Code=516 "“LogCaffeineIntent.swift” couldn’t be linked to “Intermediates” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/Users/gong/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/HiCoffee.build/Debug-iphonesimulator/IntentsExtension.build/DerivedSources/IntentDefinitionGenerated/Intents/LogCaffeineIntent.swift, NSUserStringVariant=(
    Link
), NSDestinationFilePath=/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/previews-diagnostics-20220608-144336/Intermediates/LogCaffeineIntent.swift, NSFilePath=/Users/gong/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/HiCoffee.build/Debug-iphonesimulator/IntentsExtension.build/DerivedSources/IntentDefinitionGenerated/Intents/LogCaffeineIntent.swift, NSUnderlyingError=0x600033223810 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}

The problem seems to be related to the Intent generation code. I don't know how to fix it yet.

I finally solved the problem. I built binary XCFramework version of AppCenter, AppCenterAnalytics, AppCenterCrashes by myself. After using the XCFrameworks in Package.swift, SwiftUI Preview works properly.

        .binaryTarget(name: "AppCenter", path: "Carthage/Build/AppCenter.xcframework"),
        .binaryTarget(name: "AppCenterAnalytics", path: "Carthage/Build/AppCenterAnalytics.xcframework"),
        .binaryTarget(name: "AppCenterCrashes", path: "Carthage/Build/AppCenterCrashes.xcframework"),

It's still happening to me in beta 5.

Also Beta 5 with MSAL. Reported: FB11259530

I got a similar error trying to add a View to the sample code project for “Building a SignalGenerator”. 

(https://developer.apple.com/documentation/avfaudio/audio_engine/building_a_signal_generator)

I was using Xcode 13.4.1 and MacOS 12.5. The code runs i.e. produces audio successfully but with an error message “Previews not supported for SignalGenerator”

UnsupportedProductTypeError: Previews not supported for SignalGenerator

HumanReadableSwiftError CreationError: noBuildExecutor

Previews can be defined in applications, frameworks, Swift packages, or dynamic libraries productType = com.apple.product-type.tool buildable = SignalGenerator

Confirmed still happening to me in Beta 6.

This is working in beta 4 but broke in beta 6.

I can also confirm this is still a problem in Xcode 14 beta 6. My error report points to the same issue as what @Gong mentioned.

For me, this didn’t become an issue until beta 6

Same here with beta 6

I delete the package in Product -> Package dependencies to run the preview (and add again when building).. Does anyone have update regarding this issue ?

Started seeing this in 14 beta 6 as well


SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060001455b030):'Resolver-Static'>)

Sadly still seeing this in Xcode 14 RC

I'm also seeing this still in RC of Xcode 14 :( mines is specifically with Stripe terminal SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060001d168540):'StripeTerminal'>)

Nothing changed with the Xcode 14 RC release.

I created an issue to Apple with a really simple project (new iOS app Swift UI / swift) and add AppCenterCrashes dependency.

FB11474754

I'm not sure it's related to Xcode or the Package.swift compilation / binary distributed.

We have currently the same SwuiftUI preview issue with:

  • AppCenter issue (no binary)
  • GoogleCast without guest mode dynamic xcframework (binaries)

Also broken previews on Xcode14 RC noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060006b9931b0):'TwilioVideo'>)

I'm also getting the same error with ZendeskSDK using Xcode 14 RC:

HumanReadableSwiftError

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060003cf658f0):'ZendeskSDKConfigurationsSDK'>)
SwiftUI Previews in Xcode 14 failed to run with SettingsError: noExecutablePath(IDESwiftPackageStaticLibraryProductBuildable)
 
 
Q