Reputation: 3691
I am trying to setup CircleCI for my iOS app and I want to integrate with Fastlane. My circle.yml looks like this:
machine:
xcode:
version: 8.3.1
dependencies:
pre:
- gem install bundler
post:
- bundle install
- bundle exec pod install
- bundle exec fastlane test
The building it's fine until it finish compiling the test files; It shows this error
[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)
And here is the Podfile (I use 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
I have tried for two days without any success. I also changed the Build options in the Tests Target
I really appreciate any help you can provide me.
Thank you
Upvotes: 0
Views: 849
Reputation: 4914
Could you make sure your target names in podfile matches with binary frameworks name in your buildphases.
Also a side note; Nothing wrong with bundle exec pod install
but I would move pod install
to fastlane, there is a lane called before_all
that can install the pods for you before your test lane.
platform :ios do |options|
before_all do |lane, options|
cocoapods // this would replace pod install
end
Upvotes: 1