Jayson Tamayo
Jayson Tamayo

Reputation: 2811

No Such Module even after installing the framework via cocoa pods

I am trying to integrate a framework/library for creating appealing forms in iOS, using this one: https://github.com/ortuman/SwiftForms

I was able to install Cocoapods. I also added the following in my Podfile (in my project's directory):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'SwiftForms'

And run the command: $ pod install

But in my class, I still get 'No such module 'SwiftForms'. enter image description here

And what does the color red indicates here: enter image description here

When I open the xworkspace, I get these errors: enter image description here

Upvotes: 5

Views: 5907

Answers (2)

Vinod Rathod
Vinod Rathod

Reputation: 822

By setting the "Build Active Architectures Only" to No, in main project and Pods subproject helped me to fix the above error.

https://stackoverflow.com/a/43557775/5177699

Upvotes: 1

swiftBoy
swiftBoy

Reputation: 35783

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

enter image description here

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.

Upvotes: 4

Related Questions