我正在尝试为我的 iOS 应用程序设置 CircleCI,并且我想与 FaSTLane 集成。 我的 circle.yml 看起来像这样:
machine:
xcode:
version: 8.3.1
dependencies:
pre:
- gem install bundler
post:
- bundle install
- bundle exec pod install
- bundle exec fastlane test
在完成编译测试文件之前,构建一切正常;显示这个错误
[04:39:38]: ▸ Compiling LoginViewControllerSpec.swift
[04:39:38]: ▸ Compiling QuestionSpec.swift
[04:39:38]: ▸ Compiling ItemSpec.swift
[04:39:38]: ▸ Linking myApp-iosTests
[04:39:38]: ▸ ❌ ld: framework not found Pods_Tests_myAppTests
[04:39:38]: ▸ ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
这是 Podfile(我使用 cocoapods v1.2.1)
target 'myApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod "PulsingHalo"
pod 'OpenTok'
pod 'Alamofire', '4.0'
pod 'PieCharts'
pod 'SwiftHEXColors'
pod 'IQKeyboardManagerSwift'
pod 'OAuthSwiftAlamofire'
pod 'AlamofireObjectMapper', '~> 4.0'
target 'myAppTests' do
inherit! :search_paths
# Pods for testing
pod 'Quick'
pod 'Nimble'
end
target 'myAppUITests' do
inherit! :search_paths
# Pods for testing
pod 'Quick'
pod 'Nimble'
end
end
非常感谢您能为我提供的任何帮助。
谢谢
最佳答案
您能否确保 podfile 中的目标名称与构建阶段中的二进制框架名称相匹配。
还有一个旁注; bundle exec pod install
没什么问题,但我会将 pod install
移至 faSTLane,有一个名为 before_all
的 channel 可以为您安装 pod在您的测试车道之前。
platform :ios do |options|
before_all do |lane, options|
cocoapods // this would replace pod install
end
关于ios - 将 FaSTLane 与 CircleCI 集成 : Cocoapods framework not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44137063/