Search code examples
iosscenekitapple-watch

run scene (scene kit )?


is it possible to run this code on Apple Watch:

 SCNScene *scene = [SCNScene sceneNamed:@"art.scnassets/ship.dae"];        
    // retrieve the ship node
    SCNNode *ship = [scene.rootNode childNodeWithName:@"ship" recursively:YES];

    // animate the 3d object
    [ship runAction:[SCNAction repeatActionForever:[SCNAction rotateByX:0 y:2 z:0 duration:1]]];

    // retrieve the SCNView
    SCNView *scnView = (SCNView *)self.view;

    // set the scene to the view
    scnView.scene = scene;

    // allows the user to manipulate the camera
    scnView.allowsCameraControl = YES;

    // show statistics such as fps and timing information
    scnView.showsStatistics = YES;

I can not put scene on main controller.

SCNView *scnView = (SCNView *)self.view;

Please, help.


Solution

  • The only way to make apps for Apple Watch is WatchKit. WatchKit does not include the ability to present any iOS view on the watch, only the specific set of UI controls defined in the WatchKit framework. See WatchKit Programming Guide for details.