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).
xcode ios10 xcode8 share improve this question edited Sep 19 '16 at 0:04 Roman Ermolov 4,835 2 15 29 asked Sep 15 '16 at 21:16 FlatDog 797 2 5 12 1 Are you using Fabric or other Twitter 3rd library in your project? – Kevin Sep 19 '16 at 8:53 I have the same error in the release version and yes, i'm using Fabric in my project. @noellee – Zac Sep 19 '16 at 9:32 Have the same problem, not using Twitter or Fabric. Interestingly, when I search for PLBuildVersion in the project (Find>Text>Containing) I get no result! No file, no import, no comment, nothing! – turingtested Sep 25 '16 at 14:25 The warning disappeared after I commented this PHAsset.fetchAssetsWithALAssetURLs out. I guess the bug is on Apple's side. – 0101 Sep 26 '16 at 11:43 2 Im not using twitter. maybe Firebase can cause this too? – Yitschak Sep 26 '16 at 18:53 1 @noellee like Zac I am using fabric in my project and I also have the same error – user1019042 Sep 27 '16 at 20:29 1 @Yitschak i use firebase and got this too. – n3wbie Sep 28 '16 at 16:31 @user1019042 , yes me too, same issue here. – Kevin Oct 1 '16 at 15:11 1 yes, I'm using Fabric and Crashlytics (v3.8.2) – FlatDog Oct 2 '16 at 22:34 add a commentMain 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).
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.
share improve this answer edited Feb 7 at 15:13 NSNoob 3,474 5 20 45 answered Sep 19 '16 at 21:18 Roman Ermolov 4,835 2 15 29 Any update on Radar? – Kevin Oct 16 '16 at 9:01 @Kevin not yet. – Roman Ermolov Oct 17 '16 at 11:12 5 My App is crashing at this Point, Please Help !!! – Anand Oct 21 '16 at 11:14 3 Still an issue for me in Xcode 8.1 – Clifton Labrum Nov 2 '16 at 21:09 Same problem here with xCode 8,1 – Loc Pham Nov 5 '16 at 4:37 2 the warning message are still there. – Faiz Fareed Nov 7 '16 at 19:40 5 I found that if I use Webview in one VC, I got this type of warning message in debug window when the VC is shown. I use Xcode 8.1, swift 3. – David.Chu.ca Nov 9 '16 at 22:19 Just got this issue with Xcode 8.1, was working yesterday before update :/ – mortond Nov 17 '16 at 0:09 So is that a bug about linker? – Itachi Nov 22 '16 at 3:29 Still an issue in Xcode 8.2. Only when the webview is used. – Andr3s4n Jan 3 at 13:46 3 Any updates on this issue? It's been months already... – user805981 Jan 5 at 18:53 add a comment up vote 31 down voteI 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
share improve this answer answered Sep 28 '16 at 23:11 Nick Meehan 352 2 6 This fixed it for me – TerryS Sep 30 '16 at 11:54 21 The warning messages are still there. – Kevin Oct 1 '16 at 15:13 2 my app doesn't use the camera at all and I get the message. Still, I tried adding these to plist as you suggested and that still didn't solve it.. – FlatDog Oct 2 '16 at 22:36 Warning is not gone but app is working now – wm.p1us Oct 4 '16 at 4:23 For me it also fixed it. Thank you very much :-) – user1895268 Oct 16 '16 at 14:51 Added this But still App is crashing – Anand Oct 21 '16 at 11:51 3 Anybody figure this out? I am not using photo library nor am i using camera, however I still get the warning and the crash – MikeG Oct 24 '16 at 17:39 2 @MikeG I am also not using either library and still getting the crash, I got rid of the warnings by adding the key/string config details to the info.plist file. Apparently its needed in IOS 10.x – mortond Nov 17 '16 at 0:11 I've got this warning after setting textView.attributedText to NSAttributedString – mik.ro Dec 16 '16 at 11:45 It does not work for me. Still keep crashing. – Michael Yang Dec 28 '16 at 1:02 is it safe to ignore this warning? – Cmag Jan 11 at 2:36 add a comment up vote 21 down voteAs 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.
share improve this answer answered Nov 3 '16 at 6:21 Raphael Oliveira 4,391 2 34 48 add a comment up vote 3 down voteI find you can get this error merely by using a UIWebView. My solution was to replace my use of UIWebView with WKWebView.
share improve this answer answered Nov 9 '16 at 18:37 matt 232k 32 365 511 I tried WKWebView but the warning is still appearing – muz the axe Dec 15 '16 at 4:11 add a comment up vote 1 down voteI had this after adding Answers on Fabric to my project.
Deleting derived data did the trick for me. (shift alt command k in XCode)
share improve this answer answered Nov 19 '16 at 20:39 Gerd Castan 2,302 1 11 37 Did not work for me. – Mikrasya Mar 6 at 7:12 warning is still there BUT app is not crashing anymore.I am using xcode8.2.1 – Dashrath 2 days ago add a comment up vote -3 down voteFor 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> share improve this answer answered Dec 15 '16 at 7:35 Pankaj Bhardwaj 326 2 13 Your answer didn't solve the problem. – ayteq Dec 29 '16 at 16:20 add a commentThank 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?