Keep connected between scenes

edited February 2016 in iOS
None of the sample apps seem to have more than one scene that has device connectivity/ functionality.

What is the best method for keeping the Metawear device(s) connected when switching between scenes/ views in swift?

I am currently using the swiftstarter code approach using those method for segues, observers, etc.

Comments

  • The MetaWear objects are global in nature, so you can certainly keep a connection to one and access it from any controller.  You could make a shared global manager class to abstract what it is you are doing, or simply pass references to the MBLMetaWear as you transition (i.e. in prepareForSegue).


  • Makes sense - thank you!
This discussion has been closed.