I tried to use privacySensitive and redactionReasons to show different view in widget, but I notice that this is not working on iOS 16 beta (5~7)
Below is my test code, if I use Xcode 13.4.1 with iOS 15 it works properly, in Lock Screen lock state it will display placeholder and "Privacy", but in iOS 16 not (in systemSmall widget).
I'm trying use this privacy feature in new lockscreen widget (it doesn't work in new widget as well), does any one know how to fix this issue?
struct WidgetEntryView : View {
var entry: Provider.Entry
@Environment(\.redactionReasons) var redactionReasons
var body: some View {
Text(entry.date, style: .time)
.privacySensitive()
if redactionReasons.contains(.privacy) {
Text("Privacy")
} else {
Text("Not Privacy")
}
}
}
Xcode : Xcode 14 beta 6
iOS: iOS 16 beta 7
Post
Replies
Boosts
Views
Activity
I wonder if we can add a widget that only display upcoming campaign information or some advertisements.
I've checked the HIG but it didn't say anything about that.