将 Fastlane 与 CircleCI 集成:找不到 Cocoapods 框架
Integrating Fastlane with CircleCI: Cocoapods framework not found
我正在尝试为我的 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
的车道可以在你的测试车道之前为你安装 pods。
platform :ios do |options|
before_all do |lane, options|
cocoapods // this would replace pod install
end
我正在尝试为我的 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
的车道可以在你的测试车道之前为你安装 pods。
platform :ios do |options|
before_all do |lane, options|
cocoapods // this would replace pod install
end