我对使用 Xcode 进行 Mac / iOS 开发非常陌生,并且在构建我的应用程序时遇到了麻烦。我在这个问题上工作了 4 天,但我没有更多的想法来找到原因。
该应用程序有 6 个项目,捆绑在一个 xcworkspace 中。我通过 cocoapods 和终端添加了命令 pod install RxSwift、RxCocoa、OMGHTTPURLRQ、PromiseKit 和 SVWebViewController 成功。没有依赖项的项目可以成功构建。在 *.swift 文件中使用命令“import RxCocoa”和“import RxSwift”的两个项目(库)失败,并出现错误“No such module 'RxCocoa'”。
我阅读了一些 Stackoverflow 帖子和 RxSwift Git 文档来解决这个问题,但没有成功。
Podfile 定义:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.1'
use_frameworks!
target 'CheckMyBus' do
pod "OMGHTTPURLRQ", "~> 3.1.2“
pod "RxSwift", "~> 2.3.0"
pod 'RxCocoa', '~> 2.3.0'
pod 'PromiseKit', '~> 3.2.1'
pod 'SVWebViewController', '~> 0.2‘
end
通过终端安装 Pod:
MacMinis-Mac-mini:CheckMyBus MacMini$ pod install
Analyzing dependencies
Downloading dependencies
Using OMGHTTPURLRQ (3.1.3)
Using PromiseKit (3.2.1)
Using RxCocoa (2.3.1)
Using RxSwift (2.3.1)
Using SVWebViewController (0.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
[!] The `CheckMyBus [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-CheckMyBus/Pods-CheckMyBus.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `CheckMyBus [Release]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-CheckMyBus/Pods-CheckMyBus.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
MacMinis-Mac-mini:CheckMyBus MacMini$
有谁能够帮我?