0

I was just about to test my app on a device when I ran into this problem, I'm getting this Linker Error. I've already checked all my compile sources and Build Phases, but there's no sign of my importing things twice.

ld: duplicate symbol _calculateNextSearchPage in /Users/wouter/Sites/test/FastPdfKit.embeddedframework/FastPdfKit.framework/FastPdfKit(FastPdfKit) and /Users/wouter/Sites/test/FastPdfKit.embeddedframework/FastPdfKit.framework/FastPdfKit(FastPdfKit) for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

This only happens when testing on a device, not in the simulator.

2 Answers 2

2

Alright guys I had the same problem. Seems like I fixed it. I am using cocapods therefor the described standard procedure can not be properly executed.

Steps to do to properly add FastPDFKit with Cocoapods.

  • Download FastPDFKit
  • In your project Add Files to "Your Project"
  • go to FastPDFKit folder you just have downloaded
  • locate 1 folder and 1 project file. Press and hold Command key and add these in to your project
  • FastPdfKit.xcodeproj
  • FastPdfKit.embeddedframework

enter image description here

(Note: FastPdfKit.embeddedframework is the actual Framework and you might want to open FastPdfKit.xcodeproj standalone before adding it to your project, delete FastPdfKit.embeddedframework folder from your disk and Build FastPdfKit target in the project. You should see newly created FastPdfKit.embeddedframework folder)

  • Go to your Project Settings > Your target > Build Phases > Link Binary with Libraries
  • Make sure FastPdfKit.framework is there.
  • If not, drag it from the project and put it there.
  • Clean the project, delete derived data
  • Add #import <FastPdfKit/FastPdfKit.h> where you need it and you are good to go.
  • Here is how my Link Binary with Libraries look like

    enter image description here

Please let me know if you have any troubles I might've missed something.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot. worked perfectly. The only thing i was struggling was that i didn't add all frameworks needed for fastpdfkit.
1

Try to delete duplicate files/images which are in target-> Build phase -> Compile files, Copy bundle resources

1 Comment

That's the problem, there are no duplicate files or images, already checked that multiple times.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.