Moya version: release 14.0.1
RxSwift version: 6.1.0
Alamofire version: 5.1.0
Carthage version: 0.37.0
My Cartfile looks like below:
github "ReactiveX/RxSwift" ~> 6.1.0
github "Moya/Moya" "14.0.1"
github "Alamofire/Alamofire" "5.1.0"
Command: carthage build Moya --use-xcframeworks --no-use-binaries --platform iOS
Expected: It should build and create a Moya XCFramework file in the Carthage build folder.
Actual: There is a "Moya.xcframework" created in the "/Carthage/Build" folder. But the above command fails with the following error.
CompileSwift normal arm64 (in target 'RxMoya' from project 'Moya')
CompileSwift normal armv7 (in target 'RxMoya' from project 'Moya')
/Carthage/Checkouts/Moya/Sources/RxMoya/MoyaProvider+Rx.swift:24:29: error: type 'Result
single(.error(error))
~^~~~
* ARCHIVE FAILED *
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
(4 failures)
Can someone advise on how to solve this issue and successfully build the Moya XCFramework?
I have the same problem
The problem might be more related to the fact that Moya 14.0.1 uses RxSwift 5.0 and you are linking against RxSwift 6.0 in your Cartfile, which will probably not work.
@s-wolff In my cartfile I was linking to RxSwift "5.1.1"
If we compare version we can see that Result library was removed from submodules
https://github.com/Moya/Moya/compare/14.0.0...14.0.1
I have the same error but with ReactiveMoya
I see issue with ReactiveMoya
I have the seem error in mac mini with m1
import Alamofire
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwift normal armv7
(4 failures)
Is there a fix for m1?
Most helpful comment
I have the same error but with ReactiveMoya