Class PLBuildVersion is implemented in both frameworks(stackoverflow的 快照)
来源:互联网 发布:王千源 知乎 编辑:程序博客网 时间:2024/06/06 03:22
iOS 10 / Xcode 8 GM build getting the below, never had it before on Xcode 7. Any ideas?
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).
6 Answers
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.
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 Description
Value: $(PRODUCT_NAME) photo use
Camera
Key: Privacy - Camera Usage Description
Value: $(PRODUCT_NAME) camera use
More info can be found here: https://iosdevcenters.blogspot.com/2016/09/infoplist-privacy-settings-in-ios-10.html
info.plist
file. Apparently its needed in IOS 10.x – mortond Nov 17 '16 at 0:11 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 find you can get this error merely by using a UIWebView. My solution was to replace my use of UIWebView with WKWebView.
I had this after adding Answers on Fabric to my project.
Deleting derived data did the trick for me. (shift alt command k in XCode)
For iOS 10 you have to add these key's and value into you info.plist to avoid this issue.
<key>NSPhotoLibraryUsageDescription</key><string>$(PRODUCT_NAME) photo use</string><key>NSCameraUsageDescription</key><string>$(PRODUCT_NAME) camera use</string>
protected by iwasrobbed Sep 20 '16 at 18:19
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged xcode ios10 xcode8 or ask your own question.
- Class PLBuildVersion is implemented in both frameworks(stackoverflow的 快照)
- Class PLBuildVersion is implemented in both frameworks
- Xcode8使用出现 Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer…
- Xcode8 Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platfo
- Xcode8使用出现 Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/P
- Class PLBuildVersion is implemented in both. One of the two will be used. Which one is undefined.
- Class _NSZombie_xxxxxxx is implemented in both ?? and?
- objc[2163]: Class JavaLaunchHelper is implemented in both XXX
- Mac 上 Class JavaLaunchHelper is implemented in both 报错
- Mac 上 Class JavaLaunchHelper is implemented in both 报错
- idea 启动Class JavaLaunchHelper is implemented in both 。。。
- objc[8715]: Class JavaLaunchHelper is implemented in both...
- Mac 上 Class JavaLaunchHelper is implemented in both 报错
- objc[8715]: Class JavaLaunchHelper is implemented in both....
- Mac 上 Class JavaLaunchHelper is implemented in both 报错
- Mac上Class JavaLaunchHelper is implemented in both报错
- objc[2213]: Class _NSZombie_BSXPCMessage is implemented in both ?? and ??. One of the two will be us
- objc[2213]: Class _NSZombie_BSXPCMessage is implemented in both ?? and ??. One of the two will be us
- Hdu 3065 病毒侵袭持续中(AC自动机)
- 学习基于Koa2、Mongodb、jade的博客开发
- ButterKnife及插件使用教程
- DOM4j解析xml文件
- 数据结构
- Class PLBuildVersion is implemented in both frameworks(stackoverflow的 快照)
- AdminEAP框架数据列表render的五种方式
- 使用jquery 给table绑定jqgrid 出现的bug
- 计算机网络(一)数据链路层
- IE8下js对于replace()兼容性问题
- nodejs之get/post请求的几种方式
- Ubuntu16.04下使用sublime text3搭建Python IDE && 安装scikit-learn
- Spark2.1集群搭建
- android.content.res.Resources$NotFoundException: String resource ID #0x0
PHAsset.fetchAssetsWithALAssetURLs
out. I guess the bug is on Apple's side. – 0101 Sep 26 '16 at 11:43