Error "No Such Module" When Installed Framework with Pod in Swift 3

Getting error No such module using Xcode, but the framework is there

I'm not sure why this happens, but one way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive.

No Such Module even after installing the framework via cocoa pods

I have just created a sample app to understand your issue.

Just follow these steps carefully.

Step.1 Updated my Podfile with SwiftForms Lib

platform :ios, '8.0'

use_frameworks!

pod 'SwiftForms'

Step.2 Open terminal at Podfile's parent folder and run command

pod install

Step.3 open project_name.xcworkspace file to open Project with pods

Step.4 Go to Project Settings --> Build Phases --> Add SwiftForms.framework

Sample Image

Step.5 Now goto the Viewcontroller.swift and import

import UIKit
import SwiftForms

class ViewController: FormViewController {

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

It works like charm!! let me know if you find any trouble in this.

Getting error No such module using Xcode, but the framework is there

I'm not sure why this happens, but one way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive.

No such module ... in Xcode

Comments from @l'L'l led me to the solution. I went to

build settings > frameworks search path

and set it to the following:

$(inherited) (non-recursive)
$(PROJECT_DIR)/build/Debug-iphoneos (non-recursive)
$(SRCROOT) (recursive)

It is now correctly finding the pod frameworks.



Related Topics



Leave a reply



Submit