I'm developing my first Complex Data Field and I can't get the view to display; it flashes for a fraction of a second when switching pages only - on the watch - then shows the IQ launch icon. On the simulator it works just fine.
I've successfully developed a few Simple Data Fields and sideloaded those to the watch.
I'm using the latest SDK on Mac and Visual Studio Code. I went through the "Build Complex Data Field" prompt so all files are generated with some dummy data in it.
I'm not using any Layout functionality as far as I can tell, just direct dc.write. I've cleaned up other .mc files with reference to Layout calls.
Visual Studio Code generated:
- <name>App.mc
- <name>View.mc
- <name>Background.mc
I allowed each initialize() call to do just that and kept the other functions empty.
View contains all my straightforward logic and drawing:
- initialize() is just initialize
- onLayout(dc) checks width and pretty much nothing else
- compute(info) gets some GPS measures
- onUpdate(dc) contains all of the logic and direct drawing. I'm calling a dc.clear() at the begining. No layout calls. This functions ends without any special calls to self or whatnot.
After a week of reading up and trying to clean up as much as I can, I can't figure out why it's flashing once like it does. Nor do I find relevant Complex Data Fields that do NOT use dc.drawText / dc.drawLine to display their output. Most seem to use a layout approach. Most older examples also have a lot less files and calls in there, making it hard to transfer into today's SDK, further confusing a newbie here.
It's a longshot, but does any of this rings a bell with anyone? Or could anyone share a simple "Complex" Data Field that I could test and sideload onto the watch?
Thank you for pointing me in the right direction...