Implementation of firefly theory in iOS devices