Photos & Camera

RSS for tag

Explore technical aspects of capturing high-quality photos and videos, including exposure control, focus modes, and RAW capture options.

Posts under Photos & Camera subtopic

Post

Replies

Boosts

Views

Activity

[iOS 27 DB3] Photos taken with third party apps have photographic styles applied
It's unclear if this is a bug or a new feature but I have noticed that my photos starting coming out looking more stylised than expected and worked out that it was because photographic styles were being applied even tho I was taking photos through a third party app. Is there a way to disable this behaviour if it is intended? I've raised a feedback report #FB23632714 Photographic Styles [OFF] Photographic Styles [ON] My settings:
1
0
409
23h
flashMode .on overrides locked focus — AF scan runs and refocuses before the strobe
I'm building a fixed-focus camera app (Bayer RAW, manual exposure, focus permanently locked at a known lens position) and need a full-power flash still that keeps that locked focus. On iPhone 17 Pro, iOS 26, any capture with flashMode = .on runs an autofocus-assist scan — visible lens hunt, assist lamp in low light — and the exposure happens at whatever the scan converged on (usually the far background), not my locked position. In low light it reproduces every time; bright-scene behavior varied by configuration (see matrix), and in my current build it hunts in daylight too. This follows https://developer.apple.com/forums/thread/724897 where DTS confirmed locked lens position + flash "is possible" in a test app, but the differentiating configuration was never identified. I've now exhausted every documented lever, with instrumentation, and would like guidance on whether this stage is bypassable at all. Session configuration session.sessionPreset = .photo // Plain wide camera (also reproduced on .builtInLiDARDepthCamera). let camera = AVCaptureDevice.default( .builtInWideAngleCamera, for: .video, position: .back )! session.addInput(try AVCaptureDeviceInput(device: camera)) session.addOutput(photoOutput) photoOutput.maxPhotoQualityPrioritization = .speed photoOutput.isZeroShutterLagEnabled = false photoOutput.isResponsiveCaptureEnabled = true // Pre-allocate flash capture resources up front. photoOutput.setPreparedPhotoSettingsArray( [makeFlashRawSettings()], completionHandler: nil ) Device configuration (before any capture) try camera.lockForConfiguration() camera.isSubjectAreaChangeMonitoringEnabled = false camera.isSmoothAutoFocusEnabled = false camera.autoFocusRangeRestriction = .near camera.automaticallyEnablesLowLightBoostWhenAvailable = false camera.automaticallyAdjustsFaceDrivenAutoFocusEnabled = false camera.isFaceDrivenAutoFocusEnabled = false // true is worse; see matrix camera.automaticallyAdjustsFaceDrivenAutoExposureEnabled = false camera.isFaceDrivenAutoExposureEnabled = false camera.setFocusModeLocked(lensPosition: 0.60) // ~1 m on this device let gains = camera.deviceWhiteBalanceGains( for: .init(temperature: 4000, tint: 0) ) camera.setWhiteBalanceModeLocked(with: gains) camera.setExposureModeCustom( duration: CMTime(value: 1, timescale: 125), iso: 400 ) camera.unlockForConfiguration() Capture func makeFlashRawSettings() -> AVCapturePhotoSettings { let bayer = photoOutput.availableRawPhotoPixelFormatTypes.first { AVCapturePhotoOutput.isBayerRAWPixelFormat($0) }! let settings = AVCapturePhotoSettings(rawPixelFormatType: bayer) settings.flashMode = .on settings.isAutoRedEyeReductionEnabled = false settings.isAutoStillImageStabilizationEnabled = false settings.isAutoVirtualDeviceFusionEnabled = false settings.isAutoContentAwareDistortionCorrectionEnabled = false settings.photoQualityPrioritization = .speed return settings } // Right before the request, exposure flips .custom → .locked (same // duration/ISO), one preview frame presents, then: photoOutput.capturePhoto(with: makeFlashRawSettings(), delegate: self) What I measure (KVO during the capture window) isAdjustingFocus goes true after the request: a scan runs despite focusMode == .locked (assist lamp on in low light). lensPosition moves from the locked 0.60 to a far position and stays there through willCapturePhotoFor — the exposure uses the scan's answer. When isAdjustingFocus falls back to false (before the metering preflash) I issue one setFocusModeLocked(lensPosition: 0.60). The call succeeds, yet the exposure still happens at the far position — something re-asserts the scan's focus before the strobe. With flashMode = .off, locked focus and custom exposure are honored perfectly (my app's normal path). Tried, all reproduced focusMode = .locked + setFocusModeLocked(lensPosition:): scan still runs. Exposure .custom → .locked for the flash window: no change. Plain wide vs LiDAR wide device: no change. Subject-area / smooth AF / face-driven AF+AE / low-light boost all off: scan still runs in low light. isFaceDrivenAutoFocusEnabled = true (steer scan toward faces): worse — scans in daylight too. Red-eye reduction, fusion, distortion correction off: no change. autoFocusRangeRestriction = .near: still converges far. photoQualityPrioritization = .speed everywhere: no change. Prepared photo settings (flash RAW): no change. Re-lock lens mid-scan: fights the scan; worse convergence. Re-lock lens after scan, before strobe: succeeds; exposure still at the scan's position. Torch lit at request time: scans even in bright daylight. The last two items seem diagnostic: the gate is not scene brightness. A torch adding no visible light in daylight still arms the scan, and face-driven AF arms it in bright scenes — the AF-assist stage runs whenever the sequence sees any reason to focus, and a client's .locked focus mode is never treated as that reason being absent. Questions Is the flash AF-assist stage skippable when focusMode == .locked? The earlier thread's DTS reply achieved a locked-focus flash photo — what configuration makes that true on current hardware/iOS? If not skippable: is there a supported way for the final exposure to honor the locked lens position — run the scan but not apply its result? Why does a successful setFocusModeLocked(lensPosition:) issued between scan end and strobe not stick? Is the sequence re-asserting its own focus at exposure time? Are the observed triggers (torch active at request; face-driven AF enabled — each arming the scan regardless of brightness) expected for flashMode = .on? Goal: full-power flash still + fixed focus + manual exposure, which flashMode = .off already delivers minus the flash. Any guidance — including "file a feedback, here's the rdar to duplicate" — appreciated. Happy to attach a focused sample project and sysdiagnose.
0
0
227
2d
Turning AutoFocus off while flash is on.
Hello, I am creating a simple camere app where I want to turn OFF the autofocus (and set the focus within the app) then take a picture with the flash. The only problem is as soon as i set the flash and take a photo, it auto focuses even though i have set the focus mode locked and lens position? Is this even possible? My av capture output settings:     photoOutput.isHighResolutionCaptureEnabled = true     photoOutput.isLivePhotoCaptureEnabled = false;     photoOutput.isDepthDataDeliveryEnabled = false;     photoOutput.isPortraitEffectsMatteDeliveryEnabled = false     photoOutput.isAppleProRAWEnabled = false;     photoOutput.setPreparedPhotoSettingsArray([buildPhotoSettings(flash: flash)]); my AVCapturePhoto Settings     let photoSettings = AVCapturePhotoSettings(rawPixelFormatType: availbleRaw[0]);     photoSettings.isAutoStillImageStabilizationEnabled = false;     photoSettings.flashMode = flash ?.on :.off;     photoSettings.isHighResolutionPhotoEnabled = true;     photoSettings.isAutoRedEyeReductionEnabled = false; my device input settings           //--white balance     let whiteBalanceValues = AVCaptureDevice.WhiteBalanceTemperatureAndTintValues(temperature: settings.whiteBalanceTemp, tint: settings.whiteBalanceTint);     let newWhiteBalance = videoDeviceInput.device.deviceWhiteBalanceGains(for:whiteBalanceValues);     let maxGain = videoDeviceInput.device.maxWhiteBalanceGain           if(newWhiteBalance.redGain > maxGain || newWhiteBalance.greenGain > maxGain || newWhiteBalance.blueGain > maxGain){       videoDeviceInput.device.unlockForConfiguration();       return (false, "WhiteBalance values are invalid (over maximum gain allowed)");     }           videoDeviceInput.device.setWhiteBalanceModeLocked(with: newWhiteBalance);           //--iso and exposure     let exposure = Float64(settings.exposure/1000);     let exposureTime = CMTime(seconds: exposure, preferredTimescale: 1000)     let iso = Float(settings.iso)           if(exposureTime > videoDeviceInput.device.activeFormat.maxExposureDuration || exposureTime < videoDeviceInput.device.activeFormat.minExposureDuration){       videoDeviceInput.device.unlockForConfiguration();       return (false, "Exposure out of bounds");     }           if(iso > videoDeviceInput.device.activeFormat.maxISO || iso < videoDeviceInput.device.activeFormat.minISO){       videoDeviceInput.device.unlockForConfiguration();       return (false, "ISO out of bounds");     }           videoDeviceInput.device.setExposureModeCustom(duration: exposureTime, iso: iso);           //--Lens focus     if(settings.lensPosition < 0 || settings.lensPosition>1){       videoDeviceInput.device.unlockForConfiguration();       return (false, "Lens position out of bounds");     }               if(videoDeviceInput.device.isFocusModeSupported(.locked)){       videoDeviceInput.device.focusMode = .locked;       videoDeviceInput.device.setFocusModeLocked(lensPosition: settings.lensPosition);             }           if #available(iOS 15.4, *) {       if(videoDeviceInput.device.isFaceDrivenAutoFocusEnabled){         videoDeviceInput.device.automaticallyAdjustsFaceDrivenAutoFocusEnabled = false;                 }               if(videoDeviceInput.device.isFaceDrivenAutoExposureEnabled){         videoDeviceInput.device.automaticallyAdjustsFaceDrivenAutoExposureEnabled = false;       }               if(videoDeviceInput.device.isLowLightBoostSupported){         videoDeviceInput.device.automaticallyEnablesLowLightBoostWhenAvailable = false;       }     } else {       // Fallback on earlier versions     }           //--Torch ON     videoDeviceInput.device.torchMode = settings.torch ? AVCaptureDevice.TorchMode.on :AVCaptureDevice.TorchMode.off;           if(settings.torch){       if(settings.torchLevel<0 || settings.torchLevel>1){         return (false, "Flash out of bounds");       }               try? videoDeviceInput.device.setTorchModeOn(level: Float(settings.torchLevel));     }                       //--Finish     videoDeviceInput.device.unlockForConfiguration();
3
0
1.6k
2d
Supported Core Image workflow for cropping/scaling Apple Log x422 buffers without converting to HLG?
We capture Apple Log video using AVCaptureVideoDataOutput with: AVCaptureDevice.activeColorSpace = .appleLog or .appleLog2 kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange (x422) AVAssetWriter for the final ProRes/HEVC recording We need to bake spatial operations such as a centre crop and optional anamorphic desqueeze into the recorded raster. We want the result to remain Apple Log for subsequent grading; we do not want to display-transform or convert it to HLG. Core Image/Core Graphics does not appear to expose a public Apple Log or Apple Log 2 CGColorSpace. Core Video instead identifies the signal using kCVImageBufferLogTransferFunctionKey. Would this be the supported Core Image approach for spatial-only processing? let image = CIImage( cvPixelBuffer: sourceBuffer, options: [.colorSpace: NSNull()] ) let context = CIContext( mtlDevice: metalDevice, options: [ .workingColorSpace: NSNull(), .outputColorSpace: NSNull(), .cacheIntermediates: false ] ) let outputImage = image .cropped(to: cropRect) .transformed(by: spatialTransform) context.render( outputImage, to: destinationX422Buffer, bounds: outputBounds, colorSpace: nil ) We would then copy the source buffer’s Apple Log colour and Log-transfer attachments to the destination buffer and append it to an AVAssetWriterInputPixelBufferAdaptor. Could an Apple engineer clarify the following? Does CIImage(cvPixelBuffer:) natively interpret kCVImageBufferLogTransferFunctionKey, even though no public Apple Log CGColorSpace exists? When NSNull()/nil is supplied as above, does Core Image leave the Apple Log values unmanaged during crop and affine operations? When rendering x422 to x422, can Core Image preserve the Log signal apart from expected resampling/rounding, or does it internally perform a colour conversion such as YCbCr → RGB → YCbCr? For scaling or anamorphic desqueeze, is Apple’s recommended workflow to: resample the encoded Apple Log values with colour management disabled, or explicitly decode Apple Log to a linear working space, resample, and encode back using a custom Metal implementation? Is copying kCVImageBufferLogTransferFunctionKey and the related colour attachments from source to destination sufficient for AVAssetWriter, assuming the writer settings were obtained from recommendedVideoSettingsForAssetWriter(writingTo:)? Is there ever a supported reason to use HLG as an intermediate for Apple Log processing, or should that be avoided? This this part, we are concerned about preserving the captured Log signal in a recording pipeline, not applying a viewing LUT or displaying Apple Log. Next, we also support optional LUT processing with CIColorCube. Some LUTs are technical Apple Log-to-display transforms, while others expect linear or Rec.709 input. If the image is created with .colorSpace: NSNull(), we understand that the LUT receives unmanaged Apple Log code values and that the LUT itself must perform the required transfer-function and gamut conversion. Does Core Image synthesize an Apple Log-aware input color space from kCVImageBufferLogTransferFunctionKey, or must applications implement Apple Log/Apple Log 2 decoding explicitly before using ordinary Core Image filters? Is there a supported CGColorSpace, ColorSync profile, or Core Image conversion API for this? Additionally, what numeric range does CIColorCube receive when its source is an x422 video-range Apple Log buffer— normalized Log RGB values, or values requiring explicit video-range conversion?
0
0
283
3d
FaceGroupAnalyzer: a truncated image file reports zero faces with no error, indistinguishable from a photograph that contains no people
An image file whose data is cut in half is accepted by insertOrUpdateAssets, produces no error, and is reported as an image containing zero faces. That result is indistinguishable from a photograph that genuinely has no people in it. In my measurement the intact file reported 4 faces and a copy truncated to half its bytes reported 0 faces — both without throwing. Why this is worse than an error. A client that receives "zero faces, no error" will record the asset as analysed, no people present. That is a permanent, silent, incorrect result: the file is never revisited, and the people in it are lost from the catalogue with no diagnostic anywhere. An error would have been recorded as a failure and retried later. Silence is the one outcome that cannot be recovered from. The failure mode is also inconsistent. Other kinds of damaged input do throw — a zero-byte file, a text file with a .jpg extension, and a file whose interior bytes have been destroyed all raise MediaIntelligenceError.faceGroupProcessing. Truncation is the case that silently succeeds, and truncation is precisely the damage that partial downloads, interrupted copies and failing disks produce — the most common form of corruption in a real photo archive, and the one I have to handle in 97 libraries of mixed provenance. My current workaround is to fully decode every image myself before handing it to the framework, purely to detect truncation. That means every file is decoded twice, which roughly doubles the I/O of the analysis pass. Feedback: FB24174749
0
0
85
6d
FaceGroupAnalyzer: one unreadable asset makes `insertOrUpdateAssets` deliver zero elements, discarding results already computed for the valid assets in the batch
If a single asset in the array passed to insertOrUpdateAssets cannot be read, the returned AsyncSequence throws and delivers zero elements — including for the valid assets that appear before the offending one in the array. In my measurement a batch of 5 — two valid photographs, one zero-byte .jpg, then two more valid photographs — delivered 0 of 5 elements and reported 0 faces. The framework's own stdout log shows it had already processed the valid photographs before failing, so the work was done and then thrown away. This is the behaviour I would expect from a function returning [Result] after processing everything, not from a streaming AsyncSequence. The whole reason to expose an async sequence is to deliver results as they are produced; here the sequence produces nothing at all, which makes the streaming shape actively misleading. Why this matters at library scale. I am cataloguing 97 photo libraries, many of them archives of scanned family photographs going back to the 1970s, where a handful of damaged files is normal rather than exceptional. As the API stands, the batch size I choose for throughput is also the amount of work a single corrupt file destroys — with a batch of 100, one bad file costs 100 images. The only safe strategy is to catch the failure and re-submit the batch one asset at a time to find the culprit, which turns a rare bad file into a full re-run of that batch and makes the worst case quadratic in the number of bad files. Note also that the error gives no indication of which asset failed (see the related enhancement request on error taxonomy), so isolating the culprit by re-submission is the only option available. Feedback: FB24174733
0
0
79
6d
FaceGroupAnalyzer: `insertOrUpdateAssets` does not honour `Task` cancellation and returns successfully long after the task was cancelled
insertOrUpdateAssets(_:) is async throws and returns an AsyncSequence, so by the Swift Concurrency contract I expected it to observe cancellation of the enclosing Task and throw CancellationError. It does not. The call runs to completion and returns successfully, with the full result set, as though the cancellation had never happened. In my measurement the cancel was delivered at 2.7 s and the call returned successfully at 19.0 s, having processed all 150 assets and reported 550 faces. The practical consequence for an app is that a "Stop" button cannot stop work that is already in flight. The only way to get responsive cancellation is to slice the work into many small calls and check Task.checkCancellation() between them — which means the batch size, which should be tuned for throughput, ends up being dictated by how long a user is willing to wait after pressing Stop. For me that is the difference between a batch of 150 (≈19 s to react) and a batch of 25 (≈3 s). The store is left in a consistent state, which is good: the assets processed before cancellation remain, and state correctly becomes .stale. So this is specifically about the cancellation signal being ignored, not about data integrity. One detail worth knowing when reproducing this insertOrUpdateAssets is declared nonisolated(nonsending), so it executes on the caller's executor. My first attempt at this reproducer used a plain Task { } created from @MainActor top-level code — which inherits main-actor isolation — and the detection therefore ran on the main actor and starved the very code that was supposed to cancel it: a Task.sleep(2.5s) on the main actor did not resume until the 19-second call had already finished, so the cancel was not even delivered until 19.0 s. The attached reproducer uses Task.detached to avoid that confound, and the cancel is correctly delivered at 2.7 s. I mention it because anyone reproducing this from a @MainActor context will see a different and misleading timeline. Feedback: FB24174707
0
0
60
6d
FaceGroupAnalyzer: two live instances register the Core Data model twice and abort the process with +[MIManagedFace entity] Failed to find a unique match
Constructing a second FaceGroupAnalyzer while a first one is still alive registers the framework's Core Data managed object model a second time. Core Data can then no longer resolve +[MIManagedFace entity], and the process is terminated with SIGTRAP (exit status 133). Three things make this worse than a normal API misuse: It happens with completely separate working directories. The two instances are logically independent — different directories, different stores, no shared state that the API surface exposes. Nothing in the signature of init(workingDirectory:) suggests that two of them cannot coexist, and the parameter's existence implies the opposite. There is no way to detect or prevent it from a library. FaceGroupAnalyzer is not a singleton and offers no way to ask whether an instance already exists in the process. Any two independent subsystems in an app — say, a background analysis service and a foreground preview — that each construct an analyzer will terminate the app. In my case the app must now enforce single-instance access through its own serial queue and lock, which is a constraint the framework imposes but does not state. Construction alone does not fail, so the problem surfaces later and elsewhere. Both instances construct successfully; Core Data only emits warnings at that point. The abort comes when both are alive and one of them does real work (update() and reading the grouping). So the crash lands far from its cause, in code that is individually correct. Feedback: FB24174678
0
0
56
6d
Osmo Mobile 8 changes reported tilt during yaw-only DockKit 360° pan
We are testing an Osmo Mobile 8 through Apple's DockKit framework. Configuration: iPhone 15 Pro Max iOS 26.5.2 (23F84) DJI Osmo Mobile 8 DockKit model identifier: DS308 Firmware reported through DockKit: 1.0.0 Apple's official DockKit camera sample used as the test application We disabled DockKit system tracking and commanded yaw movement only: Vector3D(x: 0, y: 0.2, z: 0). The pitch component remained zero throughout the test. Short left and right movements worked and kept the reported tilt reasonably stable. We then performed a complete yaw rotation. Pan completed successfully, including the expected angle wrap from approximately +150° to -170°. However, DockKit's reported tilt changed from approximately -8° at the starting heading to approximately -37° around the rear of the rotation. It returned to approximately -7° when the gimbal completed the rotation and returned to its original heading. Selected telemetry (Pan / Reported tilt): -0.86° / -8.08° +94.48° / -21.20° +149.89° / -33.35° -169.88° / -36.96° -89.90° / -25.95° -5.67° / -8.59° +1.95° / -7.05° We also found that Apple's sample application's manual chevrons did not initially produce visible movement, although direct calls to the same setAngularVelocity API worked reliably. Questions: Should the Osmo Mobile 8 maintain its physical horizon during a DockKit yaw-only command? Does this model provide a horizon-lock or leveling mode that third-party DockKit applications need to select? Is firmware 1.0.0 the expected DockKit-reported firmware version for this model? Is the changing tilt related to the Osmo's gimbal geometry, firmware stabilization, or DockKit coordinate reporting? Is there newer firmware or a recommended DJI test application we should use for comparison? The change was also visible in the phone's physical orientation, so it does not appear to be telemetry-only.
1
0
151
1w
PHAssetChangeRequest deleteAssets completionHandler for recently captured 48MP DNG sometimes never called
I want to report a issue on PHAssetChangeRequest.deleteAssets Environment iOS 18.5, iOS 26.2.5, iOS 27.0 Steps to Reproduce Capture a 48MP ProRAW (DNG) photo with the Camera app. Open my app, call the following api to delete this photo: PHPhotoLibrary.shared().performChanges({ PHAssetChangeRequest.deleteAssets(assets) }, completionHandler: completionHandler) Expected The system delete-confirmation dialog appears; after the user confirms, the asset is deleted and the completionHandler is called or report error if it failed Actual Sometime the following issue happens: The confirmation dialog never appears and the completionHandler is never called no success, no error, no timeout. The built-in Photos app can delete the affected asset but API can't. The stuck request leaks permanently. Even after the same asset is subsequently deleted via the built-in Photos app, the pending completionHandler is still never invoked. Workaround for this issue When the issue happens, restarting the iPhone or reinstall app can not help to fix it But I found if I leave the device alone for an extended period (maybe 10 min~1 hour) and restart the iPhone, finally I found PHAssetChangeRequest.deleteAssets work again. It looks like some background task for 48MP RAW image in DNG format stuck delete API. I need to wait the task finished and restart device to reset stuck status. But I can not know when the DNG is ready to delete, it looks like my app hangs I think the better behavior is completion block should return a error to tell user what happens instead of not calling completion block.
1
0
726
1w
ProResRAW shooting issue with AVCaptureMovieFileOutput with the first video
On iOS 26, the first ProRes RAW recording after launching the app consistently stalls for the entire take: audio records normally, but video contains only a few frames (for example, an 11.8-second clip at approximately 0.25 fps instead of 30 fps). Every subsequent recording works correctly. Before startRecording, the Bayer format is active, ProRes RAW is available, white balance is locked, and frame duration is pinned to 1/30. Reordering setOutputSettings and reasserting configuration have not resolved it; only discarding the first recording acts as a reliable warm-up. Is this a known one-time ProRes RAW encoder initialisation issue, and is there a supported way to prepare the encoder before the first user takes? I have a full working sample code if anyone needs but here is the setup function: import CoreMedia import CoreVideo @available(iOS 26.0, *) final class ProResRAWRecorder: NSObject, AVCaptureFileOutputRecordingDelegate { let session = AVCaptureSession() private let movieOutput = AVCaptureMovieFileOutput() private var camera: AVCaptureDevice! // Call on a serial capture queue. func configure() throws { session.beginConfiguration() defer { session.commitConfiguration() } session.sessionPreset = .inputPriority session.automaticallyConfiguresCaptureDeviceForWideColor = false guard let device = AVCaptureDevice.default( .builtInWideAngleCamera, for: .video, position: .back ) else { throw SampleError.noCamera } let cameraInput = try AVCaptureDeviceInput(device: device) guard session.canAddInput(cameraInput) else { throw SampleError.cannotAddInput } session.addInput(cameraInput) camera = device // Optional, but reproduces the real topology where audio remains healthy. if let microphone = AVCaptureDevice.default(for: .audio), let microphoneInput = try? AVCaptureDeviceInput(device: microphone), session.canAddInput(microphoneInput) { session.addInput(microphoneInput) } // Find a 12-bit packed Bayer format supporting 30 fps. guard let rawFormat = device.formats .filter({ CMFormatDescriptionGetMediaSubType($0.formatDescription) == kCVPixelFormatType_96VersatileBayerPacked12 && $0.videoSupportedFrameRateRanges.contains { $0.minFrameRate <= 30 && $0.maxFrameRate >= 30 } }) .max(by: { let a = CMVideoFormatDescriptionGetDimensions($0.formatDescription) let b = CMVideoFormatDescriptionGetDimensions($1.formatDescription) return Int(a.width) * Int(a.height) < Int(b.width) * Int(b.height) }) else { throw SampleError.noRAWFormat } try device.lockForConfiguration() device.activeFormat = rawFormat if rawFormat.supportedColorSpaces.contains(.appleLog) { device.activeColorSpace = .appleLog } let frameDuration = CMTime(value: 1, timescale: 30) device.activeVideoMinFrameDuration = frameDuration device.activeVideoMaxFrameDuration = frameDuration if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked } device.unlockForConfiguration() guard session.canAddOutput(movieOutput) else { throw SampleError.cannotAddOutput } session.addOutput(movieOutput) session.startRunning() } // Call on the same serial capture queue after startRunning() returns. func record(to url: URL) throws { guard let connection = movieOutput.connection(with: .video) else { throw SampleError.noVideoConnection } // Reassert the required device state at the take boundary. try camera.lockForConfiguration() if camera.isWhiteBalanceModeSupported(.locked) { camera.whiteBalanceMode = .locked } let frameDuration = CMTime(value: 1, timescale: 30) camera.activeVideoMinFrameDuration = frameDuration camera.activeVideoMaxFrameDuration = frameDuration camera.unlockForConfiguration() guard movieOutput.availableVideoCodecTypes.contains(.proResRAW) else { throw SampleError.rawCodecUnavailable } movieOutput.setOutputSettings( [AVVideoCodecKey: AVVideoCodecType.proResRAW], for: connection ) movieOutput.startRecording(to: url, recordingDelegate: self) } func stop() { if movieOutput.isRecording { movieOutput.stopRecording() } } func fileOutput( _ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error? ) { print("Finished:", outputFileURL, "error:", error as Any) } enum SampleError: Error { case noCamera case cannotAddInput case noRAWFormat case cannotAddOutput case noVideoConnection case rawCodecUnavailable } }
1
0
1.1k
2w
`LockedCameraCaptureManager` practically unusable since iOS 26
Somewhere since iOS 26, the LockedCameraCapture framework gets in an unpredictable state after opening the main app from the LockedCamera extension using LockedCameraCaptureSession.openApplication(for userActivity:). (Feedback with sample code to reproduce: FB21966835) Opening the extension from the lock screen again doesn’t open the extension but puts the lock screen in a state as if it has. Content updated from LockedCameraCaptureManager.shared.sessionContentUpdates comes in inconsistently, usually needs the app to be opened again or the extension to be opened. This makes using this extension impossible for me as I use it to record video files that manually need to be imported when the app is launched (so not through PhotoKit). Does anybody have a suggestion to circumvent this issue or how to get this fixed?
1
2
846
4w
Extended Dynamic Range support
My app currently supports display and editing of RAW files in HDR mode (Extended Dynamic Range). I came across 2 issues: In HDR mode, if I am using the default boostAmount = 1.0, then some of the highlight colors will shift. Like a clear blue sky becomes a light gray / light purple sky. I've to set boostAmount = 0.0 to avoid this problem. Is this a bug or is there a way to keep the Apple colors and not having this issue? The Shadow and highlight filter does not appear to work correctly in HDR mode, I've it hooked up in the linearSpaceFilter. Would be nice if you guys can introduce a spatial aware shadow & highlight filter.
1
0
393
Jul ’26
PHObject.localIdentifier reliability
For a PHAsset in the same Photos library on the same device/Mac, what are the documented stability guarantees of PHObject.localIdentifier? Is it safe to persist and use for future PhotoKit operations in that same local library? Are there known cases where it can change or stop resolving? If a persisted localIdentifier no longer resolves but a persisted PHCloudIdentifier.archivalStringValue does resolve in the same library, is updating the stored local identifier from that cloud mapping the recommended recovery path? Thanks!
3
1
425
Jul ’26
Is autoDeferredPhotoDelivery required for 24MP capture?
I've been trying to implement the newly touted high resolution capture at 24MP from WWDC26: https://developer.apple.com/videos/play/wwdc2026/304/ However it seems it's only possible to capture 24mp photos if you enable autoDeferredPhotoDelivery? This is quite frustrating as my app wants to run the image output through shaders and effects before saving. Is there a way round this limiation?
0
0
388
Jul ’26
Best practice for rapid sequential Live Photo captures with AVCapturePhotoOutput?
Hi everyone, I’m working on a camera app as a learning project and have reached a point where I’m trying to better understand the intended architecture for Live Photo capture using AVCapturePhotoOutput. The app currently supports: Live Photos Depth data Location metadata Multiple lens presets on a virtual multi-camera device Everything is working well, but I’m now thinking about capture throughput and rapid shutter presses. Right now, my implementation is fairly conservative. I wait for a Live Photo capture to finish processing and importing before allowing another capture. This is reliable, but it doesn’t feel particularly camera-like when compared to Apple’s Camera app. One observation from field testing caught my attention: I took a Live Photo, immediately switched lenses, then took another Live Photo. When I viewed the first Live Photo later, the movie portion included the lens-switching actions that occurred after I pressed the shutter. That made me realize that I may be thinking about the capture lifecycle incorrectly. My questions are: When using AVCapturePhotoOutput with Live Photos enabled, what is the earliest point at which a capture can be considered “safely secured”? Is it expected that apps wait for PhotoKit import to complete before accepting another Live Photo capture request? If supporting rapid sequential shutter presses, is the recommended approach to queue capture requests and process them one at a time? Are there any best practices around lens changes or camera reconfiguration while a Live Photo is still being captured or processed? I’m not looking for details about the implementation of Apple’s Camera app. I’m mainly trying to understand the recommended approach when working with the public AVFoundation APIs. I’d appreciate any guidance, documentation references, or examples from developers who have worked through similar problems. Thanks!
1
0
653
Jun ’26
Using isCinematicVideoCaptureEnabled on videoDeviceInput for Depth Data Preview
In WWDC26 video "Camera and Photo Technologies Group Lab", @14:17, Brad Ford mentions that we can use isCinematicVideoCaptureEnabled on videoDeviceInput to display depth blur on camera preview, even on a photo camera app. However, when I turn it on for depth mode, the API tells me that it is not supported with the current camera, which is Dual or Dual Wide cameras I use for depth. Since there are no other resources on this, I would love to get some guidance on how to do this. I just want to display depth blur on camera preview, that is it.
1
0
511
Jun ’26
[iOS 27 DB3] Photos taken with third party apps have photographic styles applied
It's unclear if this is a bug or a new feature but I have noticed that my photos starting coming out looking more stylised than expected and worked out that it was because photographic styles were being applied even tho I was taking photos through a third party app. Is there a way to disable this behaviour if it is intended? I've raised a feedback report #FB23632714 Photographic Styles [OFF] Photographic Styles [ON] My settings:
Replies
1
Boosts
0
Views
409
Activity
23h
flashMode .on overrides locked focus — AF scan runs and refocuses before the strobe
I'm building a fixed-focus camera app (Bayer RAW, manual exposure, focus permanently locked at a known lens position) and need a full-power flash still that keeps that locked focus. On iPhone 17 Pro, iOS 26, any capture with flashMode = .on runs an autofocus-assist scan — visible lens hunt, assist lamp in low light — and the exposure happens at whatever the scan converged on (usually the far background), not my locked position. In low light it reproduces every time; bright-scene behavior varied by configuration (see matrix), and in my current build it hunts in daylight too. This follows https://developer.apple.com/forums/thread/724897 where DTS confirmed locked lens position + flash "is possible" in a test app, but the differentiating configuration was never identified. I've now exhausted every documented lever, with instrumentation, and would like guidance on whether this stage is bypassable at all. Session configuration session.sessionPreset = .photo // Plain wide camera (also reproduced on .builtInLiDARDepthCamera). let camera = AVCaptureDevice.default( .builtInWideAngleCamera, for: .video, position: .back )! session.addInput(try AVCaptureDeviceInput(device: camera)) session.addOutput(photoOutput) photoOutput.maxPhotoQualityPrioritization = .speed photoOutput.isZeroShutterLagEnabled = false photoOutput.isResponsiveCaptureEnabled = true // Pre-allocate flash capture resources up front. photoOutput.setPreparedPhotoSettingsArray( [makeFlashRawSettings()], completionHandler: nil ) Device configuration (before any capture) try camera.lockForConfiguration() camera.isSubjectAreaChangeMonitoringEnabled = false camera.isSmoothAutoFocusEnabled = false camera.autoFocusRangeRestriction = .near camera.automaticallyEnablesLowLightBoostWhenAvailable = false camera.automaticallyAdjustsFaceDrivenAutoFocusEnabled = false camera.isFaceDrivenAutoFocusEnabled = false // true is worse; see matrix camera.automaticallyAdjustsFaceDrivenAutoExposureEnabled = false camera.isFaceDrivenAutoExposureEnabled = false camera.setFocusModeLocked(lensPosition: 0.60) // ~1 m on this device let gains = camera.deviceWhiteBalanceGains( for: .init(temperature: 4000, tint: 0) ) camera.setWhiteBalanceModeLocked(with: gains) camera.setExposureModeCustom( duration: CMTime(value: 1, timescale: 125), iso: 400 ) camera.unlockForConfiguration() Capture func makeFlashRawSettings() -> AVCapturePhotoSettings { let bayer = photoOutput.availableRawPhotoPixelFormatTypes.first { AVCapturePhotoOutput.isBayerRAWPixelFormat($0) }! let settings = AVCapturePhotoSettings(rawPixelFormatType: bayer) settings.flashMode = .on settings.isAutoRedEyeReductionEnabled = false settings.isAutoStillImageStabilizationEnabled = false settings.isAutoVirtualDeviceFusionEnabled = false settings.isAutoContentAwareDistortionCorrectionEnabled = false settings.photoQualityPrioritization = .speed return settings } // Right before the request, exposure flips .custom → .locked (same // duration/ISO), one preview frame presents, then: photoOutput.capturePhoto(with: makeFlashRawSettings(), delegate: self) What I measure (KVO during the capture window) isAdjustingFocus goes true after the request: a scan runs despite focusMode == .locked (assist lamp on in low light). lensPosition moves from the locked 0.60 to a far position and stays there through willCapturePhotoFor — the exposure uses the scan's answer. When isAdjustingFocus falls back to false (before the metering preflash) I issue one setFocusModeLocked(lensPosition: 0.60). The call succeeds, yet the exposure still happens at the far position — something re-asserts the scan's focus before the strobe. With flashMode = .off, locked focus and custom exposure are honored perfectly (my app's normal path). Tried, all reproduced focusMode = .locked + setFocusModeLocked(lensPosition:): scan still runs. Exposure .custom → .locked for the flash window: no change. Plain wide vs LiDAR wide device: no change. Subject-area / smooth AF / face-driven AF+AE / low-light boost all off: scan still runs in low light. isFaceDrivenAutoFocusEnabled = true (steer scan toward faces): worse — scans in daylight too. Red-eye reduction, fusion, distortion correction off: no change. autoFocusRangeRestriction = .near: still converges far. photoQualityPrioritization = .speed everywhere: no change. Prepared photo settings (flash RAW): no change. Re-lock lens mid-scan: fights the scan; worse convergence. Re-lock lens after scan, before strobe: succeeds; exposure still at the scan's position. Torch lit at request time: scans even in bright daylight. The last two items seem diagnostic: the gate is not scene brightness. A torch adding no visible light in daylight still arms the scan, and face-driven AF arms it in bright scenes — the AF-assist stage runs whenever the sequence sees any reason to focus, and a client's .locked focus mode is never treated as that reason being absent. Questions Is the flash AF-assist stage skippable when focusMode == .locked? The earlier thread's DTS reply achieved a locked-focus flash photo — what configuration makes that true on current hardware/iOS? If not skippable: is there a supported way for the final exposure to honor the locked lens position — run the scan but not apply its result? Why does a successful setFocusModeLocked(lensPosition:) issued between scan end and strobe not stick? Is the sequence re-asserting its own focus at exposure time? Are the observed triggers (torch active at request; face-driven AF enabled — each arming the scan regardless of brightness) expected for flashMode = .on? Goal: full-power flash still + fixed focus + manual exposure, which flashMode = .off already delivers minus the flash. Any guidance — including "file a feedback, here's the rdar to duplicate" — appreciated. Happy to attach a focused sample project and sysdiagnose.
Replies
0
Boosts
0
Views
227
Activity
2d
Turning AutoFocus off while flash is on.
Hello, I am creating a simple camere app where I want to turn OFF the autofocus (and set the focus within the app) then take a picture with the flash. The only problem is as soon as i set the flash and take a photo, it auto focuses even though i have set the focus mode locked and lens position? Is this even possible? My av capture output settings:     photoOutput.isHighResolutionCaptureEnabled = true     photoOutput.isLivePhotoCaptureEnabled = false;     photoOutput.isDepthDataDeliveryEnabled = false;     photoOutput.isPortraitEffectsMatteDeliveryEnabled = false     photoOutput.isAppleProRAWEnabled = false;     photoOutput.setPreparedPhotoSettingsArray([buildPhotoSettings(flash: flash)]); my AVCapturePhoto Settings     let photoSettings = AVCapturePhotoSettings(rawPixelFormatType: availbleRaw[0]);     photoSettings.isAutoStillImageStabilizationEnabled = false;     photoSettings.flashMode = flash ?.on :.off;     photoSettings.isHighResolutionPhotoEnabled = true;     photoSettings.isAutoRedEyeReductionEnabled = false; my device input settings           //--white balance     let whiteBalanceValues = AVCaptureDevice.WhiteBalanceTemperatureAndTintValues(temperature: settings.whiteBalanceTemp, tint: settings.whiteBalanceTint);     let newWhiteBalance = videoDeviceInput.device.deviceWhiteBalanceGains(for:whiteBalanceValues);     let maxGain = videoDeviceInput.device.maxWhiteBalanceGain           if(newWhiteBalance.redGain > maxGain || newWhiteBalance.greenGain > maxGain || newWhiteBalance.blueGain > maxGain){       videoDeviceInput.device.unlockForConfiguration();       return (false, "WhiteBalance values are invalid (over maximum gain allowed)");     }           videoDeviceInput.device.setWhiteBalanceModeLocked(with: newWhiteBalance);           //--iso and exposure     let exposure = Float64(settings.exposure/1000);     let exposureTime = CMTime(seconds: exposure, preferredTimescale: 1000)     let iso = Float(settings.iso)           if(exposureTime > videoDeviceInput.device.activeFormat.maxExposureDuration || exposureTime < videoDeviceInput.device.activeFormat.minExposureDuration){       videoDeviceInput.device.unlockForConfiguration();       return (false, "Exposure out of bounds");     }           if(iso > videoDeviceInput.device.activeFormat.maxISO || iso < videoDeviceInput.device.activeFormat.minISO){       videoDeviceInput.device.unlockForConfiguration();       return (false, "ISO out of bounds");     }           videoDeviceInput.device.setExposureModeCustom(duration: exposureTime, iso: iso);           //--Lens focus     if(settings.lensPosition < 0 || settings.lensPosition>1){       videoDeviceInput.device.unlockForConfiguration();       return (false, "Lens position out of bounds");     }               if(videoDeviceInput.device.isFocusModeSupported(.locked)){       videoDeviceInput.device.focusMode = .locked;       videoDeviceInput.device.setFocusModeLocked(lensPosition: settings.lensPosition);             }           if #available(iOS 15.4, *) {       if(videoDeviceInput.device.isFaceDrivenAutoFocusEnabled){         videoDeviceInput.device.automaticallyAdjustsFaceDrivenAutoFocusEnabled = false;                 }               if(videoDeviceInput.device.isFaceDrivenAutoExposureEnabled){         videoDeviceInput.device.automaticallyAdjustsFaceDrivenAutoExposureEnabled = false;       }               if(videoDeviceInput.device.isLowLightBoostSupported){         videoDeviceInput.device.automaticallyEnablesLowLightBoostWhenAvailable = false;       }     } else {       // Fallback on earlier versions     }           //--Torch ON     videoDeviceInput.device.torchMode = settings.torch ? AVCaptureDevice.TorchMode.on :AVCaptureDevice.TorchMode.off;           if(settings.torch){       if(settings.torchLevel<0 || settings.torchLevel>1){         return (false, "Flash out of bounds");       }               try? videoDeviceInput.device.setTorchModeOn(level: Float(settings.torchLevel));     }                       //--Finish     videoDeviceInput.device.unlockForConfiguration();
Replies
3
Boosts
0
Views
1.6k
Activity
2d
Supported Core Image workflow for cropping/scaling Apple Log x422 buffers without converting to HLG?
We capture Apple Log video using AVCaptureVideoDataOutput with: AVCaptureDevice.activeColorSpace = .appleLog or .appleLog2 kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange (x422) AVAssetWriter for the final ProRes/HEVC recording We need to bake spatial operations such as a centre crop and optional anamorphic desqueeze into the recorded raster. We want the result to remain Apple Log for subsequent grading; we do not want to display-transform or convert it to HLG. Core Image/Core Graphics does not appear to expose a public Apple Log or Apple Log 2 CGColorSpace. Core Video instead identifies the signal using kCVImageBufferLogTransferFunctionKey. Would this be the supported Core Image approach for spatial-only processing? let image = CIImage( cvPixelBuffer: sourceBuffer, options: [.colorSpace: NSNull()] ) let context = CIContext( mtlDevice: metalDevice, options: [ .workingColorSpace: NSNull(), .outputColorSpace: NSNull(), .cacheIntermediates: false ] ) let outputImage = image .cropped(to: cropRect) .transformed(by: spatialTransform) context.render( outputImage, to: destinationX422Buffer, bounds: outputBounds, colorSpace: nil ) We would then copy the source buffer’s Apple Log colour and Log-transfer attachments to the destination buffer and append it to an AVAssetWriterInputPixelBufferAdaptor. Could an Apple engineer clarify the following? Does CIImage(cvPixelBuffer:) natively interpret kCVImageBufferLogTransferFunctionKey, even though no public Apple Log CGColorSpace exists? When NSNull()/nil is supplied as above, does Core Image leave the Apple Log values unmanaged during crop and affine operations? When rendering x422 to x422, can Core Image preserve the Log signal apart from expected resampling/rounding, or does it internally perform a colour conversion such as YCbCr → RGB → YCbCr? For scaling or anamorphic desqueeze, is Apple’s recommended workflow to: resample the encoded Apple Log values with colour management disabled, or explicitly decode Apple Log to a linear working space, resample, and encode back using a custom Metal implementation? Is copying kCVImageBufferLogTransferFunctionKey and the related colour attachments from source to destination sufficient for AVAssetWriter, assuming the writer settings were obtained from recommendedVideoSettingsForAssetWriter(writingTo:)? Is there ever a supported reason to use HLG as an intermediate for Apple Log processing, or should that be avoided? This this part, we are concerned about preserving the captured Log signal in a recording pipeline, not applying a viewing LUT or displaying Apple Log. Next, we also support optional LUT processing with CIColorCube. Some LUTs are technical Apple Log-to-display transforms, while others expect linear or Rec.709 input. If the image is created with .colorSpace: NSNull(), we understand that the LUT receives unmanaged Apple Log code values and that the LUT itself must perform the required transfer-function and gamut conversion. Does Core Image synthesize an Apple Log-aware input color space from kCVImageBufferLogTransferFunctionKey, or must applications implement Apple Log/Apple Log 2 decoding explicitly before using ordinary Core Image filters? Is there a supported CGColorSpace, ColorSync profile, or Core Image conversion API for this? Additionally, what numeric range does CIColorCube receive when its source is an x422 video-range Apple Log buffer— normalized Log RGB values, or values requiring explicit video-range conversion?
Replies
0
Boosts
0
Views
283
Activity
3d
FaceGroupAnalyzer: a truncated image file reports zero faces with no error, indistinguishable from a photograph that contains no people
An image file whose data is cut in half is accepted by insertOrUpdateAssets, produces no error, and is reported as an image containing zero faces. That result is indistinguishable from a photograph that genuinely has no people in it. In my measurement the intact file reported 4 faces and a copy truncated to half its bytes reported 0 faces — both without throwing. Why this is worse than an error. A client that receives "zero faces, no error" will record the asset as analysed, no people present. That is a permanent, silent, incorrect result: the file is never revisited, and the people in it are lost from the catalogue with no diagnostic anywhere. An error would have been recorded as a failure and retried later. Silence is the one outcome that cannot be recovered from. The failure mode is also inconsistent. Other kinds of damaged input do throw — a zero-byte file, a text file with a .jpg extension, and a file whose interior bytes have been destroyed all raise MediaIntelligenceError.faceGroupProcessing. Truncation is the case that silently succeeds, and truncation is precisely the damage that partial downloads, interrupted copies and failing disks produce — the most common form of corruption in a real photo archive, and the one I have to handle in 97 libraries of mixed provenance. My current workaround is to fully decode every image myself before handing it to the framework, purely to detect truncation. That means every file is decoded twice, which roughly doubles the I/O of the analysis pass. Feedback: FB24174749
Replies
0
Boosts
0
Views
85
Activity
6d
FaceGroupAnalyzer: one unreadable asset makes `insertOrUpdateAssets` deliver zero elements, discarding results already computed for the valid assets in the batch
If a single asset in the array passed to insertOrUpdateAssets cannot be read, the returned AsyncSequence throws and delivers zero elements — including for the valid assets that appear before the offending one in the array. In my measurement a batch of 5 — two valid photographs, one zero-byte .jpg, then two more valid photographs — delivered 0 of 5 elements and reported 0 faces. The framework's own stdout log shows it had already processed the valid photographs before failing, so the work was done and then thrown away. This is the behaviour I would expect from a function returning [Result] after processing everything, not from a streaming AsyncSequence. The whole reason to expose an async sequence is to deliver results as they are produced; here the sequence produces nothing at all, which makes the streaming shape actively misleading. Why this matters at library scale. I am cataloguing 97 photo libraries, many of them archives of scanned family photographs going back to the 1970s, where a handful of damaged files is normal rather than exceptional. As the API stands, the batch size I choose for throughput is also the amount of work a single corrupt file destroys — with a batch of 100, one bad file costs 100 images. The only safe strategy is to catch the failure and re-submit the batch one asset at a time to find the culprit, which turns a rare bad file into a full re-run of that batch and makes the worst case quadratic in the number of bad files. Note also that the error gives no indication of which asset failed (see the related enhancement request on error taxonomy), so isolating the culprit by re-submission is the only option available. Feedback: FB24174733
Replies
0
Boosts
0
Views
79
Activity
6d
FaceGroupAnalyzer: `insertOrUpdateAssets` does not honour `Task` cancellation and returns successfully long after the task was cancelled
insertOrUpdateAssets(_:) is async throws and returns an AsyncSequence, so by the Swift Concurrency contract I expected it to observe cancellation of the enclosing Task and throw CancellationError. It does not. The call runs to completion and returns successfully, with the full result set, as though the cancellation had never happened. In my measurement the cancel was delivered at 2.7 s and the call returned successfully at 19.0 s, having processed all 150 assets and reported 550 faces. The practical consequence for an app is that a "Stop" button cannot stop work that is already in flight. The only way to get responsive cancellation is to slice the work into many small calls and check Task.checkCancellation() between them — which means the batch size, which should be tuned for throughput, ends up being dictated by how long a user is willing to wait after pressing Stop. For me that is the difference between a batch of 150 (≈19 s to react) and a batch of 25 (≈3 s). The store is left in a consistent state, which is good: the assets processed before cancellation remain, and state correctly becomes .stale. So this is specifically about the cancellation signal being ignored, not about data integrity. One detail worth knowing when reproducing this insertOrUpdateAssets is declared nonisolated(nonsending), so it executes on the caller's executor. My first attempt at this reproducer used a plain Task { } created from @MainActor top-level code — which inherits main-actor isolation — and the detection therefore ran on the main actor and starved the very code that was supposed to cancel it: a Task.sleep(2.5s) on the main actor did not resume until the 19-second call had already finished, so the cancel was not even delivered until 19.0 s. The attached reproducer uses Task.detached to avoid that confound, and the cancel is correctly delivered at 2.7 s. I mention it because anyone reproducing this from a @MainActor context will see a different and misleading timeline. Feedback: FB24174707
Replies
0
Boosts
0
Views
60
Activity
6d
FaceGroupAnalyzer: two live instances register the Core Data model twice and abort the process with +[MIManagedFace entity] Failed to find a unique match
Constructing a second FaceGroupAnalyzer while a first one is still alive registers the framework's Core Data managed object model a second time. Core Data can then no longer resolve +[MIManagedFace entity], and the process is terminated with SIGTRAP (exit status 133). Three things make this worse than a normal API misuse: It happens with completely separate working directories. The two instances are logically independent — different directories, different stores, no shared state that the API surface exposes. Nothing in the signature of init(workingDirectory:) suggests that two of them cannot coexist, and the parameter's existence implies the opposite. There is no way to detect or prevent it from a library. FaceGroupAnalyzer is not a singleton and offers no way to ask whether an instance already exists in the process. Any two independent subsystems in an app — say, a background analysis service and a foreground preview — that each construct an analyzer will terminate the app. In my case the app must now enforce single-instance access through its own serial queue and lock, which is a constraint the framework imposes but does not state. Construction alone does not fail, so the problem surfaces later and elsewhere. Both instances construct successfully; Core Data only emits warnings at that point. The abort comes when both are alive and one of them does real work (update() and reading the grouping). So the crash lands far from its cause, in code that is individually correct. Feedback: FB24174678
Replies
0
Boosts
0
Views
56
Activity
6d
Osmo Mobile 8 changes reported tilt during yaw-only DockKit 360° pan
We are testing an Osmo Mobile 8 through Apple's DockKit framework. Configuration: iPhone 15 Pro Max iOS 26.5.2 (23F84) DJI Osmo Mobile 8 DockKit model identifier: DS308 Firmware reported through DockKit: 1.0.0 Apple's official DockKit camera sample used as the test application We disabled DockKit system tracking and commanded yaw movement only: Vector3D(x: 0, y: 0.2, z: 0). The pitch component remained zero throughout the test. Short left and right movements worked and kept the reported tilt reasonably stable. We then performed a complete yaw rotation. Pan completed successfully, including the expected angle wrap from approximately +150° to -170°. However, DockKit's reported tilt changed from approximately -8° at the starting heading to approximately -37° around the rear of the rotation. It returned to approximately -7° when the gimbal completed the rotation and returned to its original heading. Selected telemetry (Pan / Reported tilt): -0.86° / -8.08° +94.48° / -21.20° +149.89° / -33.35° -169.88° / -36.96° -89.90° / -25.95° -5.67° / -8.59° +1.95° / -7.05° We also found that Apple's sample application's manual chevrons did not initially produce visible movement, although direct calls to the same setAngularVelocity API worked reliably. Questions: Should the Osmo Mobile 8 maintain its physical horizon during a DockKit yaw-only command? Does this model provide a horizon-lock or leveling mode that third-party DockKit applications need to select? Is firmware 1.0.0 the expected DockKit-reported firmware version for this model? Is the changing tilt related to the Osmo's gimbal geometry, firmware stabilization, or DockKit coordinate reporting? Is there newer firmware or a recommended DJI test application we should use for comparison? The change was also visible in the phone's physical orientation, so it does not appear to be telemetry-only.
Replies
1
Boosts
0
Views
151
Activity
1w
PHAssetChangeRequest deleteAssets completionHandler for recently captured 48MP DNG sometimes never called
I want to report a issue on PHAssetChangeRequest.deleteAssets Environment iOS 18.5, iOS 26.2.5, iOS 27.0 Steps to Reproduce Capture a 48MP ProRAW (DNG) photo with the Camera app. Open my app, call the following api to delete this photo: PHPhotoLibrary.shared().performChanges({ PHAssetChangeRequest.deleteAssets(assets) }, completionHandler: completionHandler) Expected The system delete-confirmation dialog appears; after the user confirms, the asset is deleted and the completionHandler is called or report error if it failed Actual Sometime the following issue happens: The confirmation dialog never appears and the completionHandler is never called no success, no error, no timeout. The built-in Photos app can delete the affected asset but API can't. The stuck request leaks permanently. Even after the same asset is subsequently deleted via the built-in Photos app, the pending completionHandler is still never invoked. Workaround for this issue When the issue happens, restarting the iPhone or reinstall app can not help to fix it But I found if I leave the device alone for an extended period (maybe 10 min~1 hour) and restart the iPhone, finally I found PHAssetChangeRequest.deleteAssets work again. It looks like some background task for 48MP RAW image in DNG format stuck delete API. I need to wait the task finished and restart device to reset stuck status. But I can not know when the DNG is ready to delete, it looks like my app hangs I think the better behavior is completion block should return a error to tell user what happens instead of not calling completion block.
Replies
1
Boosts
0
Views
726
Activity
1w
ProResRAW shooting issue with AVCaptureMovieFileOutput with the first video
On iOS 26, the first ProRes RAW recording after launching the app consistently stalls for the entire take: audio records normally, but video contains only a few frames (for example, an 11.8-second clip at approximately 0.25 fps instead of 30 fps). Every subsequent recording works correctly. Before startRecording, the Bayer format is active, ProRes RAW is available, white balance is locked, and frame duration is pinned to 1/30. Reordering setOutputSettings and reasserting configuration have not resolved it; only discarding the first recording acts as a reliable warm-up. Is this a known one-time ProRes RAW encoder initialisation issue, and is there a supported way to prepare the encoder before the first user takes? I have a full working sample code if anyone needs but here is the setup function: import CoreMedia import CoreVideo @available(iOS 26.0, *) final class ProResRAWRecorder: NSObject, AVCaptureFileOutputRecordingDelegate { let session = AVCaptureSession() private let movieOutput = AVCaptureMovieFileOutput() private var camera: AVCaptureDevice! // Call on a serial capture queue. func configure() throws { session.beginConfiguration() defer { session.commitConfiguration() } session.sessionPreset = .inputPriority session.automaticallyConfiguresCaptureDeviceForWideColor = false guard let device = AVCaptureDevice.default( .builtInWideAngleCamera, for: .video, position: .back ) else { throw SampleError.noCamera } let cameraInput = try AVCaptureDeviceInput(device: device) guard session.canAddInput(cameraInput) else { throw SampleError.cannotAddInput } session.addInput(cameraInput) camera = device // Optional, but reproduces the real topology where audio remains healthy. if let microphone = AVCaptureDevice.default(for: .audio), let microphoneInput = try? AVCaptureDeviceInput(device: microphone), session.canAddInput(microphoneInput) { session.addInput(microphoneInput) } // Find a 12-bit packed Bayer format supporting 30 fps. guard let rawFormat = device.formats .filter({ CMFormatDescriptionGetMediaSubType($0.formatDescription) == kCVPixelFormatType_96VersatileBayerPacked12 && $0.videoSupportedFrameRateRanges.contains { $0.minFrameRate <= 30 && $0.maxFrameRate >= 30 } }) .max(by: { let a = CMVideoFormatDescriptionGetDimensions($0.formatDescription) let b = CMVideoFormatDescriptionGetDimensions($1.formatDescription) return Int(a.width) * Int(a.height) < Int(b.width) * Int(b.height) }) else { throw SampleError.noRAWFormat } try device.lockForConfiguration() device.activeFormat = rawFormat if rawFormat.supportedColorSpaces.contains(.appleLog) { device.activeColorSpace = .appleLog } let frameDuration = CMTime(value: 1, timescale: 30) device.activeVideoMinFrameDuration = frameDuration device.activeVideoMaxFrameDuration = frameDuration if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked } device.unlockForConfiguration() guard session.canAddOutput(movieOutput) else { throw SampleError.cannotAddOutput } session.addOutput(movieOutput) session.startRunning() } // Call on the same serial capture queue after startRunning() returns. func record(to url: URL) throws { guard let connection = movieOutput.connection(with: .video) else { throw SampleError.noVideoConnection } // Reassert the required device state at the take boundary. try camera.lockForConfiguration() if camera.isWhiteBalanceModeSupported(.locked) { camera.whiteBalanceMode = .locked } let frameDuration = CMTime(value: 1, timescale: 30) camera.activeVideoMinFrameDuration = frameDuration camera.activeVideoMaxFrameDuration = frameDuration camera.unlockForConfiguration() guard movieOutput.availableVideoCodecTypes.contains(.proResRAW) else { throw SampleError.rawCodecUnavailable } movieOutput.setOutputSettings( [AVVideoCodecKey: AVVideoCodecType.proResRAW], for: connection ) movieOutput.startRecording(to: url, recordingDelegate: self) } func stop() { if movieOutput.isRecording { movieOutput.stopRecording() } } func fileOutput( _ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error? ) { print("Finished:", outputFileURL, "error:", error as Any) } enum SampleError: Error { case noCamera case cannotAddInput case noRAWFormat case cannotAddOutput case noVideoConnection case rawCodecUnavailable } }
Replies
1
Boosts
0
Views
1.1k
Activity
2w
PHAsset Additional Properties
Following Metadata should be accessible from PHAsset Object: Title, caption, Keywords. Write now they are available in the SQLite Photo Library, but thats is not a clean solution.
Replies
2
Boosts
4
Views
823
Activity
3w
How to import photos into Device Hub photos app (beta 3)
In the old simulator you were able to simply drag a photo or video from your desktop into the photos app within the simulator in order to use it for testing. That doesn't seem to be working yet in Device Hub. Is there a workaround or are we just waiting on this to be fixed?
Replies
1
Boosts
0
Views
266
Activity
4w
`LockedCameraCaptureManager` practically unusable since iOS 26
Somewhere since iOS 26, the LockedCameraCapture framework gets in an unpredictable state after opening the main app from the LockedCamera extension using LockedCameraCaptureSession.openApplication(for userActivity:). (Feedback with sample code to reproduce: FB21966835) Opening the extension from the lock screen again doesn’t open the extension but puts the lock screen in a state as if it has. Content updated from LockedCameraCaptureManager.shared.sessionContentUpdates comes in inconsistently, usually needs the app to be opened again or the extension to be opened. This makes using this extension impossible for me as I use it to record video files that manually need to be imported when the app is launched (so not through PhotoKit). Does anybody have a suggestion to circumvent this issue or how to get this fixed?
Replies
1
Boosts
2
Views
846
Activity
4w
Extended Dynamic Range support
My app currently supports display and editing of RAW files in HDR mode (Extended Dynamic Range). I came across 2 issues: In HDR mode, if I am using the default boostAmount = 1.0, then some of the highlight colors will shift. Like a clear blue sky becomes a light gray / light purple sky. I've to set boostAmount = 0.0 to avoid this problem. Is this a bug or is there a way to keep the Apple colors and not having this issue? The Shadow and highlight filter does not appear to work correctly in HDR mode, I've it hooked up in the linearSpaceFilter. Would be nice if you guys can introduce a spatial aware shadow & highlight filter.
Replies
1
Boosts
0
Views
393
Activity
Jul ’26
PHObject.localIdentifier reliability
For a PHAsset in the same Photos library on the same device/Mac, what are the documented stability guarantees of PHObject.localIdentifier? Is it safe to persist and use for future PhotoKit operations in that same local library? Are there known cases where it can change or stop resolving? If a persisted localIdentifier no longer resolves but a persisted PHCloudIdentifier.archivalStringValue does resolve in the same library, is updating the stored local identifier from that cloud mapping the recommended recovery path? Thanks!
Replies
3
Boosts
1
Views
425
Activity
Jul ’26
Is autoDeferredPhotoDelivery required for 24MP capture?
I've been trying to implement the newly touted high resolution capture at 24MP from WWDC26: https://developer.apple.com/videos/play/wwdc2026/304/ However it seems it's only possible to capture 24mp photos if you enable autoDeferredPhotoDelivery? This is quite frustrating as my app wants to run the image output through shaders and effects before saving. Is there a way round this limiation?
Replies
0
Boosts
0
Views
388
Activity
Jul ’26
Best practice for rapid sequential Live Photo captures with AVCapturePhotoOutput?
Hi everyone, I’m working on a camera app as a learning project and have reached a point where I’m trying to better understand the intended architecture for Live Photo capture using AVCapturePhotoOutput. The app currently supports: Live Photos Depth data Location metadata Multiple lens presets on a virtual multi-camera device Everything is working well, but I’m now thinking about capture throughput and rapid shutter presses. Right now, my implementation is fairly conservative. I wait for a Live Photo capture to finish processing and importing before allowing another capture. This is reliable, but it doesn’t feel particularly camera-like when compared to Apple’s Camera app. One observation from field testing caught my attention: I took a Live Photo, immediately switched lenses, then took another Live Photo. When I viewed the first Live Photo later, the movie portion included the lens-switching actions that occurred after I pressed the shutter. That made me realize that I may be thinking about the capture lifecycle incorrectly. My questions are: When using AVCapturePhotoOutput with Live Photos enabled, what is the earliest point at which a capture can be considered “safely secured”? Is it expected that apps wait for PhotoKit import to complete before accepting another Live Photo capture request? If supporting rapid sequential shutter presses, is the recommended approach to queue capture requests and process them one at a time? Are there any best practices around lens changes or camera reconfiguration while a Live Photo is still being captured or processed? I’m not looking for details about the implementation of Apple’s Camera app. I’m mainly trying to understand the recommended approach when working with the public AVFoundation APIs. I’d appreciate any guidance, documentation references, or examples from developers who have worked through similar problems. Thanks!
Replies
1
Boosts
0
Views
653
Activity
Jun ’26
Camera Control
How control camera Zoom in and Zoom out from external remote by sending HID
Replies
0
Boosts
0
Views
361
Activity
Jun ’26
Using isCinematicVideoCaptureEnabled on videoDeviceInput for Depth Data Preview
In WWDC26 video "Camera and Photo Technologies Group Lab", @14:17, Brad Ford mentions that we can use isCinematicVideoCaptureEnabled on videoDeviceInput to display depth blur on camera preview, even on a photo camera app. However, when I turn it on for depth mode, the API tells me that it is not supported with the current camera, which is Dual or Dual Wide cameras I use for depth. Since there are no other resources on this, I would love to get some guidance on how to do this. I just want to display depth blur on camera preview, that is it.
Replies
1
Boosts
0
Views
511
Activity
Jun ’26