Post

Replies

Boosts

Views

Activity

Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
Thanks for the quick reply. it should be given to your Control in the Widget Extension as the App Intent that needs to be run. I think I'm doing this too. Here the code of my control: struct LockedCameraWidgetExtensionControl: ControlWidget { var body: some ControlWidgetConfiguration { StaticControlConfiguration( kind: "com.Yuju.LockedCameraPlayground.LockedCameraWidgetExtension") { ControlWidgetButton(action: MyAppCaptureIntent()) { Label("Capture", systemImage: "camera") } } } } And since we are here, this is my ViewFinder: struct LockedCameraExtensionViewFinder: UIViewControllerRepresentable { let session: LockedCameraCaptureSession var sourceType: UIImagePickerController.SourceType = .camera init(session: LockedCameraCaptureSession) { self.session = session } func makeUIViewController(context: Self.Context) -> UIImagePickerController { let imagePicker = UIImagePickerController() imagePicker.sourceType = sourceType imagePicker.mediaTypes = [UTType.image.identifier, UTType.video.identifier] imagePicker.cameraDevice = .rear return imagePicker } func updateUIViewController(_ uiViewController: UIImagePickerController, context: Self.Context) { } }
Jun ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
Somehow related, I'm trying to build an example app to get familiar with this new extension. I followed the steps in the docs but I think I'm missing something. I added the Control through a Widget Extension, and I see that the perform method is called in my Intent, however I'm missing the part where this perform method would open the UI to capture the photos. This is my Intent: struct MyAppCaptureIntent: CameraCaptureIntent { static var title: LocalizedStringResource = "MyAppCaptureIntent" typealias AppContext = MyAppContext static let description = IntentDescription("Capture photos with MyApp.") @MainActor func perform() async throws -> some IntentResult { let dialog = IntentDialog("Intent result") do { if let context = try await MyAppCaptureIntent.appContext { return .result() } } catch { // Handle error condition. } return .result() } } struct MyAppContext: Decodable, Encodable { var data = ContextData() } struct ContextData: IntentResult, Decodable, Encodable { var value: Never? { nil } } How do I connect this with my LockedCameraCaptureExtension?
Jun ’24
Reply to PHPickerResult slow loading, plus no thumbnails
Thanks for the quick answer. Yes, we are aware of the progress indicator, we would like to show it on top of the thumbnail. Yes, we are using configuration.preferredAssetRepresentationMode = .current Ok, I just uploaded them I'll submit another one for the thumbnails.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
hi @codeblocknl ! It doesn't open the camera for me when I place it in the locked screen. Did you use the code I posted in the feedback (FB13889233)? if so, did you modify anything?
Replies
Boosts
Views
Activity
Jun ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
Feedback sent -> FB13889233
Replies
Boosts
Views
Activity
Jun ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
Yes, I covered that too. I made sure camera permissions where accepted by the user.
Replies
Boosts
Views
Activity
Jun ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
Thanks for the quick reply. it should be given to your Control in the Widget Extension as the App Intent that needs to be run. I think I'm doing this too. Here the code of my control: struct LockedCameraWidgetExtensionControl: ControlWidget { var body: some ControlWidgetConfiguration { StaticControlConfiguration( kind: "com.Yuju.LockedCameraPlayground.LockedCameraWidgetExtension") { ControlWidgetButton(action: MyAppCaptureIntent()) { Label("Capture", systemImage: "camera") } } } } And since we are here, this is my ViewFinder: struct LockedCameraExtensionViewFinder: UIViewControllerRepresentable { let session: LockedCameraCaptureSession var sourceType: UIImagePickerController.SourceType = .camera init(session: LockedCameraCaptureSession) { self.session = session } func makeUIViewController(context: Self.Context) -> UIImagePickerController { let imagePicker = UIImagePickerController() imagePicker.sourceType = sourceType imagePicker.mediaTypes = [UTType.image.identifier, UTType.video.identifier] imagePicker.cameraDevice = .rear return imagePicker } func updateUIViewController(_ uiViewController: UIImagePickerController, context: Self.Context) { } }
Replies
Boosts
Views
Activity
Jun ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
It is included in the app target, the widget extension target and the locked screen camera extension target.
Replies
Boosts
Views
Activity
Jun ’24
Reply to LockedCameraCapture - Lock Screen Camera Capture UI Question
Somehow related, I'm trying to build an example app to get familiar with this new extension. I followed the steps in the docs but I think I'm missing something. I added the Control through a Widget Extension, and I see that the perform method is called in my Intent, however I'm missing the part where this perform method would open the UI to capture the photos. This is my Intent: struct MyAppCaptureIntent: CameraCaptureIntent { static var title: LocalizedStringResource = "MyAppCaptureIntent" typealias AppContext = MyAppContext static let description = IntentDescription("Capture photos with MyApp.") @MainActor func perform() async throws -> some IntentResult { let dialog = IntentDialog("Intent result") do { if let context = try await MyAppCaptureIntent.appContext { return .result() } } catch { // Handle error condition. } return .result() } } struct MyAppContext: Decodable, Encodable { var data = ContextData() } struct ContextData: IntentResult, Decodable, Encodable { var value: Never? { nil } } How do I connect this with my LockedCameraCaptureExtension?
Replies
Boosts
Views
Activity
Jun ’24
Reply to is xcode cloud failing?
We are still getting this error pretty consistently, for the last few weeks. Is there an outstanding issue?
Replies
Boosts
Views
Activity
Feb ’22