Class PLBuildVersion is implemented in both frameworks Class PLBuildVersion is implemented in both frameworks xcode xcode

Class PLBuildVersion is implemented in both frameworks


Main Idea

Main idea is simple:

If your app (or dependencies, such as Pods) uses framework, that uses explicit (or implicit) PhotoLibraryServices.framework or AssetsLibraryServices.framework as dependency, Xcode warns you (even if you are using only one of them). It might be Photos/PhotosUI.framework or AssetsLibrary.framework, or another (I don't have full list of dependencies, but it is possible).

What is the problem?

Class with name PLBuildVersion is defined in both PhotoLibraryServices.framework and AssetsLibraryServices.framework. Class name is unique in Objective-C (you can't define 2 classes with same name), so it is undefined which one will be used in runtime.

However, I think that it will not be a problem, because both classes have same methods and fields (checked this with disassembler) and I guess that both were compiled from the same source.

Radar is already sent.


As per answer from Apple employee on Apple's Developer Forum:

You don't control either of the class sources listed, so there isn't anything you can or should do – aside from Reporting a Bug.


I was unable to find a way to get rid of the warning, but if you want to prevent the app from crashing, you need to provide a description for why you are accessing the camera, photo library, etc. This is new in iOS10.

Input the following into your Info.plist file.

Photo

Key: Privacy - Photo Library Usage DescriptionValue: $(PRODUCT_NAME) photo use

Camera

Key: Privacy - Camera Usage DescriptionValue: $(PRODUCT_NAME) camera use

More info can be found here: https://iosdevcenters.blogspot.com/2016/09/infoplist-privacy-settings-in-ios-10.html