即使通过 cocoa pods 安装框架后也没有此类模块
No Such Module even after installing the framework via cocoa pods
我正在尝试集成一个 framework/library 以在 iOS 中创建吸引人的表单,使用这个:https://github.com/ortuman/SwiftForms
我能够安装 Cocoapods。我还在我的 Podfile 中添加了以下内容(在我的项目目录中):
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'SwiftForms'
和运行命令:$ pod install
但在我的 class 中,我仍然得到“没有这样的模块 'SwiftForms'”。
红色在这里表示什么:
当我打开 xworkspace 时,出现以下错误:
我刚刚创建了一个示例应用程序来了解您的问题。
请仔细按照这些步骤操作。
Step.1 更新了我的 Podfile 和 SwiftForms Lib
platform :ios, '8.0'
use_frameworks!
pod 'SwiftForms'
Step.2 在 Podfile 的父文件夹中打开终端 和运行 命令
pod install
Step.3 打开 project_name.xcworkspace 文件以使用 pods
打开项目
Step.4转到项目设置 --> 构建阶段 -->添加SwiftForms.framework
Step.5 现在转到 Viewcontroller.swift 并导入
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.
}
}
它很有魅力!!如果您发现任何问题,请告诉我。
通过将 "Build Active Architectures Only" 设置为否,在主项目和 Pods 子项目中帮助我修复了上述错误。
我正在尝试集成一个 framework/library 以在 iOS 中创建吸引人的表单,使用这个:https://github.com/ortuman/SwiftForms
我能够安装 Cocoapods。我还在我的 Podfile 中添加了以下内容(在我的项目目录中):
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'SwiftForms'
和运行命令:$ pod install
但在我的 class 中,我仍然得到“没有这样的模块 'SwiftForms'”。
红色在这里表示什么:
当我打开 xworkspace 时,出现以下错误:
我刚刚创建了一个示例应用程序来了解您的问题。
请仔细按照这些步骤操作。
Step.1 更新了我的 Podfile 和 SwiftForms Lib
platform :ios, '8.0'
use_frameworks!
pod 'SwiftForms'
Step.2 在 Podfile 的父文件夹中打开终端 和运行 命令
pod install
Step.3 打开 project_name.xcworkspace 文件以使用 pods
打开项目Step.4转到项目设置 --> 构建阶段 -->添加SwiftForms.framework
Step.5 现在转到 Viewcontroller.swift 并导入
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.
}
}
它很有魅力!!如果您发现任何问题,请告诉我。
通过将 "Build Active Architectures Only" 设置为否,在主项目和 Pods 子项目中帮助我修复了上述错误。