Running SpriteKit game in watchOS on Apple Watch simulator (xCode 8, Swift 3, iOS 10) - libswiftSwiftOnoneSupport error

I downloaded xCode 8.0 betaand opened a recent project written in swift 2, which then converted to swift 3using xCode.

Then I added a goal watchOSto my project with the setting "game"

File> New> Goal:

screenshot

I checked GameScene.swift in WatchExtensionand of course all the code there and set the scene:

    import SpriteKit

    class GameScene: SKScene {

        private var spinnyNode : SKShapeNode?

        override func sceneDidLoad() {

            if let label = self.childNode(withName: "//helloLabel") as? SKLabelNode {
                label.alpha = 0.0
                label.run(SKAction.fadeIn(withDuration: 2.0))
            }

            let w = (self.size.width + self.size.height) * 0.05
            let spinnyNode = SKShapeNode(rectOf: CGSize(width: w, height: w), cornerRadius: w * 0.3)

            spinnyNode.position = CGPoint(x: 0.0, y: 0.0)
            spinnyNode.strokeColor = UIColor.red()
            spinnyNode.lineWidth = 8.0

            spinnyNode.run(SKAction.sequence([SKAction.wait(forDuration: 0.5),
                                              SKAction.fadeOut(withDuration: 0.5),
                                              SKAction.removeFromParent()]))

            spinnyNode.run(SKAction.repeatForever(SKAction.rotate(byAngle: 6.28, duration: 1)))

            self.run(SKAction.repeatForever(SKAction.sequence([SKAction.wait(forDuration: 2.0),
                                                               SKAction.run({
                                                                let n = spinnyNode.copy() as! SKShapeNode
                                                                self.addChild(n)
                                                               })])))
        }


        override func update(_ currentTime: TimeInterval) {
            // Called before each frame is rendered
        }
    }

Unfortunately, I can’t install this on the Apple Watch simulator.

I have tried everything I can think of, including:

  • Clean builds etc.
  • Uninstall / reinstall
  • Checked info.plist for common errors ,
  • Created a new simulator with paired Apple Watch using Add Additional Simulators,
  • Skip Install = No, ,
  • Apple Watch Apple iPhone Simulator ( ),
  • , raywenderlich watchOS...

Apple Watch. ?

UPDATE

10.0 iOS, , , Apple Watch iPhone Simulator, Apple Watch Apple Watch, :

dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/MYNAME/Library/Developer/CoreSimulator/Devices/XXXXXX-XXXX-XXXX-XXXX/data/Containers/Bundle/Application/XXXXXX-XXXX-XXXX-XXXX/MYAPPNAME.app/PlugIns/MYAPPWATCH Extension.appex/MYAPPWATCH Extension
Reason: image not found
(lldb) 

? , SpriteKit ...

+4
1

, , , , fooobar.com/questions/16240/..., , .

, Swift 3.0, watchOS- "Target" , iOS 10.0 Simulator WatchOS 3.0 iPhone Xs iOS 10 Simulator, :

NO YES:

Project > Targets > App Name > Embed Asset Packs In Product Bundle = YES

", !" Apple Watch spriteNode ( , ).

Apple watch

: Apple Watch iPhone Simulator, Apple Watch, " Apple Watch".

+3

All Articles