我正在尝试为我的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
我已经尝试了两天没有任何成功。我还更改了测试目标中的构建选项
我非常感谢你能给我的任何帮助。
谢谢
答案 0 :(得分:1)
您是否可以确保podfile中的目标名称与buildphases中的二进制框架名称匹配。
也是旁注; bundle exec pod install
没有错,但我会将pod install
移到fastlane,有一条叫before_all
的车道,可以在你的测试车道之前为你安装舱。
platform :ios do |options|
before_all do |lane, options|
cocoapods // this would replace pod install
end