SKShapeNode(circleOfRadius) results in “unrecognized selector sent to class” in Playground for OSX
The following playground results in a timeline error “unrecognized selector sent to class…”
import SpriteKit let node = SKShapeNode(circleOfRadius: 10)
Seems to work ok when platform is iOS.
- NSUserDefaults in iOS Playground
- Swift Playgrounds: Replacement for captureValue(_:withIdentifier:)
- Rename default rendered headings like “Example” in Swift Markup language
- Bug in Swift array subscript indexing?
- How do you instantiate a Storyboard from a file within an iOS playground?
- No such module 'Cocoa' in Swift Playground
Solutions Collect From Internet About “SKShapeNode(circleOfRadius) results in “unrecognized selector sent to class” in Playground for OSX”
It’s because you’re running it on an OS X version that’s older than the API you’re trying to use. The code you’re using requires OS X 10.10, or iOS 8 and up.
The OS X 10.10 API Differences confirm that all of SKShapeNodes custom initializers have just been added in 10.10. Previously, all we could do with SKShapeNode, was initialize an instance, and then modify its
- Why am I seeing “This application does not support this device's CPU type”?
- Call an Objective-C Method from Swift app
- How to launch an iOS app in the simulator without XCode rebuilding the app
- Why do I get the error “error: unknown type name 'virtual'” when trying to compile this code?
- Delegate using Container View in Swift
- TableView with multiple prototype cells
- iOS 10.3 – How to change app icon programmatically
- Displaying different app name in App Store and on home screen
- Setting UITabBarItem title from UINavigationController?
- swift: didSelectRowAtIndexPath
- Parse and Swift: How use advance targeting push to specific devices without users?
- switching view controllers using swipe gestures
- AVPlayerItemDidPlayToEndTime notification not working on iOS 11
- Abstract entities and inheritance in Core Data