0
  @IBOutlet weak var Banner: ADBannerView!

      override func viewDidLoad() {
         super.viewDidLoad()

         Banner.hidden = true
         Banner.delegate = self
         self.canDisplayBannerAds = true

         // configure the view

         let skView = view as! SKView
         skView.multipleTouchEnabled = false

         // Create and configure the scene
         scene = GameScene(size: skView.bounds.size)
         scene.scaleMode = .AspectFill

         // Present the scene
         skView.presentScene(scene)
      }

the problem is at let skView = View as! SKView

When I start the game it just crashes immediately but when I'm coding it's not telling me there is an error.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Ethan. K
  • 13
  • 4
  • By the way, [*"The iAd App Network will be discontinued as of June 30, 2016."*](https://developer.apple.com/news/?id=01152016a). – Pang Feb 06 '16 at 10:41

1 Answers1

0

It is crashing because your view is not an SKView, how did you set this up? If it is a xib file, you need to make sure that the custom class is set to SKView

Knight0fDragon
  • 16,609
  • 2
  • 23
  • 44