Reputation: 19
I'm using Xcode 8.1, Swift 3.
I'm making a custom watch face for the Apple Watch (For myself). So i set the watch to always show last app on wake, and after sometime i noticed that it get back to the default watch and my app is closed.
For a week now I'm trying to figure out why the app keep closing. On Xcode i tried to debug the WatchKit Extension and after some time the console just print: "Program ended with exit code: 0" and the app closed again.
I looked on google to check if WatchOs have timeout for apps and didn't find out anything about it. Also the app is sometimes closed after 5 min and sometimes after 12 h...
The app is never pass the 1.5MB memory.
Any idea what could possibly cause that?
Upvotes: 2
Views: 1567
Reputation: 6927
I faced the same issue while working on an app.
In my case I'm using SpriteKit scenes which take a lot of memory for rendering to it causes the crashing of the app on watch.
Do check the memory consumption of your app. Make it under the bar to test it on the device.
Try to remove the elements which you think of taking a lot of memory. Use Instruments to track them.
NOTE: It will run successfully on Simulator. But on the real apple watch it crashes.
Upvotes: 1
Reputation: 2347
App will quit after 8 minutes if it is not in the dock, this is explained in WWDC16 videos, other bug might be similar to this:
Watch App terminates upon deactivation if WKAlert is being shown
Upvotes: 0