Unfortunately I haven’t. Luckily I made a copy of the file on my MacBook so I have been able to continue working on it but I still can’t open the original file on my iPad.
It’s really frustrating, since I have read the official documentation about these tags but there is no mention of removing them.
Post
Replies
Boosts
Views
Activity
As said earlier, you could edit the source swift file by navigating to it on the mac by right clicking on your playground and selected 'Show Package Contents' and do the same for the UserEdits.diffpack in Edits folder inside the playground where all the code you have written in the swift playground apps!
Thanks this helped a lot! I managed to remove the unclosed tag that was cause the error by opening the main.swift.delta file in text editor, but when looking through this file it seems it only contains the code that wasn't hidden. I'm still unable to find the original code that I hid in any of the Chapters folder in the UserEdits.diffpack.
@stevecfox Leaving this here in case someone else also wonders this, but coming from the GitHub the 'asSIMD3' is an extension of GeometrySource:
extension GeometrySource {
@MainActor func asArray<T>(ofType: T.Type) -> [T] {
assert(MemoryLayout<T>.stride == stride, "Invalid stride \(MemoryLayout<T>.stride); expected \(stride)")
return (0..<self.count).map {
buffer.contents().advanced(by: offset + stride * Int($0)).assumingMemoryBound(to: T.self).pointee
}
}
// SIMD3 has the same storage as SIMD4.
@MainActor func asSIMD3<T>(ofType: T.Type) -> [SIMD3<T>] {
return asArray(ofType: (T, T, T).self).map { .init($0.0, $0.1, $0.2) }
}
}