I having been trying to merge the sample scanner code into existing Swift 5 project. i seems to be stuck on Expected ‘;’ at end of declaration list.
The sample code is all in Objective-C, not Swift, so you can’t just copy and paste code like that; the syntax is completely different.
For instance, your first line:
const GLKVector3 initVolume = GLKVector3Make (0.5f, 0.5f, 0.5f);
Converts to this in Swift:
let initVolume = GLKVector3Make(0.5, 0.5, 0.5)
Another useful tool may be https://objectivec2swift.com/#/converter/code/
Yes but I am treating these files as Objective C files and not swift files. And using bridging header I am importing ViewController.h .Shouldn’t this work. I will look into provided links as well.