hyperoslo / Lightbox

:milky_way: A convenient and easy to use image viewer for your iOS app
https://www.hyper.no
Other
1.62k stars 326 forks source link

Multiple classes implemented twice, causing runtime warning #252

Closed yspreen closed 4 years ago

yspreen commented 4 years ago
objc[2917]: Class _TtC5Cache14DataSerializer is implemented in both /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Imaginary.framework/Imaginary (0x10b74f4c0) and /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Cache.framework/Cache (0x10b356ed0). One of the two will be used. Which one is undefined.
objc[2917]: Class _TtC5Cache18TransformerFactory is implemented in both /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Imaginary.framework/Imaginary (0x10b74f990) and /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Cache.framework/Cache (0x10b357388). One of the two will be used. Which one is undefined.
objc[2917]: Class _TtC5Cache16ObservationToken is implemented in both /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Imaginary.framework/Imaginary (0x10b74f7d8) and /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Cache.framework/Cache (0x10b3575d0). One of the two will be used. Which one is undefined.
objc[2917]: Class _TtC5Cache13MemoryCapsule is implemented in both /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Imaginary.framework/Imaginary (0x10b74e6f0) and /Users/user/Library/Developer/CoreSimulator/Devices/05ED95FA-218A-4F9C-9052-237EFB091D8C/data/Containers/Bundle/Application/ABD2DD0C-A269-479C-AEA7-C55E5622E82E/App.app/Frameworks/Cache.framework/Cache (0x10b3566b0). One of the two will be used. Which one is undefined.

I'm not sure how to solve this... I'm using Carthage. When I don't link to either the Imaginary or Cache libraries, Lightbox doesn't install and causes a missing image error.

3lvis commented 4 years ago

I think the problem here could be a circular dependency reference going on. Lightbox pointing to Imaginary and Cache and Imaginary pointing to Cache.

yspreen commented 4 years ago

@3lvis good point. Hm. Maybe the dependency of Cache isn't required. I could try creating a PR.

3lvis commented 4 years ago

Thank would be really nice, thank you!

yspreen commented 4 years ago

Okay, this is confusing...

In the Xcode project for Lightbox only Imaginary is included as a library and embedded in the demo project too. Cache doesn't even show up. Yet, when you try to remove it from the Cartfile, it's missing as a dependency for Imaginary, and the project won't build. In the end, I solved the problem on my end by removing Cache from Xcode's libraries in my project. I still have it in my Carthage builds, just like the Lightbox project itself. The fact that Lightbox and Imaginary, but not Cache, should be embedded in your Xcode project might be useful as a piece of information in the Readme.

3lvis commented 4 years ago

That's odd...