Reputation: 323
I am trying to embed spline.design into my SwiftUI app, and using the native code generated and simply copying and pasting it, I am getting:
spline scene file is in an unknown format
import SplineRuntime
struct Onboarding3DView: View {
var body: some View {
// fetching from cloud
let url = URL(string: "https://build.spline.design/JHA7PO5Xk7h6trzn-wYc/scene.splineswift")!
// // fetching from local
// let url = Bundle.main.url(forResource: "scene", withExtension: "splineswift")!
try? SplineView(sceneFileURL: url).ignoresSafeArea(.all)
}
}
That is my code, the project runs well, but instead of showing the 3D element the error,
Tested on iPhone 14 Pro Max
Upvotes: 0
Views: 292
Reputation: 1216
Per the Spline documentation, this error means "The exported file is too old, the runtime is too old, or the file might have become corrupted."
Try re-exporting your file
Upvotes: 0