Update . It was a mistake, and it was fixed in iOS 9 / OS X 10.11 - now the code in the question only works.
Leave the source text of the answer for posterity / people using old SDKs / etc.
This seems like an error - you must specify it . Whether it should be considered a SpriteKit bug or a Swift bug is hard to say, but Apple's problem, not yours. :)
The problem is understandable if you paste the code into the playing field - your joint is actually PKPhysicsJointWeld backstage. This is some kind of inner class that should be an implementation detail. There is no problem in ObjC because casting in C is just a compiler question: "Believe me, this pointer is really SKPhysicsJoint , so let me name a physical cooperative method (and nothing more) on it, and no one will be wiser." Casting in Swift requires a relationship between the type hierarchy between cast types - and PKPhysicsJointWeld not a subtype / subclass of SKPhysicsJoint , so the failure occurs.
You can work around this problem by avoiding casting to [SKPhysicsJoint] :
for joint in nodeA.physicsBody!.joints { // do something else here }
In doing so, you lose some type safety - joint is AnyObject , therefore, like the ObjC id type, the compiler allows you to call any method on it. (And it may fail at runtime if this object does not implement the method.) But at least it works.
Further workaround: inside the loop, you can drop joint to SKPhysicsJoint . But since this transfer is done according to the type hierarchy, you should use unsafeBitCast :
for joint in nodeA.physicsBody!.joints { let skJoint = unsafeBitCast(joint, SKPhysicsJoint.self) // do stuff with skJoint }
This returns you a bit of “security” such as compile time, because after that the compiler will require you to do something with skJoint in order to be compatible with SKPhysicsJoint , but is still inherently unsafe, as it depends on some manual swings around runtime types that may not always be executed. And you need unsafeBitCast again to go to a specific joint subclass, not knowing which subclass it might be. (Again, this would be a good time to make a mistake .)
(You may notice that when you insert into the playground that physicsWorld also has an inner class: PKPhysicsWorld . So why doesn't this work too? When you use the physicsWorld property, all types of casting happen on the ObjC side, and Swift trusts that ObjC reports about this.When you are dealing with an array of joints , however, you need to make the type different on the Swift side, and Swift is much more strict regarding type checking.)