Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 868
Jayson Tamayo Avatar asked Mar 18 '16 07:03

Jayson Tamayo


2 Answers

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.

like image 130
swiftBoy Avatar answered Nov 17 '22 14:11

swiftBoy


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

like image 1
Vinod Rathod Avatar answered Nov 17 '22 15:11

Vinod Rathod