I'm trying to setup Jenkins slave, to build my Swift project that uses a Swift pod called "Freddy".
The problem is the build failed with error:
error: no such module 'Freddy'
This is my Podfile:
platform :ios, '8.0'
use_frameworks!
target 'MyProject' do
pod 'AFNetworking', '~> 3.0'
pod 'Freddy'
end
CocoaPods version 0.39.0
Xcode 7.2.1 (no problems while building from Xcode directly)
PS. Same problem had happened with Alamofire pod before I replaced it with AFNetworking.
PSS. Jenkins executes following xcodebuild:
xcodebuild -scheme MyProject -workspace MyProject.xcworkspace -configuration Debug clean build CONFIGURATION_BUILD_DIR=jenkinsOutput "CODE_SIGN_IDENTITY=iPhone Developer: Andrei Kadochnikov (XXXXXXXX)" -destination "platform=iOS Simulator,name=iPhone 6,OS=latest"
PSSS. I've tried to execute this command from terminal by myself, got same error as Jenkins shows me.
Figured that the build was failed because of parameter CONFIGURATION_BUILD_DIR=jenkinsOutput. I've got rid of it and build succeeded.
Confusing error message.
I have encountered this error recently,"no such module" and I finally found it course by the xcodebuild is a project not workspace.
Check the advanced settings on xcode plugin set the workspace path.
That solved the problem.
Related
I am working on a project that uses Carthage, it’s been a couple of months since the last time the project was opened. Now I am trying to move dependencies to .xcframeworks because with the old .framework, it wasn’t working. I encountered various errors and fixed them but there’s one dependency that I can’t fix,
SwinjectStoryboard
.
I tried using this workaround and setting command line tools
I have also tried creating an empty project with only Swinject and SwinjectStoryboard dependency
but still, my build is failing with the following message
Build Failed Task failed with exit code 65: /usr/bin/xcrun
xcodebuild -project
/Users/abu/Developer/xcframework_2/Carthage/Checkouts/SwinjectStoryboard/SwinjectStoryboard.xcodeproj
-scheme SwinjectStoryboard-iOS -configuration Release -derivedDataPath /Users/abu/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5_12E262/SwinjectStoryboard/2.2.0
-sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO
-archivePath /var/folders/g9/rjxzfx7d2s51_sr6stdkpc5c0000gn/T/SwinjectStoryboard
SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO
CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO
FRAMEWORK_SEARCH_PATHS=$(inherited)
/var/folders/g9/rjxzfx7d2s51_sr6stdkpc5c0000gn/T/carthage-xcframework-HTlC
(launched in
/Users/abu/Developer/xcframework_2/Carthage/Checkouts/SwinjectStoryboard)
This usually indicates that project itself failed to compile. Please
check the xcodebuild log for more details:
/var/folders/g9/rjxzfx7d2s51_sr6stdkpc5c0000gn/T/carthage-xcodebuild.Tafjce.log
I am running the following command to build the dependencies
carthage.sh update --use-xcframeworks --platform iOS
here's my contents of my Cartfile
github "Swinject/Swinject"
github "Swinject/SwinjectStoryboard"
I am stuck on this problem for a couple of days now and would appreciate any help
I am currently unable to compile my podfile in Xcode10, and there doesn't seem to be much information online regarding how to fix this issue...
The current message I am getting is:
Showing All Messages
:-1: missing input '(File location)...Podfile.o' and no rule to build it
And this is my podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'App' do
project '/Users/Oskilla/Desktop/Swift/App/App.xcodeproj'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'Google-Maps-iOS-Utils'
pod 'INSPhotoGallery'
end
Does anyone have any ideas on how to fix this issue?
Thanks a lot
You don't compile a Podfile. You use the CocoaPods gem to install and setup a CocoaPods integrated workspace:
Getting Started with CocoaPods
open terminal, cd /toPodFileDir/, then pod install
then open the xcworkspace file in your project folder and try to compile.
If you get errors after trying the above, let me know and I can edit.
I'm trying to build a project that uses RxSwift module, XCode keeps complaining with the error "no such module RxSwift"...
I've tried to install this module several times, in the terminal I got the following message after pod install
Analyzing dependencies
Downloading dependencies
Using RxCocoa (4.3.1)
Using RxSwift (4.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform `ios` with version `11.4` on target `BTCPrice` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] Automatically assigning platform `watchos` with version `4.3` on target `WatchApp` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] Automatically assigning platform `watchos` with version `4.3` on target `WatchApp Extension` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] The `BTCPriceTests [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-BTCPriceTests/Pods-BTCPriceTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `BTCPriceTests [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-BTCPriceTests/Pods-BTCPriceTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
as I could understand it RxSwift was installed, why does Xcode keep complaining about it?
I'm executing the .xcworkspace file..
thank you in advance for the answers!
How to remove CocoaPods from a project?
Simple Steps to installed pod file:
Close project of Xcode
1.Open terminal (Command + Space & type terminal)
2.Set your project path on terminal.(cd Desktop/PodDemos)
3.Type command on terminal: sudo gem install cocoapods
4.Command : pod init
5.Go to pod file of your project and adding pod which you want to install(Command: open podfile)
6.Added in pod file : pod 'RxSwift'
pod 'RxCocoa'
7.Command : Pod install
8.open your Project from terminals
Command : open PodDemos.xcworkspace
OR
Go to project folder and open PodDemos.xcworkspace
I am facing this issue on Xcode 9.4.1
I tried with
github "Hearst-DD/ObjectMapper" ~> 3.1.0 //(tried with 3.3.0)
but this error.
Module compiled with Swift 4.2 cannot be imported in Swift 4.1.2 comes every-time.
I tried below things:
Deleting the .resolved file
Deleted the build and checkout folder
Deleted the framework folder from builds inside cathage
tried with carthage bootstrap --platform iOS.
Updated: Below error keep on coming.
Build Failed Task failed with exit code 65: /usr/bin/xcrun
xcodebuild -workspace
/Users/xx/Documents/tal1.14.1/Carthage/Checkouts/mixpanel-swift/MixpanelDemo/MixpanelDemo.xcworkspace
-scheme Mixpanel -configuration Release -derivedDataPath /Users/xx/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/mixpanel-swift/v2.5.4
-sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath
/var/folders/82/_m5xwhxx4795wyxlhtw40ch509_hqq/T/mixpanel-swift
SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO
CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in
/Users/xx/Documents/tal1.14.1/Carthage/Checkouts/mixpanel-swift)
This usually indicates that project itself failed to compile. Please
check the xcodebuild log for more details:
/var/folders/82/_m5xwhxx4795wyxlhtw40ch509_hqq/T/carthage-xcodebuild.2MxUDl.log
BLDM3295-MAC:tal xx$
You need to do carthage bootstrap --no-use-binaries to make Carthage compile the frameworks locally, using the Swift 4.2 compiler that your project uses.
To fix what I did, I was having success build in Jenkins Server I kept the the same version and copied the build project and framework for the same. then run
carthage bootstrap platform iOS
I know this something hack, but this is how I am able to solve.
I do a simple swift project using XCode7.3. Everything is ok, UI & Unit test run properly too. However, when I wanna see coverage data, I can not run unit test anymore
ld: framework not found Pods_MapView
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Would you please give me a clue?
P/S: I hostes my project at https://github.com/rickyngk/map-view-demo
Try adding your target to your Podfile:
e.g.:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
use_frameworks!
target 'MapView' do
pod 'GoogleMaps'
end
target 'MapViewTests' do
pod 'GoogleMaps'
end
target 'MapViewUITests' do
pod 'GoogleMaps'
end
I've found my own answer:
Remove Pods & Podfile.lock
Follow this https://stackoverflow.com/a/28116102/1960061
Done