PINRemoteImage icon indicating copy to clipboard operation
PINRemoteImage copied to clipboard

xcode 8.3.x won't build PINRemoteImage with FLAnimatedImage

Open jonathanduty opened this issue 9 years ago • 6 comments

Hi There, We are including PINRemoteImage using cocoapods.
things work fine in xcode 8.2.x. However, when upgrading to xcode 8.3 and 8.3.1 I get the followng build error when building with FLAnimatedImage included:

/Users/jonathanduty/Development/arcivr/ceremony-ios/Pods/FLAnimatedImage/FLAnimatedImage/FLAnimatedImage.h:71:12: Duplicate definition of category 'Logging' on interface 'FLAnimatedImage'

/Users/jonathanduty/Development/arcivr/ceremony-ios/Pods/PINRemoteImage/Pod/Classes/PINRemoteImageManagerResult.h:19:2: In module 'FLAnimatedImage' imported from /Users/jonathanduty/Library/Developer/Xcode/DerivedData/Ceremony-gncdaompymwavtbxxgskhwmdiagc/Build/Products/Debug-iphonesimulator/PINRemoteImage/PINRemoteImage.framework/Headers/PINRemoteImageManagerResult.h:19:

I've verified that downgrading to xcode 8.2 still builds correctly. Here is my podfile.lock Podfile.lock.zip

jonathanduty avatar Apr 20 '17 14:04 jonathanduty

@jonathanduty are you using the latest beta of PINRemoteImage? Can you upload a sample project somewhere?

garrettmoon avatar May 03 '17 23:05 garrettmoon

hi @garrettmoon thanks for the reply. We are on version:

  • PINRemoteImage (~> 2.1.4)
  • FLAnimatedImage (~> 1.0)

PINRemoteImage: 4ac4011c5caefd6befd99758e09becede05d3226 FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31

jonathanduty avatar May 04 '17 04:05 jonathanduty

@jonathanduty I just tried modifying the Example project in the repo to:

xcodeproj 'PINRemoteImage.xcodeproj'

def shared_pods
  pod "PINRemoteImage", '~> 2.1.4'
  pod "FLAnimatedImage", '~> 1.0'
end

target 'PINRemoteImage' do
  shared_pods
end

And was able to build fine. Can you upload a sample project that reproduces the issue?

garrettmoon avatar May 04 '17 17:05 garrettmoon

I generated a new project and it builds ok. I even added all the pods we are using from my old project and it still works. Looking at the projects side-by-side I noticed that the project that builds does not have the "Framework Search Paths" variable in the build settings. Could this be it?
ceremony_xcodeproj

jonathanduty avatar May 09 '17 10:05 jonathanduty

Ok, I figured it out. I needed to remove all direct imports in our code #import "FLAnimatedImage.h"

We were using FLAnimatedImage directly in some places. So change all places where we had this:

#import "FLAnimatedImage.h" #import "PINImageView+PINRemoteImage.h"

to this

#import "PINImageView+PINRemoteImage.h"

And it builds.

An interesting note is this only happens in Code 8.3 and above. XCode 8.2 builds just fine with both of those files imported.

jonathanduty avatar May 09 '17 11:05 jonathanduty

Super weird! Glad you figured it out!

garrettmoon avatar May 11 '17 00:05 garrettmoon