flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

[screen_state] iOS support and renewal of the native example apps

Open luansilva-tokenlab opened this issue 1 year ago • 2 comments

I introduced iOS support to the 'screen_state' package by leveraging the 'isProtectedDataAvailable' and 'brightness' parameters for screen state analysis. Additionally, I refined the base plugin to facilitate its utilization in iOS applications, and optimized code readability and data handling with enhanced enums.

Moreover, I updated the native example apps using Flutter 3.16.9 as the foundation, addressing their outdated status and ensuring compatibility with iOS.

Despite these advancements, I encountered limitations inherent to the iOS platform. Notably, the 'isProtectedDataAvailable' parameter only provides data if the user has any form of password protection enabled, rendering it ineffective for detecting unlocks on devices without a password. Furthermore, the iOS simulator's inability to replicate device locking behavior and its distinct brightness controls hampered event detection within the simulator environment.

Throughout development, I conducted testing on an iPhone 6+ running iOS 12.5.7, successfully capturing all relevant events.

luansilva-tokenlab avatar Feb 16 '24 18:02 luansilva-tokenlab

#169

luansilva-tokenlab avatar Feb 16 '24 18:02 luansilva-tokenlab

This looks indeed interesting. I will take a look later.

bardram avatar Mar 08 '24 16:03 bardram