4

enter image description hereI am new to iOS Swift and trying to install this framework.

I have installed this framework by cocoa pods and add this line in app delegate

import IQKeyboardManagerSwift & IQKeyboardManager.sharedManager().enable = true

I am now getting this error (

No such Module IQKeyboardManagerSwift)

Can anyone please help me?

Gaurav
  • 97
  • 3
  • 9

5 Answers5

6

Sometimes, when I install a new Pod, I need to clean & build the project.

Clean build folder: Alt+Shift+Cmd+K
Build: Cmd+B
Run: Cmd+R

Hope it helps

Adam Studenic
  • 2,115
  • 2
  • 25
  • 22
4

First check the swift and Xcode version that you are using and if that version support the pod file you are using

Swift 2.2 (Xcode 7.3) Use:-

pod 'IQKeyboardManagerSwift'

Or

pod 'IQKeyboardManagerSwift', '4.0.3'

For Swift 2.1.1 (Xcode 7.2) Use :-

pod 'IQKeyboardManagerSwift', '4.0.0'

For Swift 2.0 (Xcode 7.0) Use :-

pod 'IQKeyboardManagerSwift', '3.3.3.1'

I had similar problem , turns out i had two Cocoapods instances installed, This is a Cocoapods issue not an Xcode one (in my case it was').

All i needed to do was uninstall my cocoapod and reinstall it https://stackoverflow.com/a/27940867/6297658...... This worked for me...

Once you are done reinstalling go to your pod file add pods according to the version of swift and Xcode you are using and then run pod install

PS: Cocoapods REPO is nearly 350MB, so if your download is stuck don't just quit Terminal and start reinstalling again first uninstall Cocoapods and old master repo both completely, then start installing again ... this is probably what caused two instances of it in my case

Community
  • 1
  • 1
Dravidian
  • 9,945
  • 3
  • 34
  • 74
1

First of you should replace

IQKeyboardManager.sharedManager().enable = true

By

IQKeyboardManager.shared.enable = true

Then use "Command+Shift+K" then "Command+b" then "Command+r"

Also If the issue is resolved then it's Good to go else you can use these terminal commands to update project pod repo:-

Go to the project directory in terminal then run following commands

pod init
pod deintegrate
pod repo update
pod install --verbose
Ashutosh Mishra
  • 1,679
  • 1
  • 13
  • 16
0

It is issue when intsall through pods so drag and drop its file then wrtie this line in appDelegate didFinishLaunchingWithOptions method. IQKeyboardManager.sharedManager().enable = true

Chirag Patel
  • 1,453
  • 1
  • 11
  • 21
0

In may case the following solution worked:

Replaced 'IQKeyboardManagerSwift' with 'IQKeyboardManager'

levan
  • 440
  • 1
  • 8
  • 19