One of the two will be used. Which one is undefined

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

意思是ui

類PLBuildVersion在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices(0x11450e998)和/ Applications / Xcode中實現 .app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator.sdk / System / Library / PrivateFrameworks / PhotoLibraryServices.framework / PhotoLibraryServices(0x114333d38) 將使用二者之一。哪個是不肯定的。
類PLBuildVersion在二者中實現。
spa

在模擬器中、發現「One of the two will be used. Which one is undefined.」日誌3d

  查找資料發現緣由:objc runtime 對所用app使用同一個命名空間(flat namespace),運行機制以下:
  1. 首先二進制映像被加載,檢查程序依賴關係
  2. 每個二進制映像被加載的同時,程序的objc classes在objc runtime命名空間中註冊
  3. 若是具備相同名稱的類被再次加載,objc runtime的行爲是不可預知的。一種可能的狀況是任意一個程序的該類會被加載(這應該也是默認動做)