Getting PNG images from PHPicker currently broken in 15.1 beta

After a user complained that they could no longer load partially transparent PNG images in my photo compositing app, I eventually tracked this down to a bug in iOS 15.1 (tested on beta 2).

When the user selects a PNG image in the PHPickerViewController, the returned NSItemProvider reports having a file for the "public.png" UTI (and only that one).

However when requesting data for that UTI, the system actually returns JPEG image data instead.

Just a heads up to other developers who might run into this.

Hopefully it will get fixed before 15.1 ships. I reported it as FB9665280.

Answered by Engineer in 694567022

Update: the issue is fixed in latest iOS 15.2 beta.


Thanks for the feedback. We have received FB9665280 and we will share updates through FB9665280 in the future.

Thanks for the heads up. The bug is still present in iOS 15.1 beta 4. Any idea for a workaround?

This bug isn't fixed in the 15.1 RC, and there doesn't seem to be a workaround. This breaks essential functionality in my app. Oof. I don't look forward to the upcoming support requests and angry customer reviews in the App Store.

Yes, it is really unfortunate that it looks like this bug is going to ship in 15.1.

I just confirmed that it is possible to work around this by getting the corresponding PHAsset via the assetIdentifier and then using the PHAssetResourceManager to request the PNG image data. Of course this requires asking for read access permission to the photo library, and dealing with all the complexities that come along with that.

Thanks for the feedback. We have received FB9665280 and we will share updates through FB9665280 in the future.

Thank you for acknowledging the issue. I assume at this point it is a given though that this bug will ship in 15.1 to the public on Monday, right?

It looks like this issue is fixed in iOS 15.2 beta 2.

Update: the issue is fixed in latest iOS 15.2 beta.


Thanks for the feedback. We have received FB9665280 and we will share updates through FB9665280 in the future.

Getting PNG images from PHPicker currently broken in 15.1 beta
 
 
Q