Post

Replies

Boosts

Views

Activity

Reply to PHPhotosErrorDomain Code: 3302 started affecting my users recently.
Hi, as I mentioned I'm not able to reproduce it locally, I tried on all my available devices. so I don't have any error logs. I have NSPhotoLibraryAddUsageDescription and I reuse the same code in 3 of my production app that are on the marked for 9 and 10 years I never had those complaints until last month. My app also supports accessing user content (videos from Photos or Documents) they can load videos and reference them side-by-side with the recorded content. But it seems like a bug to me on the new version? I don't see anything that I changed. 2. It affects maybe 1% of users, and it works fine for 99% of users just fine. 3. In the analytics it appears there are no users affected by those error with Full Photos access, but I added those analytics just a couple days ago, before I wasn't tracking those errors. 4. I think I should be able to reproduce the error given how many times I already tried. However until recently I was still using Xcode 16.3 to deploy to AppStore because of supporting older iOS versions and I started using Xcode 26.3. Now that I think about it, maybe this is it? I think it started happening since I switched to Xcode 26.3 from Xcode 16. Two of my other apps that reuse the recording code and are in production are still deployed using older Xcode versions. This is what I'm seeing in Crashlytics log. error_domain: PHPhotosErrorDomain error_desc: The operation couldn’t be completed. (PHPhotosErrorDomain error 3302.) error_code: 3302
Topic: Media Technologies SubTopic: Video Tags:
3w
Reply to How to hide route button `showsRouteButton = false` in `MPVolumeView` without deprecation warning?
Sorry, but for which control? Do you mean for the slider? AVRoutePickerView A view that presents a list of nearby media receivers. My question is about MPVolumeView . Sorry, but how do I wire up AVRoutePickerView with MPVolumeView, in the documentation there's no example. That documentation also doesn't say anything about controlling system volume, It only says about handling media receivers. Can you help me?
Topic: Media Technologies SubTopic: Audio Tags:
Mar ’26
Reply to How to hide route button `showsRouteButton = false` in `MPVolumeView` without deprecation warning?
Thank you for a quick reply. We are using non-deprecated MPVolumeView (https://developer.apple.com/documentation/mediaplayer/mpvolumeview) to control system audio output volume. // volumeView is `MPVolumeView` volumeView.showsRouteButton = false volumeView.backgroundColor = .clear addSubview(volumeView) volumeView.snp.makeConstraints { make in make.top.greaterThanOrEqualTo(self) make.bottom.lessThanOrEqualTo(self) make.centerY.equalToSuperview() make.leading.equalTo(volumeMuteImageView.snp.trailing).offset(6). make.trailing.equalTo(volumeHighImageView.snp.leading).offset(-15) make.height.equalTo(44) } What should we do? Thank you!
Topic: Media Technologies SubTopic: Audio Tags:
Mar ’26
Reply to Xcode 26 beta 3: StoreKit Testing broken
I just got this when running from Xcode 16.3, real device iOS 18.6.1 [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
Topic: App & System Services SubTopic: StoreKit Tags:
Aug ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
Thank you Kevin, Regarding Bugsnag initialization, we start it in applicationDidFinishlaunching on the main thread and given our launch times from Xcode organizer (around 1 second 90% and around 0.5 second 50%) and users never complaining of having long start times I don't see how it could take that much longer time than normally it does (sub 100ms). Regarding using notification to test the behavior, the idea is nice, but the slight problem is that it requires somebody closely watching the phone to quickly react to unpredictable background fetch event. I was testing it before and setting to the be triggered as quickly as possible, but usually it was hours of waiting for it to occur after backgrounding the app. Is there a way to force triggering it earlier? The only way I'm able to trigger background fetches (except when running the app via Xcode) is on my jailbroken device by attaching the debugger to DASDaemon and executing forceRunActivities however I think it won't work when the device is locked. We also never saw those early expirations during development or beta testing, they are not in large percentage, but the number of events is not small. It's that we just waste users and our server resources because of those quick expirations. Regarding the Does the system let you track issues by device, even though the device itself is anonymous? the data is very limited (e.g. language, app version, compiler version, thread stack trace), it's way less than in organizer crash logs. So before I close the thread, please confirm that those steps are correct: call scheduleAppRefresh() in applicationDidEnterBackground(_: UIApplication) call scheduleAppRefresh() in the handleAppRefresh directly like in the Apple's documentation and in the code snipped I provided. Lastly, is there a way to know if the app was launched due to the app refresh? If we know that we can avoid a lot of unnecessary initializations. Thank you!
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
I validated our app code again, it strictly follows Apple examples. I also validated the logic around scheduling the next fetch date, we already had unit tests around it to ensure it is always the date in the future (we aim for background fetches during the weekend). Regarding when we track the expiration handler it's the BGAppRefreshTask expiration handler. The app uses Bugsnag to track handled and unhandled errors and it shows the time of the event since when the Bugsnag was loaded (applicationDidFinishLaunching). This is how I can see that a very large number of expired tasks are under 5 seconds after the Bugsnag was loaded. We are not able to reproduce those expiration on our devices (or the QA devices) so there's no way to get sysdiagnose because our error tracking is fully anonymized and our app don't have accounts, we don't know which exact users are affected. @available(iOS 13.0, *) private func handleAppRefresh(task: BGAppRefreshTask) { scheduleAppRefresh() task.expirationHandler = { Tracker.trackErrorMessage("handleAppRefresh expirationHandler: \(task.identifier)") task.setTaskCompleted(success: false) } // Fetch sounds metadata. DataManager.shared.updateLibrary { _ in task.setTaskCompleted(success: true) } } How can I test the following: Test what happens if you unlock your phone immediately after your refresh task starts. I don't think this happens with refresh tasks, but we do expire processing tasks if the phone unlocks (processing tasks should only run when the device is idle). The easy way to test this case is to have you app post a local notification when it enters "handleAppRefresh" and the open the device as soon as you see that notification. Thank you.
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
I just went through Apple docs again. And I can see that the code matches the logic from https://developer.apple.com/documentation/uikit/using-background-tasks-to-update-your-app example. So now I'm again lost. The code from the documentation also schedules app refresh directly from handleAppRefresh like our app does. func handleAppRefresh(task: BGAppRefreshTask) { // Schedule a new refresh task. scheduleAppRefresh() // Create an operation that performs the main part of the background task. let operation = RefreshAppContentsOperation() // Provide the background task with an expiration handler that cancels the operation. task.expirationHandler = { operation.cancel() } // Inform the system that the background task is complete // when the operation completes. operation.completionBlock = { task.setTaskCompleted(success: !operation.isCancelled) } // Start the operation. operationQueue.addOperation(operation) } Is the documentation incorrect?
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
Thank you for the quick reply. The app schedules background fetch in func applicationDidEnterBackground(_: UIApplication). However I can see the code also re-schedules the background task in the launchHandler: @escaping (BGTask). I now think it should re-schedule the task in expiration handler or when the tasks is finished. I wonder now how it worked so far, because those errors started appearing recently, before they were very rare. Anyway thank you again for the reply it helped spotting the problem in the code.
Apr ’25
Reply to Xcode 26.4 productivity/UX regression.
OK, I figured out that I need to expand this pane and then it switches to icons. I don't love it because I always keep the left and right panes as narrow as possible. But at least I can more quickly access the features. I would love to see icons maybe as a grid, this selector is very unproductive.
Replies
Boosts
Views
Activity
2w
Reply to PHPhotosErrorDomain Code: 3302 started affecting my users recently.
Hi, as I mentioned I'm not able to reproduce it locally, I tried on all my available devices. so I don't have any error logs. I have NSPhotoLibraryAddUsageDescription and I reuse the same code in 3 of my production app that are on the marked for 9 and 10 years I never had those complaints until last month. My app also supports accessing user content (videos from Photos or Documents) they can load videos and reference them side-by-side with the recorded content. But it seems like a bug to me on the new version? I don't see anything that I changed. 2. It affects maybe 1% of users, and it works fine for 99% of users just fine. 3. In the analytics it appears there are no users affected by those error with Full Photos access, but I added those analytics just a couple days ago, before I wasn't tracking those errors. 4. I think I should be able to reproduce the error given how many times I already tried. However until recently I was still using Xcode 16.3 to deploy to AppStore because of supporting older iOS versions and I started using Xcode 26.3. Now that I think about it, maybe this is it? I think it started happening since I switched to Xcode 26.3 from Xcode 16. Two of my other apps that reuse the recording code and are in production are still deployed using older Xcode versions. This is what I'm seeing in Crashlytics log. error_domain: PHPhotosErrorDomain error_desc: The operation couldn’t be completed. (PHPhotosErrorDomain error 3302.) error_code: 3302
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
3w
Reply to Xcode 26 beta 3: StoreKit Testing broken
I'm unable to test or make purchases on simulators when using Xcode 26.4 :( I can see this in console: <SKPaymentQueue: 0x10b406310>: Error in remote proxy while checking server queue: Error Domain=SKInternalErrorDomain Code=12 "(null)"
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to How to hide route button `showsRouteButton = false` in `MPVolumeView` without deprecation warning?
Sorry, but for which control? Do you mean for the slider? AVRoutePickerView A view that presents a list of nearby media receivers. My question is about MPVolumeView . Sorry, but how do I wire up AVRoutePickerView with MPVolumeView, in the documentation there's no example. That documentation also doesn't say anything about controlling system volume, It only says about handling media receivers. Can you help me?
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Mar ’26
Reply to How to hide route button `showsRouteButton = false` in `MPVolumeView` without deprecation warning?
Thank you for a quick reply. We are using non-deprecated MPVolumeView (https://developer.apple.com/documentation/mediaplayer/mpvolumeview) to control system audio output volume. // volumeView is `MPVolumeView` volumeView.showsRouteButton = false volumeView.backgroundColor = .clear addSubview(volumeView) volumeView.snp.makeConstraints { make in make.top.greaterThanOrEqualTo(self) make.bottom.lessThanOrEqualTo(self) make.centerY.equalToSuperview() make.leading.equalTo(volumeMuteImageView.snp.trailing).offset(6). make.trailing.equalTo(volumeHighImageView.snp.leading).offset(-15) make.height.equalTo(44) } What should we do? Thank you!
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Mar ’26
Reply to Why is Xcode taking forever to install/launch app?
The same happens when using Xcode 16.x and Xcode 26.x. It's a shame. I have to run apps with debugger detached, but it's suboptimal.
Replies
Boosts
Views
Activity
Jan ’26
Reply to Connect Apple Watch to Xcode.
OK, It's working now, after restarting Mac mini, Xcode finally was able to see the watch.
Replies
Boosts
Views
Activity
Oct ’25
Reply to Xcode 26 beta 3: StoreKit Testing broken
I just got this when running from Xcode 16.3, real device iOS 18.6.1 [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) [9c592259_SK1] Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to Xcode 16.2, UITabBar, UITabBarItem badge is cut, iPadOS 18.0
This is happening on the simulator, iOS 18.0. It works fine on iPad Pro 12.9 inch (4th generation), iPad OS 18.4.1
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to Save MPEG-TS (h264 or HEVC) video stream using AVAssetWriter.
Thank you this worked!!! Amazing! I set a combination of: kCMSampleAttachmentKey_NotSync, kCMSampleBufferAttachmentKey_ForceKeyFrame and kCMSampleAttachmentKey_DependsOnOthers depending on key frame status and it works fine. It also solved broken/greenish thumbnails. I'm so happy:)
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
Thank you Kevin, Regarding Bugsnag initialization, we start it in applicationDidFinishlaunching on the main thread and given our launch times from Xcode organizer (around 1 second 90% and around 0.5 second 50%) and users never complaining of having long start times I don't see how it could take that much longer time than normally it does (sub 100ms). Regarding using notification to test the behavior, the idea is nice, but the slight problem is that it requires somebody closely watching the phone to quickly react to unpredictable background fetch event. I was testing it before and setting to the be triggered as quickly as possible, but usually it was hours of waiting for it to occur after backgrounding the app. Is there a way to force triggering it earlier? The only way I'm able to trigger background fetches (except when running the app via Xcode) is on my jailbroken device by attaching the debugger to DASDaemon and executing forceRunActivities however I think it won't work when the device is locked. We also never saw those early expirations during development or beta testing, they are not in large percentage, but the number of events is not small. It's that we just waste users and our server resources because of those quick expirations. Regarding the Does the system let you track issues by device, even though the device itself is anonymous? the data is very limited (e.g. language, app version, compiler version, thread stack trace), it's way less than in organizer crash logs. So before I close the thread, please confirm that those steps are correct: call scheduleAppRefresh() in applicationDidEnterBackground(_: UIApplication) call scheduleAppRefresh() in the handleAppRefresh directly like in the Apple's documentation and in the code snipped I provided. Lastly, is there a way to know if the app was launched due to the app refresh? If we know that we can avoid a lot of unnecessary initializations. Thank you!
Replies
Boosts
Views
Activity
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
I validated our app code again, it strictly follows Apple examples. I also validated the logic around scheduling the next fetch date, we already had unit tests around it to ensure it is always the date in the future (we aim for background fetches during the weekend). Regarding when we track the expiration handler it's the BGAppRefreshTask expiration handler. The app uses Bugsnag to track handled and unhandled errors and it shows the time of the event since when the Bugsnag was loaded (applicationDidFinishLaunching). This is how I can see that a very large number of expired tasks are under 5 seconds after the Bugsnag was loaded. We are not able to reproduce those expiration on our devices (or the QA devices) so there's no way to get sysdiagnose because our error tracking is fully anonymized and our app don't have accounts, we don't know which exact users are affected. @available(iOS 13.0, *) private func handleAppRefresh(task: BGAppRefreshTask) { scheduleAppRefresh() task.expirationHandler = { Tracker.trackErrorMessage("handleAppRefresh expirationHandler: \(task.identifier)") task.setTaskCompleted(success: false) } // Fetch sounds metadata. DataManager.shared.updateLibrary { _ in task.setTaskCompleted(success: true) } } How can I test the following: Test what happens if you unlock your phone immediately after your refresh task starts. I don't think this happens with refresh tasks, but we do expire processing tasks if the phone unlocks (processing tasks should only run when the device is idle). The easy way to test this case is to have you app post a local notification when it enters "handleAppRefresh" and the open the device as soon as you see that notification. Thank you.
Replies
Boosts
Views
Activity
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
I just went through Apple docs again. And I can see that the code matches the logic from https://developer.apple.com/documentation/uikit/using-background-tasks-to-update-your-app example. So now I'm again lost. The code from the documentation also schedules app refresh directly from handleAppRefresh like our app does. func handleAppRefresh(task: BGAppRefreshTask) { // Schedule a new refresh task. scheduleAppRefresh() // Create an operation that performs the main part of the background task. let operation = RefreshAppContentsOperation() // Provide the background task with an expiration handler that cancels the operation. task.expirationHandler = { operation.cancel() } // Inform the system that the background task is complete // when the operation completes. operation.completionBlock = { task.setTaskCompleted(success: !operation.isCancelled) } // Start the operation. operationQueue.addOperation(operation) } Is the documentation incorrect?
Replies
Boosts
Views
Activity
Apr ’25
Reply to BGAppRefreshTask expires after few seconds (2-5 seconds).
Thank you for the quick reply. The app schedules background fetch in func applicationDidEnterBackground(_: UIApplication). However I can see the code also re-schedules the background task in the launchHandler: @escaping (BGTask). I now think it should re-schedule the task in expiration handler or when the tasks is finished. I wonder now how it worked so far, because those errors started appearing recently, before they were very rare. Anyway thank you again for the reply it helped spotting the problem in the code.
Replies
Boosts
Views
Activity
Apr ’25
Reply to AVSampleBufferDisplayLayerContentLayer memory leaks.
@DTS Engineer Sorry, I haven't get notified about your reply. Here's link to the sample project that reproduced the issue. https://github.com/standinga/SampleBufferLeak
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Mar ’25