I've been messing around with swift and trying to get a Physicsworld working.
This is the error I get "Undefined symbols for architecture i386: "_OBJC_CLASS_$_SCNPhysicsWorld", referenced from: __TFC3sk218GameViewController11viewDidLoadfS0_FT_T_ in GameViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) "
I assume it has to do with linking or importing a library that I'm not, but I have added everything that I could find that I thought might fix it (found in other posts on game kit) Does anyone know what this might be? Thanks.
There is a bug here with the Obj-c / Swift bridge.
While you wait for a solution, you can work around this by creating a temporary bridge for yourself:
Add the following class:
PhysWorldBridge.h
PhysWorldBridge.m
Xcode should prompt you to create a
XXX-Bridging-Header.h
when you add the first objective-c file. Let it create this file.Add an import for the class to the 'XXX-Bridging-header.h":
Now you can use this (hacky) bridge to set the properties from Swift: