swift_code_4.swift (284B)
1 import FlatBuffers 2 import Foundation 3 4 func run() { 5 // create a `FlatBufferBuilder`, which will be used to serialize objects 6 let builder = FlatBufferBuilder(initialSize: 1024) 7 8 let weapon1Name = builder.create(string: "Sword") 9 let weapon2Name = builder.create(string: "Axe") 10 }