Creating pod, use of undeclared type for my pod classes

Viewed 5825

I'm creating a pod in swift to use with cocoapods, but I'm having a strange problem when trying to use it. My pod is downloaded normally after 'pod install' and I can import it via 'import MyPod'. So far so good, but when I try to access my classes in the pod, I get the message

 "Use of undeclared type 'NameOfTheClassIwantToUse'".

If i go to my pod folder in Pods project, all the files are there, but I cannot use it. I also noticed when I go into the import 'MyPod' with command+click I can see just few imports instead of all my classes, like:

import MyPodProjectName
import MyPodProjectName.Swift
import Foundation
import UIKit

public var MyPodProjectNameVersionNumber: Double

While other imports has all the classes that are supposed to be available upon importing.

Does anyone has a clue on what am I missing here?

2 Answers

Yes you need to declare your class, methods and relevant variables as public and don't forget to import your module on top of the class you need.

Related