本文介绍了PLBuildVersion 类在两个框架中都实现了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS 10/Xcode 8 GM 版本获得以下版本,之前从未在 Xcode 7 上使用过.有任何想法吗?

iOS 10 / Xcode 8 GM build getting the below, never had it before on Xcode 7. Any ideas?

objc[25161]:PLBuildVersion 类在两者中都实现/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices(0x12049a910) 和/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices(0x1202c4210).将使用两者之一.哪个是未定义的.

(注意:似乎只在模拟器中出现,在真机上没有出现).

(NOTE: Only seems to happen in simulator, does not appear on real device).

推荐答案

主要思想

主要思想很简单:

Main Idea

Main idea is simple:

如果您的应用程序(或依赖项,例如 Pods)使用框架,该框架使用显式(或隐式)PhotoLibraryServices.frameworkAssetsLibraryServices.framework 作为依赖项,Xcode 会发出警告你(即使你只使用其中之一).它可能是 Photos/PhotosUI.frameworkAssetsLibrary.framework 或其他(我没有完整的依赖项列表,但有可能).

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).

名称为 PLBuildVersion 的类在 PhotoLibraryServices.frameworkAssetsLibraryServices.framework 中定义.类名在 Objective-C 中是唯一的(你不能定义两个同名的类),所以在运行时使用哪一个是不确定的.

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.

雷达已经发送.

这篇关于PLBuildVersion 类在两个框架中都实现了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 14:41