You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added `Blazor` sample to showcase the implementation of this plugin.
8
+
- Added `IsProtectionEnabled` property to check if screen protection is already enabled or disabled.
9
+
- Added `ScreenCaptured` event handler, which triggers notifications when a screenshot is taken or the screen is recorded.
10
+
- Added plugin initialization.
11
+
- Updated sample projects with new implementations.
12
+
13
+
**Fixed bugs:**
14
+
- Implemented a new screenshot prevention method for iOS 17+.
15
+
- Fixed `GetWindow` method on iOS.
16
+
- Merged [#39: Bug iOS on Blur](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/pull/39) PR by [fabien367](https://github.com/fabien367).
`Plugin.Maui.ScreenSecurity` provides a seamless solution for preventing content exposure, as well as blocking screenshots and recordings within your .NET MAUI application
5
5
@@ -10,27 +10,53 @@
10
10
|.Net MAUI iOS|iOS 14+|
11
11
|Windows|10.0.17763+|
12
12
13
-
## Version 1.1.6
13
+
## Version 1.2.0
14
14
15
15
### What's new?
16
-
-Removed .Net6 support. :warning:
17
-
- Added .Net8 support to all platforms.
18
-
- Fixed iOS 17 issues.
19
-
-Fixed screenshot not working on iOS 17+ issue, by changing the screenshot protection implementation, now a blank white or black (depending on the current OS theme) is added before taking the screenshot to cover the screen content. :exclamation:
16
+
-Added `IsProtectionEnabled` property to check if screen protection is already enabled or disabled.
17
+
- Added `ScreenCaptured` event handler, which triggers notifications when a screenshot is taken or the screen is recorded.
18
+
- Fixed iOS issues.
19
+
-Added `Blazor` sample to showcase the implementation of this plugin.
20
20
21
-
Click [here](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/releases/tag/v1.1.6) to see the full Changelog!
21
+
Click [here](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/releases/tag/v1.2.0) to see the full Changelog!
22
22
23
23
## Installation
24
24
`Plugin.Maui.ScreenSecurity` is available via NuGet, grab the latest package and install it on your solution:
25
25
26
26
Install-Package Plugin.Maui.ScreenSecurity
27
27
28
-
In your `MauiProgram` class add the following `using` statement:
28
+
Initialize the plugin in your `MauiProgram` class:
Finally, add the default instance of the plugin as a singleton to inject it in your code late:
35
61
36
62
```csharp
@@ -46,7 +72,7 @@ It's important to acknowledge that preventing users from taking screenshots or r
46
72
## API Usage
47
73
> If you are still using version 1.0.0, please refer to the [Legacy docs](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/wiki/Legacy) for the previous version.
48
74
49
-
The new unified API only have 2 methods: `ActivateScreenSecurityProtection()` and `DeactivateScreenSecurityProtection()`, with optional parameters that will be only applied to the iOS platform.
75
+
The new unified API includes two methods: `ActivateScreenSecurityProtection()` and `DeactivateScreenSecurityProtection()`, with optional parameters applicable only to the iOS platform. It also provides two properties: `IsProtectionEnabled`, which checks if protection is active, and the `ScreenCaptured` event handler, which notifies when a screenshot is taken or the screen is recorded.
This method deactivates all screen security protection.
90
116
117
+
```csharp
118
+
boolIsProtectionEnabled { get; }
119
+
```
120
+
This bool checks if screen protection is enabled.
121
+
122
+
```csharp
123
+
eventEventHandler<EventArgs>?ScreenCaptured;
124
+
```
125
+
The event handler is triggered when the screen is captured, either through a screenshot or recording on Android and iOS, **but only for screenshots on Windows**.
126
+
91
127
## Usage Example
92
128
93
129
```csharp
@@ -106,8 +142,15 @@ public partial class MainPage : ContentPage
106
142
{
107
143
base.OnAppearing();
108
144
109
-
// Activate the screen security protection with default settings
@@ -149,8 +202,9 @@ Refer to the [ScreenSecuritySample](https://github.com/FabriBertani/Plugin.Maui.
149
202
Please feel free to open an [Issue](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/issues) if you encounter any bugs or submit a PR to contribute improvements or fixes. Your contributions are greatly appreciated.
150
203
151
204
## License
152
-
The Plugin.Maui.ScreenSecurity is licensed under [MIT](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/blob/main/LICENSE).
205
+
The Plugin.Maui.ScreenSecurity is licensed under [MIT](https://github.com/FabriBertani/Plugin.Maui.ScreenSecurity/blob/main/LICENSE) license.
153
206
154
207
## Contributors
155
208
156
-
***[Goran Karacic](https://github.com/Gogzs)** for the iOS 17 fix.
209
+
***[Goran Karacic](https://github.com/Gogzs)** for the iOS 17 fix.
210
+
***[fabien367](https://github.com/fabien367)** for the iOS leak fix.
0 commit comments