Xcode 14 RC SwiftUI preview failed with a third party product IDESwiftPackageStaticLibraryProductBuildable

Originator:py.bertholon
Number:rdar://FB11474754 Date Originated:08 September 2022
Status:Closed Resolved:Yes
Product:Xcode Product Version:14 RC
Classification: Reproducible:Always
 
A third party libraries with source codes integrate with SPM can compile with Xcode 13.4.1 and Xcode 14 RC. But the swiftUI preview build failed with Xcode 14 RC. With Xcode 13.4.1, the preview works as expected. Running on MacOS 12.5.1 (21G83). It’s related to this thread: https://developer.apple.com/forums/thread/707569?page=2 It can be reproduced with the simple attached project. The swiftUI “ContentView” has a preview.


With Xcode 14 RC:
1. Create a new project (command+Shift+N)
2. Choose iOS app / Swift UI / swift
3. Click on "ContentView" file
4. Display Canevas and run the Preview with a simulator device

Works for now.

5. In Project / Package dependencies, add https://github.com/microsoft/appcenter-sdk-apple.git, Up to next major version, 4.0.0
6. Add AppCenterCrashes product to the target.
7. Click on "ContentView" file to display the preview again.

"Unexpected error occured".

The SwiftUI Preview failed with an error: "Unexpected error occured". HumanReadableSwiftError SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x0000600205e3ffc0):'AppCenterCrashes'>)

Comments

Xcode 14.1 fixed the issues. Other issues are from third party libraries packaging.

By py.bertholon at Dec. 9, 2022, 4:01 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!