4

I'm getting no such module KPClusteringController error when I'm trying to import the kingpin cocoapod into my swift project

https://github.com/itsbonczek/kingpin

my Sandbox-Bridging-Header.h

#import <kingpin/KPClusteringController.h>

my import statement in the view controller

import UIKit
import MapKit
import KPClusteringController
5
  • Where are you getting the 'no such module' error? Have you tried removing the import KPClusteringController line? If it works I can post it as an answer. Commented Mar 18, 2015 at 13:52
  • it wasn't reading the bridging header file because it didn't add it to the build settings, now that I have fixed that I get a new error - could not build module kingpin Commented Mar 18, 2015 at 14:02
  • now that I have fixed the kingpin build error now I get a no such module error on import KPClusteringController Commented Mar 18, 2015 at 14:11
  • Try deleting the import KPClusteringController line. If it works, let me know and i can post it as an answer. Commented Mar 18, 2015 at 14:12
  • 1
    I've changed it to import kingpin and now it works. Commented Mar 18, 2015 at 14:15

1 Answer 1

1

Could be one of a few things

  1. ensure you are using the project workspace

  2. Go to Target Build Settings and ensure the value for Objective-C Bridging Header is a path to your bridging header

  3. Ensure Your target build coniguration inherits from your Pods xcconfig

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

6 Comments

ok I manually added #2 and it now it gets a better error - could not build module kingpin
Double click your the area to the right of it and a white popover should appear, type the path to the file here it will be something like YOUR_PROJECT/Supporting Files/Sandbox-Bridging-Header.h
I dont think you need to import KPClusteringController as it is handled by the bridging header
if I remove the import it says use of unresolved identifier 'KPClusteringController'
After cleaning the build folders and derived data? I just checked my projects and ive never had to import a module thats injected by cocoa pods and bridging header. Did you import the bridging header at the target level not the project level?
|

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.