flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[swift] Update tutorial for getRootAs -> getCheckedRoot

Open peeeeter opened this issue 4 months ago • 4 comments

WRT #7738, the tutorial still gives

// create a ByteBuffer(:) from an [UInt8] or Data()
let buf = // Get your data
 
// Get an accessor to the root object inside the buffer.
let monster = Monster.getRootAsMonster(bb: ByteBuffer(bytes: buf))

peeeeter avatar Sep 27 '24 19:09 peeeeter