0

I am creating my own custom library and I want to implement a QR Code Reader in it.

My plan was to add a QR Code reader cocoapod to my library, but I am struggling to do that.

Any tips?

1
  • 1
    why need to add extra dependencies? you can easily create QR code scanner using AVFoundation no need to add in a cocoa pod. Commented Mar 5, 2019 at 5:31

1 Answer 1

4

You can certainly do this. You add the other pod as a dependency of your own pod in the podspec file.

e.g. spec.dependency 'MyQRCodeReaderPod', '~> 1.0'

Here's the official guide: https://guides.cocoapods.org/syntax/podspec.html#dependency

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

3 Comments

That makes sense. Now that its in my podspec file though, do I have to import it? I cannot seem to utilize it in my code.
You'll probably need to do a pod install to make sure all dependencies of your pod are installed.
@CalebRudnicki you will need to import the other pod into your current pod where you want to use it

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.