我在我的自定义键盘扩展中使用了Alamofire和SwiftyJSON。我在视图中创建了一个键盘,并将它放置在视图控制器中。我想使用相同的文件来表示键盘,所以我创建了一个新的目标“键盘”,并在键盘扩展名和BibleKeyboardView.swift文件的项目中添加了target成员资格。但是,一旦添加了目标成员资格,就会得到错误的No such module Alamofire和Command CompileSwiftSources failed with a nonzero exit code。即使当我关闭Keyboard的目标成员资格时,它仍然有Command CompileSwiftSources failed with a nonzero exit code。我也打开.xcworkspace文件。
我试过:
pod install有人知道发生了什么吗?
文件结构、目标成员资格和错误的图片如下:



发布于 2019-02-27 05:43:25
在我提出这个问题后,我得到了一笔灵感。
我的Podfile最初
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'BibleKeyboard-iPad' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for BibleKeyboard-iPad
pod 'Alamofire'
pod 'SwiftyJSON'
end但我需要补充
target 'Keyboard' do
use_frameworks!
pod 'Alamofire'
pod 'SwiftyJSON'
endhttps://stackoverflow.com/questions/54898640
复制相似问题