import ActivityKit import SwiftUI import WidgetKit struct CallLiveActivity: Widget { var body: some WidgetConfiguration { ActivityConfiguration(for: CallActivityAttributes.self) { context in // Lock Screen Text("Rosetta Call: \(context.attributes.peerName)") .foregroundColor(.white) .padding() .activityBackgroundTint(.black) } dynamicIsland: { context in DynamicIsland { DynamicIslandExpandedRegion(.center) { Text(context.attributes.peerName) .foregroundColor(.white) } DynamicIslandExpandedRegion(.bottom) { Text("Encrypted call") .font(.caption2) .foregroundColor(.gray) } } compactLeading: { Image(systemName: "phone.fill") .foregroundColor(.green) } compactTrailing: { Text("Call") .font(.caption2) .foregroundColor(.green) } minimal: { Image(systemName: "phone.fill") .foregroundColor(.green) } } } }