Carthage setup fails with code 65 - ios

I'm installing carthage on a new machine.
$ brew install Carthage
[in project root] $ emacs Cartfile
# Alamofire
github "Alamofire/Alamofire"
# SwifyJSON
github "SwiftyJSON/SwiftyJSON"
$ carthage update
*** Fetching SwiftyJSON
*** Fetching Alamofire
*** Checking out Alamofire at "1.2.3"
*** Checking out SwiftyJSON at "2.2.0"
*** xcodebuild output can be found in /var/folders/8n/044rh7_j6nlcdtsb3cgp_snc0000gn/T/carthage-xcodebuild.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
A shell task failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 [project root]/Carthage/Checkouts/Alamofire/Source/Request.swift
CompileSwift normal x86_64 [project root]/Carthage/Checkouts/Alamofire/Source/ResponseSerialization.swift
CompileSwift normal x86_64 [project root]/Carthage/Checkouts/Alamofire/Source/Manager.swift
CompileSwift normal x86_64 [project root]/Carthage/Checkouts/Alamofire/Source/Alamofire.swift
CompileSwift normal x86_64 [project root]/Carthage/Checkouts/Alamofire/Source/Validation.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(6 failures)

Building scheme "Alamofire iOS" in Alamofire.xcworkspace
for get before version write this to carthage
github "Alamofire/Alamofire" >= 4.2.0
see realese project in github for select version for your swift version
also you can select platform when run carthage
example
carthage update --platform iOS

Related

AppCenter failed to get module and shows error 65

I am using Swift with CocoaPods and trying to build it in AppCenter.
I kept getting this failing log
CompileSwift normal arm64 (in target 'Wundercast' from project 'Wundercast')
cd /Users/runner/runners/2.165.2/work/1/s
/Applications/Xcode_11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/runner/runners/2.165.2/work/1/s/Wundercast/ViewController.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Utils/Colors.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/AppDelegate.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Controllers/ApiController.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Utils/Appearance.swift -supplementary-output-file-map /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/supplementaryOutputs-8c8267 -target arm64-apple-ios10.1 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode_11.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -I /Users/runner/Library/Developer/Xcode/DerivedData/Wundercast-ermhkmlzqioflkgqqzuvbqmqczqy/Build/Intermediates.noindex/ArchiveIntermediates/Wundercast/BuildProductsPath/Release-iphoneos -F /Users/runner/Library/Developer/Xcode/DerivedData/W...
/Users/runner/runners/2.165.2/work/1/s/Wundercast/ViewController.swift:30:8: error: no such module 'RxSwift'
import RxSwift
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
(4 failures)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
With previous research, I have configured the project with xcworkspace, and appcenter-post-clone.sh to install CocoaPods.
Here is the test project link.
What should I do to fix this?
After a few tries with a blank project, it worked pretty well with the following appcenter-post-clone.sh
#!/usr/bin/env bash
echo "Uninstalling all CocoaPods versions"
sudo gem uninstall cocoapods --all --executables
COCOAPODS_VER=`sed -n -e 's/^COCOAPODS: \([0-9.]*\)/\1/p' Podfile.lock`
echo "Installing CocoaPods version $COCOAPODS_VER"
sudo gem install cocoapods -v $COCOAPODS_VER
cd $APPCENTER_SOURCE_DIRECTORY
pod install
However, the original project still fails in the release mode even locally. At least I now know the problem has nothing to do with AppCenter, but rather has some issues with Xcode. By dragging the project files into a new Xcode project, it worked like charm.

Carthage Build Failed after updating swift to version 4.0

Carthage build failed after updating swift to version 4.0 from version 3.2.
Here are the results of using the carthage update --platform iOS.
*** Fetching AlamofireImage
*** Fetching FSCalendar
*** Fetching Alamofire
*** Fetching ActiveLabel.swift
*** Fetching Toaster
*** Fetching PopupDialog
*** Fetching DKImagePickerController
*** Checking out DKImagePickerController at "3.6.1"
*** Checking out PopupDialog at "0.5.4"
*** Checking out Toaster at "2.1.0"
*** Checking out ActiveLabel.swift at "0.8.0"
*** Checking out Alamofire at "4.5.1"
*** Checking out FSCalendar at "2.7.9"
*** Checking out AlamofireImage at "3.3.0"
*** xcodebuild output can be found in /var/folders/6z/c0myz1fn4rsgy842p9vqqr700000gn/T/carthage-xcodebuild.my2Am1.log
*** Building scheme "ActiveLabel" in ActiveLabel.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/poqw/Documents/GitHub/nyg-ios/Carthage/Checkouts/ActiveLabel.swift/ActiveLabel.xcodeproj -scheme ActiveLabel -configuration Release -derivedDataPath /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /Users/poqw/Documents/GitHub/nyg-ios/Carthage/Checkouts/ActiveLabel.swift)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/6z/c0myz1fn4rsgy842p9vqqr700000gn/T/carthage-xcodebuild.my2Am1.log
And then $ tail /var/folders/6z/c0myz1fn4rsgy842p9vqqr700000gn/T/carthage-xcodebuild.my2Am1.log
I got this :
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:~/.local/bin:/usr/local/bin:/Users/poqw/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/opt/local/bin"
/usr/bin/ditto -rsrc /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0/Build/Intermediates.noindex/ActiveLabel.build/Release-iphoneos/ActiveLabel.build/Objects-normal/armv7/ActiveLabel.swiftdoc /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0/Build/Products/Release-iphoneos/ActiveLabel.framework/Modules/ActiveLabel.swiftmodule/arm.swiftdoc
** BUILD FAILED **
The following build commands failed:
CompileC /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0/Build/Intermediates.noindex/ActiveLabel.build/Release-iphoneos/ActiveLabel.build/Objects-normal/armv7/ActiveLabel_vers.o /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0/Build/Intermediates.noindex/ActiveLabel.build/Release-iphoneos/ActiveLabel.build/DerivedSources/ActiveLabel_vers.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0/Build/Intermediates.noindex/ActiveLabel.build/Release-iphoneos/ActiveLabel.build/Objects-normal/arm64/ActiveLabel_vers.o /Users/poqw/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/ActiveLabel.swift/0.8.0/Build/Intermediates.noindex/ActiveLabel.build/Release-iphoneos/ActiveLabel.build/DerivedSources/ActiveLabel_vers.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
And Here is What I have done for fix this problem.
Delete derived Carthage Cache.
Delete Carthage directory in project.
Uninstall Carthage and install again.
Download Xcode 8.3.2 and xcode-select --switch /Applications/Xcode8.app/Contents/Developer and use the xcrun command to make sure that the version has been changed to swift 3.0 and then update Carthage.
Clean Project and rebuild
Restart Xcode
I would appreciate if anyone can help me.
I'm using Xcode 8.3.1 and this is what I followed:
Deleted derived data.
Removed Carthage folder: rm -r ./Carthage
Updated Cartfile with:
github "facebook/facebook-sdk-swift" "master"
github "facebook/facebook-ios-sdk" "sdk-version-4.21.0"
Run Carthage command:
carthage update --platform iOS --no-use-binaries
Mac Senour’s solution didn't work for me; what worked was cleaning derived data of CarthageKit here: /Library/Caches/org.carthage.CarthageKit/DerivedData/

UberRides Carthage Issue

I want to use UberRides SDK in Objective-C Project. I checked pod for objective c but it is not available. So i tried Carthage.
Here is my Cartfile:
# UberRides
github "https://github.com/uber/rides-ios-sdk" ~> 0.5
I use carthage update --platform iOS this command to installation and i am using xCode 8. But after some installation i am getting some error and i don't know how to handle so please help me.
Here is log of terminal:
*** Fetching rides-ios-sdk
*** Fetching ObjectMapper
*** Checking out ObjectMapper at "1.5.0"
*** Downloading rides-ios-sdk.framework binary at "v0.5.2"
*** Checking out rides-ios-sdk at "v0.5.2"
*** xcodebuild output can be found in /var/folders/mt/_rpb6s913b54yl1gfk0dt2qh0000gn/T/carthage-xcodebuild.orgg88.log
*** Building scheme "ObjectMapper-iOS" in ObjectMapper.xcworkspace
*** Building scheme "UberRides" in UberRides.xcodeproj
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
A shell task (/usr/bin/xcrun xcodebuild -project /Users/jayesh/Desktop/CarthageDemo/Carthage/Checkouts/rides-ios-sdk/source/UberRides.xcodeproj -scheme UberRides -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
This is probably because the latest 0.5 release is still using Swift 2.2
try updating your Cartfile to use the experimental Swift 2.3 branch
# UberRides
github "https://github.com/uber/rides-ios-sdk" "swift-2.3-dev"

How to install AEXML module in my iOS 10 and Xcode 8 application using carthage?

I am trying to add AEXML module (https://github.com/tadija/AEXML) for XML parsing in my iOS 10 application with Xcode 8. However, I am getting this error while building dependencies with the command carthage update --platform iOS.
Swift Version: 3.0
Xcode Version: 8
Carthage Version: 0.17.2
cartfile
github "tadija/AEXML"
Error after running carthage update --platform iOS command
gsirn-021308:ApplePaySwag-Final chandeln$ swift -version
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9
gsirn-021308:ApplePaySwag-Final chandeln$ carthage update --platform iOS
*** Fetching AEXML
*** Checking out AEXML at "4.0.0"
*** xcodebuild output can be found in /var/folders/q7/bltc5kls62n2mzlvwhctctzr0000gn/T/carthage-xcodebuild.3NnOoT.log
*** Building scheme "AEXML iOS" in AEXML.xcodeproj
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/Tests/AEXMLTests.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
A shell task (/usr/bin/xcrun xcodebuild -project /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/AEXML.xcodeproj -scheme AEXML iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/Tests/AEXMLTests.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)

Carthage fails when trying to install FontAwesomeSwift in iOS project

I am trying to install FontAwesome.Swift in my Xcode project (Swift) so I created a Cartfile with the following line
github "thii/FontAwesome.swift" >= 0.4.1
as described here. Then I ran
carthage update and this happened :
==> carthage update
*** Fetching FontAwesome.swift
*** Checking out FontAwesome.swift at "0.6.0"
*** xcodebuild output can be found in /var/folders/fr/sn4l2f393_v_ytcwkb0lx7_40000gp/T/carthage-xcodebuild.4QnCto.log
*** Building scheme "FontAwesome" in FontAwesome.xcodeproj
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 <path_to_project>/<ProjectName>/Carthage/Checkouts/FontAwesome.swift/FontAwesome/FontAwesome.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
<path_to_project>/<ProjectName>/Carthage/Checkouts/FontAwesome.swift/FontAwesome/FontAwesome.swift:72:61: error: 'String.Index' does not have a member named 'advancedBy'
A shell task failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 <path_to_project>/<ProjectName>/Carthage/Checkouts/FontAwesome.swift/FontAwesome/FontAwesome.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
I deduce from the error message:
'String.Index' does not have a member named 'advancedBy'
that you are still using Xcode 6.x? The advancedBy API is only available as of Swift 2.0 which ships with Xcode 7.
So, you have two options:
Upgrade your project to Xcode 7 / Swift 2.0
Edit your project's Cartfile so that it fetches a version of FontAwesome.swift that is compatible with you Xcode version. It seems FontAwesome.swift migrated to Swift 2.0 with version 0.6, so specifying a version < 0.6 (instead of >= 0.4.1) might do it.
In case you have both versions of Xcode installed, then Carthage may still use the command line tools from Xcode 6.x instead of the newer ones. You could fix this with the xcodeselect command in Terminal, but it's also possible to switch to the desired version of the tools in the Xcode Preferences (Locations tab).

Resources