Cocoapods: Can't find the classes under 'Pods/Development Pods/MyLibrary/pod/Classes' in swift

Created on 13 Dec 2015  路  2Comments  路  Source: CocoaPods/CocoaPods

I am following http://guides.cocoapods.org/making/using-pod-lib-create guide to created my own swift library.

Briefly steps:

  1. pod lib create MyLibrary
  2. Answer the question with Yes,Swift etc. (Example project created)
  3. Created my own class ABXXXView to replace the default in 'Pods/Development Pods/MyLibrary/pod/Classes/ReplaceMe.swift'

Then i want to make an example in Example for MyLibrary in ViewController.swift, when i used the class ABXXXView under my own pods, i got the error Use of unresolved identifier 'ABXXXView'

   import MyLibrary
    class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        let vi = ABXXXView()
        self.view.addSubview(vi) 
    }
    }

Which means can't find "ABXXXView", but i have import MyLibrary, any hint? Thanks!
If i recreated a project with Objective C language, everything works fine.

awaiting input

Most helpful comment

Did you make ABXXXView public?

All 2 comments

Did you make ABXXXView public?

yeah, use public it works. thanks!

Was this page helpful?
0 / 5 - 0 ratings