samedi 25 juin 2016

How To Make A Notification Widget Game?

Trying to make a game on today's extension widget like this I tried so many things that results in what I believe are memory crashes for the today's extension on the device. The game works in the simulator, but does not work on the main device. When it works, it works for like a few seconds then "unable to load" shows up in the extension. I read recently that there is a hidden memory limit that apple doesn't document for app extensions to be about 10-30mb (from vary resources on the internet). The extension works flawlessly on the simulator because there is no memory limit, whereas on the device it crashes. How was this game app created without memory restrictions? Is there a way to remove the memory restriction for the device? I am using spritekit for my game. In the mainstoryboard of the widget, I added an empty view (GameView) as a subview of the main view. This just shows a simple scene from my GameScene. This works 100% in the iOS simulator, on the device it lasts for like a few seconds then crashes. override func viewDidLoad() { super.viewDidLoad() self.preferredContentSize = CGSizeMake(0,150) var spriteView = SKView(frame: CGRect(x: 0, y: 0, width: 320, height: 150)) let scene = GameScene(size: spriteView.bounds.size) correctView.addSubview(spriteView) spriteView.presentScene(scene) }

Aucun commentaire:

Enregistrer un commentaire