init
TypeScriptstatic initFileNamed(filename: string): Promise<(SKNode) | null>Swift declarationconvenience init?(fileNamed filename: String)class · SDK 27.1
@MainActor class SKNodestatic initFileNamed(filename: string): Promise<(SKNode) | null>Swift declarationconvenience init?(fileNamed filename: String)static initFileNamedSecurelyWithClasses(filename: string, classes: Array<unknown>): Promise<SKNode>Swift declarationconvenience init(fileNamed filename: String, securelyWithClasses classes: Set<AnyHashable>) throwsaction(key: string): Promise<(SKAction) | null>Swift declarationfunc action(forKey key: String) -> SKAction?addChild(node: SKNode): Promise<void>Swift declarationfunc addChild(_ node: SKNode)calculateAccumulatedFrame(): Promise<{ x: number; y: number; width: number; height: number }>Swift declarationfunc calculateAccumulatedFrame() -> CGRectchildNode(name: string): Promise<(SKNode) | null>Swift declarationfunc childNode(withName name: String) -> SKNode?contains(p: { x: number; y: number }): Promise<boolean>Swift declaration@MainActor func contains(_ p: CGPoint) -> BoolconvertFrom(point: { x: number; y: number }, node: SKNode): Promise<{ x: number; y: number }>Swift declarationfunc convert(_ point: CGPoint, from node: SKNode) -> CGPointconvertTo(point: { x: number; y: number }, node: SKNode): Promise<{ x: number; y: number }>Swift declarationfunc convert(_ point: CGPoint, to node: SKNode) -> CGPointhasActions(): Promise<boolean>Swift declarationfunc hasActions() -> BoolinParentHierarchy(parent: SKNode): Promise<boolean>Swift declarationfunc inParentHierarchy(_ parent: SKNode) -> Boolstatic init(): Promise<SKNode>Swift declarationinit()static initCoder(aDecoder: _Foundation_NSCoder): Promise<(SKNode) | null>Swift declarationinit?(coder aDecoder: NSCoder)insertChild(node: SKNode, index: number): Promise<void>Swift declarationfunc insertChild(_ node: SKNode, at index: Int)intersects(node: SKNode): Promise<boolean>Swift declarationfunc intersects(_ node: SKNode) -> BoolisEqual(node: SKNode): Promise<boolean>Swift declarationfunc isEqual(to node: SKNode) -> Boolmove(parent: SKNode): Promise<void>Swift declarationfunc move(toParent parent: SKNode)atPoint(p: { x: number; y: number }): Promise<SKNode>Swift declarationfunc atPoint(_ p: CGPoint) -> SKNodenodes(p: { x: number; y: number }): Promise<Array<SKNode>>Swift declarationfunc nodes(at p: CGPoint) -> [SKNode]subscript(name: string): Promise<Array<SKNode>>Swift declarationsubscript(name: String) -> [SKNode] { get }removeAction(key: string): Promise<void>Swift declarationfunc removeAction(forKey key: String)removeAllActions(): Promise<void>Swift declarationfunc removeAllActions()removeAllChildren(): Promise<void>Swift declarationfunc removeAllChildren()removeChildren(nodes: Array<SKNode>): Promise<void>Swift declarationfunc removeChildren(in nodes: [SKNode])removeFromParent(): Promise<void>Swift declarationfunc removeFromParent()run(action: SKAction): Promise<void>Swift declarationfunc run(_ action: SKAction)runCompletion(action: SKAction, block: (() => void)): Promise<void>Swift declarationfunc run(_ action: SKAction) asyncrunWithKey(action: SKAction, key: string): Promise<void>Swift declarationfunc run(_ action: SKAction, withKey key: String)setScale(scale: number): Promise<void>Swift declarationfunc setScale(_ scale: CGFloat)setValue(value: SKAttributeValue, key: string): Promise<void>Swift declarationfunc setValue(_ value: SKAttributeValue, forAttribute key: String)value(key: string): Promise<(SKAttributeValue) | null>Swift declarationfunc value(forAttributeNamed key: String) -> SKAttributeValue?get alpha(): Promise<number>Swift declarationvar alpha: CGFloat { get set }setAlpha(value: number): Promise<void>Swift declarationvar alpha: CGFloat { get set }get attributeValues(): Promise<Record<string, SKAttributeValue>>Swift declarationvar attributeValues: [String : SKAttributeValue] { get set }setAttributeValues(value: Record<string, SKAttributeValue>): Promise<void>Swift declarationvar attributeValues: [String : SKAttributeValue] { get set }get children(): Promise<Array<SKNode>>Swift declarationvar children: [SKNode] { get }get constraints(): Promise<(Array<SKConstraint>) | null>Swift declarationvar constraints: [SKConstraint]? { get set }setConstraints(value?: (Array<SKConstraint>) | null): Promise<void>Swift declarationvar constraints: [SKConstraint]? { get set }get focusBehavior(): Promise<SKNodeFocusBehavior>Swift declarationvar focusBehavior: SKNodeFocusBehavior { get set }setFocusBehavior(value: SKNodeFocusBehavior): Promise<void>Swift declarationvar focusBehavior: SKNodeFocusBehavior { get set }get frame(): Promise<{ x: number; y: number; width: number; height: number }>Swift declarationvar frame: CGRect { get }get isHidden(): Promise<boolean>Swift declarationvar isHidden: Bool { get set }setIsHidden(value: boolean): Promise<void>Swift declarationvar isHidden: Bool { get set }get name(): Promise<(string) | null>Swift declarationvar name: String? { get set }setName(value?: (string) | null): Promise<void>Swift declarationvar name: String? { get set }get parent(): Promise<(SKNode) | null>Swift declarationvar parent: SKNode? { get }get isPaused(): Promise<boolean>Swift declarationvar isPaused: Bool { get set }setIsPaused(value: boolean): Promise<void>Swift declarationvar isPaused: Bool { get set }get physicsBody(): Promise<(SKPhysicsBody) | null>Swift declarationvar physicsBody: SKPhysicsBody? { get set }setPhysicsBody(value?: (SKPhysicsBody) | null): Promise<void>Swift declarationvar physicsBody: SKPhysicsBody? { get set }get position(): Promise<{ x: number; y: number }>Swift declarationvar position: CGPoint { get set }setPosition(value: { x: number; y: number }): Promise<void>Swift declarationvar position: CGPoint { get set }get reachConstraints(): Promise<(SKReachConstraints) | null>Swift declaration@NSCopying var reachConstraints: SKReachConstraints? { get set }setReachConstraints(value?: (SKReachConstraints) | null): Promise<void>Swift declaration@NSCopying var reachConstraints: SKReachConstraints? { get set }get scene(): Promise<(SKScene) | null>Swift declarationvar scene: SKScene? { get }get speed(): Promise<number>Swift declarationvar speed: CGFloat { get set }setSpeed(value: number): Promise<void>Swift declarationvar speed: CGFloat { get set }get userData(): Promise<(_Foundation_NSMutableDictionary) | null>Swift declarationvar userData: NSMutableDictionary? { get set }setUserData(value?: (_Foundation_NSMutableDictionary) | null): Promise<void>Swift declarationvar userData: NSMutableDictionary? { get set }get isUserInteractionEnabled(): Promise<boolean>Swift declarationvar isUserInteractionEnabled: Bool { get set }setIsUserInteractionEnabled(value: boolean): Promise<void>Swift declarationvar isUserInteractionEnabled: Bool { get set }get xScale(): Promise<number>Swift declarationvar xScale: CGFloat { get set }setXScale(value: number): Promise<void>Swift declarationvar xScale: CGFloat { get set }get yScale(): Promise<number>Swift declarationvar yScale: CGFloat { get set }setYScale(value: number): Promise<void>Swift declarationvar yScale: CGFloat { get set }get zPosition(): Promise<number>Swift declarationvar zPosition: CGFloat { get set }setZPosition(value: number): Promise<void>Swift declarationvar zPosition: CGFloat { get set }get zRotation(): Promise<number>Swift declarationvar zRotation: CGFloat { get set }setZRotation(value: number): Promise<void>Swift declarationvar zRotation: CGFloat { get set }1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SKNode.enumerateChildNodes(withName:using:)
synchronous callback requires a nonescaping JS-thread call