0

I am new to iOS development and I am currently playing with Package Managers, in this case I am trying to use Carthage to import Alamofire into my app. I was able to build the application in Xcode and side load it on my device and the application works(Im able to call an API successfully so I know Alamofire is being used correctly), But when I commit my project to GitHub and build it in Visual Studio App Center the build fails on the "CompileSwift normal arm64" command. Has anyone seen this issue before or know if there is a solution?

Is it possible that Carthage is not compatible with VS App Center? or would that not matter because Carthage is only to essentially download the Framework.

`CompileSwift normal arm64
    cd /Users/vsts/agent/2.140.0/work/1/s
    /Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/vsts/agent/2.140.0/work/1/s/TaskManager/ViewController.swift /Users/vsts/agent/2.140.0/work/1/s/TaskManager/AppDelegate.swift -target arm64-apple-ios11.4 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -I /Users/vsts/Library/Developer/Xcode/DerivedData/TaskManager-hgihqzndqrcqcahjnxfhdrfxlmns/Build/Intermediates.noindex/ArchiveIntermediates/TaskManager/BuildProductsPath/Release-iphoneos -F /Users/vsts/Library/Developer/Xcode/DerivedData/TaskManager-hgihqzndqrcqcahjnxfhdrfxlmns/Build/Intermediates.noindex/ArchiveIntermediates/TaskManager/BuildProductsPath/Release-iphoneos -F /Users/vsts/agent/2.140.0/work/1/s -g -module-cache-path /Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4 -O -serialize-debugging-options -Xcc -I/Users/vsts/Library/De...
/Users/vsts/agent/2.140.0/work/1/s/TaskManager/ViewController.swift:10:8: error: module compiled with Swift 4.2 cannot be imported in Swift 4.1.2: /Users/vsts/agent/2.140.0/work/1/s/Alamofire.framework/Modules/Alamofire.swiftmodule/arm64.swiftmodule
import Alamofire
       ^

** ARCHIVE FAILED **

The following build commands failed: CompileSwift normal arm64 CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (2 failures)

[error]Error: /usr/bin/xcodebuild failed with return code: 65

[section]Finishing: Xcode build (signed)

[section]Starting: Xcode build (signed)`

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
Paul R.
  • 182
  • 2
  • 10
  • After a bit of experimenting, my current theory is that Visual Studio App Center does not allow for iOS (swift) build scripts and therefore the build issue with Carthage cannot be fixed with the same command as in Xcode, I believe that you can only publish a iOS (swift) app with VS App Center if your using CocoaPods. – Paul R. Sep 26 '18 at 01:53

0 Answers0