I'm working on an app where a user needs to select a video from their Photos library, and I need to get the original, unmodified HEVC (H.265) data stream to preserve its encoding.
The Problem
I have confirmed that my source videos are HEVC. I can record a new video with my iPhone 15 Pro Max camera set to "High Efficiency," export the "Unmodified Original" from Photos on my Mac, and verify that the codec is MPEG-H Part2/HEVC (H.265).
However, when I select that exact same video in my app using PHPickerViewController, the itemProvider does not list public.hevc as an available type identifier. This forces me to fall back to a generic movie type, which results in the system providing me with a transcoded H.264 version of the video.
Here is the debug output from my app after selecting a known HEVC video:
⚠️ 'public.hevc' not found. Falling back to generic movie type (likely H.264).
What I've Tried
My code explicitly checks for the public.hevc identifier in the registeredTypeIdentifiers array. Since it's not found, my HEVC-specific logic is never triggered.
Here is a minimal version of my PHPickerViewControllerDelegate implementation:
import UniformTypeIdentifiers
// ... inside the Coordinator class ...
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
picker.dismiss(animated: true)
guard let result = results.first else { return }
let itemProvider = result.itemProvider
let hevcIdentifier = "public.hevc"
let identifiers = itemProvider.registeredTypeIdentifiers
print("Available formats from itemProvider: \(identifiers)")
if identifiers.contains(hevcIdentifier) {
print("✅ HEVC format found, requesting raw data...")
itemProvider.loadDataRepresentation(forTypeIdentifier: hevcIdentifier) { (data, error) in
// ... process H.265 data ...
}
} else {
print("⚠️ 'public.hevc' not found. Falling back to generic movie type (likely H.264).")
itemProvider.loadFileRepresentation(forTypeIdentifier: UTType.movie.identifier) { url, error in
// ... process H.264 fallback ...
}
}
}
My Environment
Device: iPhone 15 Pro Max
iOS Version: iOS 18.5
Xcode Version: 16.2
My Questions
Are there specific conditions (e.g., the video being HDR/Dolby Vision, Cinematic, or stored in iCloud) under which PHPickerViewController's itemProvider would intentionally not offer the public.hevc type identifier, even for an HEVC video?
What is the definitive, recommended API sequence to guarantee that I receive the original, unmodified data stream for a video asset, ensuring that no transcoding to H.264 occurs during the process?
Any insight into why public.hevc might be missing from the registeredTypeIdentifiers for a known HEVC asset would be greatly appreciated. Thank you.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have written an App which extracts data, over WiFi, from an instrument that creates its own WiFi Hotspot.
The instrument provides no internet connection. The iPad version of this App is connects fine and is assigned an IP address by DHCP server running on a MicroChip RN171 wifi module.
iOS assigns an obscure IP address on a completely different subnet. I understand this is iOS' way of "Complaining" that is wasn't assigned an IP address.
Consequently in the case of the iPhone I am forced to manually assign an IP address for the iPhone, the mask and the gateway. Only then is the connection successful.
Anyone know why the iPhone won't talk DHCP to a WiFi module not connected to the internet? Are there perhaps some parameters that I need to adjust on either the iPhone or WiFi module?
I have just started using Create ML and discovered it to be unstable and obviously not fully tested.
I created object training data using IBM Cloud Annotation which imported fine and create a model. I then gave Create ML testing data.
However then, in error, I renamed the directory containing the test data. Create ML then entered into, what appears to-be, a loop continuously flashing up a dialogue saying Test Data "Data Source Missing" and there appears to be no way to exist this state other than by closing Create ML. No whenever I open Create ML and navigate to Evaluation > Testing the "Data Source Missing" dialogue starts flashing.
So I now have a Create ML project that appears useless. For this project there is no way to choose test data!
Any ideas?
I should probably raise a bug report.
I have simple iOS App running on an iPad using Network.Framework, NWConnection and NWEndpoint to setup a TCP connection to a Microchip RN-171. It all worked fine until iOS 14 when I started to occasionally get this error:
[tcp] nw_proto_tcp_route_init [C1.1:1] no mtu received
at which point the connection just locks up with no further data flow in either direction is possible with respect to iOS.
Looking at the RN-171 data sheet I see that the default value for mtu is 1524 so I am assuming that during the negotiation between the RN-171 and iOS this value should be set and some change in iOS 14 means that this value doesn't always get to iOS.
Any ideas what the root cause might be and how to fix it?
Having read several posts on MetricKit and I'm very confused!
I understand that:
didReceive(_ payloads: [MXMetricPayload])
gets called with payloads containing performance data.
However as a developer do I need todo anything with this data or can I just leave it up-to Apple for processing? How does this data find its way to Apples servers for download to Xcode organiser?
There is obviously a big bit of the story that I am missing!
Appologies if not using the correct forum for this question? however it is closest I could find.have been disappointed with the lack of Apple documention supporting serial port programming. The best I've found is thiswebsite. Are there recommend swift libraries/frameworks for interacting with serial devices via USB? perhaps with some examples.Hopefully