pinterest / PINRemoteImage

A thread safe, performant, feature rich image fetcher
Apache License 2.0
4.01k stars 511 forks source link

Improve installation instructions #363

Closed AndrewSB closed 7 years ago

AndrewSB commented 7 years ago

Hey! I'm having a little trouble integrating with beta 9 (upgrading from a much older version, so it may not be a beta 9 specific issue).

Currently, Carthage is telling me the PINRemoteImage wants these things:

*** Checking out libwebp at "v0.5.1"
*** Checking out PINOperation at "1.0.3"
*** Downloading PINCache.framework binary at "3.0.1 Beta 4"
*** Downloading PINRemoteImage.framework binary at "Beta 9: Support for resuming downloads, faster operation queue"
*** xcodebuild output can be found in /var/folders/dz/30qkdl_13rb525_f_d70g3mr0000gn/T/carthage-xcodebuild.RL1rde.log
*** Building scheme "PINOperation" in PINOperation.xcodeproj
*** Building scheme "iOS" in PINCache.xcodeproj
*** Building scheme "PINRemoteImage" in PINRemoteImage.xcodeproj

I've integrated all 3 frameworks into my target (added to linked libraries & carthage copy-frameworks), but I'm getting a runtime error on launch, saying

dyld: Symbol not found: _PINDiskCachePrefix
  Referenced from: /Users/asb/Library/Developer/CoreSimulator/Devices/77E331CB-1C32-45DF-A704-0F665702520E/data/Containers/Bundle/Application/8FD99541-2F2F-4C63-A5BE-BAC7071F2965/wrytr.app/Frameworks/PINRemoteImage.framework/PINRemoteImage
  Expected in: /Users/asb/Library/Developer/CoreSimulator/Devices/77E331CB-1C32-45DF-A704-0F665702520E/data/Containers/Bundle/Application/8FD99541-2F2F-4C63-A5BE-BAC7071F2965/wrytr.app/Frameworks/PINCache.framework/PINCache
 in /Users/asb/Library/Developer/CoreSimulator/Devices/77E331CB-1C32-45DF-A704-0F665702520E/data/Containers/Bundle/Application/8FD99541-2F2F-4C63-A5BE-BAC7071F2965/wrytr.app/Frameworks/PINRemoteImage.framework/PINRemoteImage

and I'm not sure where it's coming from. Also, do I need to do anything with libwebp, or is that handled for me? Any ideas why dyld cant find _PINDiskCachePrefix? I grepped and found the symbol PINCache, but I'm (almost completely) sure I've integrated PINCache correctly, so I'm not sure where the complaint is coming from.

garrettmoon commented 7 years ago

libwebp is linked into PINRemoteImage automatically if you're using carthage.

I'm not sure why you're getting a runtime error, can you upload a sample project?

AndrewSB commented 7 years ago

Yup! I'll try to repro today On Wed, May 24, 2017 at 10:26 AM Garrett Moon notifications@github.com wrote:

libwebp is linked into PINRemoteImage automatically if you're using carthage.

I'm not sure why you're getting a runtime error, can you upload a sample project?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pinterest/PINRemoteImage/issues/363#issuecomment-303794163, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo1dJsngihxknfcyAqt2vHn3LgygJJtks5r9Gg5gaJpZM4NkcTK .

AndrewSB commented 7 years ago

Hmm, so it seems like my Carthage setup is just super weird for the one project I'm working on. Anytime I run carthage update, it fails, but if I run carthage build --no-skip-current from inside pinterest/PINRemoteImage, and drag those binaries over to my project's Carthage/Build/iOS, it works for me.

The only difference is that when I build pinterest/PINRemoteImage I'm building the head, instead of 3.0.0-beta.9 in my project. I'll try with pinterest/PINRemoteImage master soon

garrettmoon commented 7 years ago

Ok, I'm going to close this for now, but report back and I'll re-open if necessary.

robinhayward commented 7 years ago

I have this issue also: dyld: Symbol not found: _PINDiskCachePrefix

I have included PINCache, PINOperation and PINRemoteImage correctly as normal too, a fresh checkout of my app and running carthage update gives me that missing symbol error when trying to run the app.

AndrewSB commented 7 years ago

My fix was to clone PINRemoteImage and do a carthage build --no-skip.... Then drag the built stuff into my project

Good to see that this wasn't just a my-machine sort of problem, I feel as if there's some weirdness with the exact checkout versions being built On Thu, Jun 22, 2017 at 1:40 AM Robin Hayward notifications@github.com wrote:

I have this issue also: dyld: Symbol not found: _PINDiskCachePrefix

I have included PINCache, PINOperation and PINRemoteImage correctly as normal too, a fresh checkout of my app and running carthage update gives me that missing symbol error when trying to run the app.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pinterest/PINRemoteImage/issues/363#issuecomment-310315474, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo1dKUE5CUqG1bL7u_jOx2pI28WuW-5ks5sGih8gaJpZM4NkcTK .

robinhayward commented 7 years ago

Yea thanks very much for sharing, that did also work for me.

Related: PINRemoteImage is still awesome :)

AndrewSB commented 7 years ago

PINRemoteImage is definitely still awesome