在两个框架中都实现了PLBuildVersion类 [英] Class PLBuildVersion is implemented in both frameworks

查看:57
本文介绍了在两个框架中都实现了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).将使用两者之一.哪个是未定义的.

objc[25161]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x12049a910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x1202c4210). One of the two will be used. Which one is undefined.

(注意:似乎只发生在模拟器中,没有出现在真实设备上).

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

推荐答案

主要思想

主要思想很简单:

Main Idea

Main idea is simple:

如果您的应用程序(或依赖项,例如Pods)使用框架,而该框架使用显式(或隐式) PhotoLibraryServices.framework AssetsLibraryServices.framework 作为依赖项,则Xcode警告您(即使您仅使用其中之一).可能是 Photos/PhotosUI.framework AssetsLibrary.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).

类.类名称在Objective-C中是唯一的(您不能定义2个具有相同名称的类),因此未定义在运行时将使用哪个类.

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类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆