[X] This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
14.0.1
Facebook iOS SDK version
15.0.0
Dependency Manager
SPM
SDK Framework
Core
Goals
We have a modern project written in SwiftUI. We rely heavily on on the Xcode SwitfUI previews functionality. We want to use a Facebook SPM dependency and not loose access to the Previews whilst using the latest versions of Xcode.
Expected results
From any Swift script containing a PreviewProvider instance to see the corresponding view rendered when using the Xcode menu option: Editor > Canvas.
Actual results
It fails to build the previews:
When tapping into the diagnostics we see:
Steps to reproduce
Create a new SwiftUI Xcode project
Open/continue with Xcode 14 (i.e. not Xcode 13)
Add the Facebook SDK as a SPM dependency (tick 'Basic' option when prompted)
Go to to ContentView.swift and use the preview option next to the Swift code (if not already open: Editor > Canvas)
Code samples & details
// Standard file when creating SwiftUI project.
// Previews rendered correctly with previously with Xcode 13 and the Facebook SPM.
// We had the same problem with the Facebook iOS SDK 14.1.0 and Xcode 14. We were
// hoping that Facebook iOS SDK 15.0.0 would resolve the problem.
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Checklist before submitting a bug report
Xcode version
14.0.1
Facebook iOS SDK version
15.0.0
Dependency Manager
SPM
SDK Framework
Core
Goals
We have a modern project written in SwiftUI. We rely heavily on on the Xcode SwitfUI previews functionality. We want to use a Facebook SPM dependency and not loose access to the Previews whilst using the latest versions of Xcode.
Expected results
From any Swift script containing a PreviewProvider instance to see the corresponding view rendered when using the Xcode menu option: Editor > Canvas.
Actual results
It fails to build the previews:
When tapping into the diagnostics we see:
Steps to reproduce
Code samples & details