I'm new to Swift so it may be that I'm not doing something correctly, but the code does not compile. I've tried the CocoaPods method as well as the manual method. I get the following build errors:
AMSMB2 Group
Swift Compiler Error Group
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:76:12: 'DataProtocol' requires the types 'Slice<IOCtl.SrvCopyChunk>' and 'UInt8' be equivalent
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:76:12: Requirement specified as 'Self.Element' == 'UInt8' [with Self = IOCtl.SrvCopyChunk]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:76:12: Type 'IOCtl.SrvCopyChunk' does not conform to protocol 'RandomAccessCollection'
/Swift.Collection:2:23: Candidate has non-matching type '<Self> (Range<Self.Index>) -> Slice<Self>' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Swift.Collection:2:23: Candidate has non-matching type '<Self, R> (R) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Swift.Collection:3:23: Candidate has non-matching type '<Self> ((UnboundedRange_) -> ()) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:38:5: Candidate has non-matching type '<Self> (Int) -> UInt8' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:76:12: Type 'IOCtl.SrvCopyChunk' does not conform to protocol 'BidirectionalCollection'
/Swift.Collection:2:23: Candidate has non-matching type '<Self> (Range<Self.Index>) -> Slice<Self>' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Swift.Collection:2:23: Candidate has non-matching type '<Self, R> (R) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Swift.Collection:3:23: Candidate has non-matching type '<Self> ((UnboundedRange_) -> ()) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:38:5: Candidate has non-matching type '<Self> (Int) -> UInt8' [with Element = IOCtl.SrvCopyChunk.Element, Index = IOCtl.SrvCopyChunk.Index, SubSequence = IOCtl.SrvCopyChunk.SubSequence, Indices = IOCtl.SrvCopyChunk.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:76:12: Type 'IOCtl.SrvCopyChunk' does not conform to protocol 'Collection'
/Swift.Collection:2:23: Candidate has non-matching type '<Self> (Range<Self.Index>) -> Slice<Self>' [with Element = Slice<IOCtl.SrvCopyChunk>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunk>, SubSequence = Slice<IOCtl.SrvCopyChunk>, Indices = Range<Int>]
/Swift.Collection:2:23: Candidate has non-matching type '<Self, R> (R) -> Self.SubSequence' [with Element = Slice<IOCtl.SrvCopyChunk>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunk>, SubSequence = Slice<IOCtl.SrvCopyChunk>, Indices = Range<Int>]
/Swift.Collection:3:23: Candidate has non-matching type '<Self> ((UnboundedRange_) -> ()) -> Self.SubSequence' [with Element = Slice<IOCtl.SrvCopyChunk>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunk>, SubSequence = Slice<IOCtl.SrvCopyChunk>, Indices = Range<Int>]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:38:5: Candidate has non-matching type '<Self> (Int) -> UInt8' [with Element = Slice<IOCtl.SrvCopyChunk>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunk>, SubSequence = Slice<IOCtl.SrvCopyChunk>, Indices = Range<Int>]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:76:12: Do you want to add protocol stubs?
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:91:12: 'DataProtocol' requires the types 'Slice<IOCtl.SrvCopyChunkCopy>' and 'UInt8' be equivalent
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:91:12: Requirement specified as 'Self.Element' == 'UInt8' [with Self = IOCtl.SrvCopyChunkCopy]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:91:12: Type 'IOCtl.SrvCopyChunkCopy' does not conform to protocol 'RandomAccessCollection'
/Swift.Collection:2:23: Candidate has non-matching type '<Self> (Range<Self.Index>) -> Slice<Self>' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Swift.Collection:2:23: Candidate has non-matching type '<Self, R> (R) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Swift.Collection:3:23: Candidate has non-matching type '<Self> ((UnboundedRange_) -> ()) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:38:5: Candidate has non-matching type '<Self> (Int) -> UInt8' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:91:12: Type 'IOCtl.SrvCopyChunkCopy' does not conform to protocol 'BidirectionalCollection'
/Swift.Collection:2:23: Candidate has non-matching type '<Self> (Range<Self.Index>) -> Slice<Self>' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Swift.Collection:2:23: Candidate has non-matching type '<Self, R> (R) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Swift.Collection:3:23: Candidate has non-matching type '<Self> ((UnboundedRange_) -> ()) -> Self.SubSequence' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:38:5: Candidate has non-matching type '<Self> (Int) -> UInt8' [with Element = IOCtl.SrvCopyChunkCopy.Element, Index = IOCtl.SrvCopyChunkCopy.Index, SubSequence = IOCtl.SrvCopyChunkCopy.SubSequence, Indices = IOCtl.SrvCopyChunkCopy.Indices]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:91:12: Type 'IOCtl.SrvCopyChunkCopy' does not conform to protocol 'Collection'
/Swift.Collection:2:23: Candidate has non-matching type '<Self> (Range<Self.Index>) -> Slice<Self>' [with Element = Slice<IOCtl.SrvCopyChunkCopy>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunkCopy>, SubSequence = Slice<IOCtl.SrvCopyChunkCopy>, Indices = Range<Int>]
/Swift.Collection:2:23: Candidate has non-matching type '<Self, R> (R) -> Self.SubSequence' [with Element = Slice<IOCtl.SrvCopyChunkCopy>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunkCopy>, SubSequence = Slice<IOCtl.SrvCopyChunkCopy>, Indices = Range<Int>]
/Swift.Collection:3:23: Candidate has non-matching type '<Self> ((UnboundedRange_) -> ()) -> Self.SubSequence' [with Element = Slice<IOCtl.SrvCopyChunkCopy>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunkCopy>, SubSequence = Slice<IOCtl.SrvCopyChunkCopy>, Indices = Range<Int>]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:38:5: Candidate has non-matching type '<Self> (Int) -> UInt8' [with Element = Slice<IOCtl.SrvCopyChunkCopy>, Index = Int, Iterator = IndexingIterator<IOCtl.SrvCopyChunkCopy>, SubSequence = Slice<IOCtl.SrvCopyChunkCopy>, Indices = Range<Int>]
/Volumes/Brazil/Xcode/PhotoLibrarySync/AMSMB2/AMSMB2/Fsctl.swift:91:12: Do you want to add protocol stubs?
Warning Group
/Users/sabaata/Library/Developer/Xcode/DerivedData/PhotoLibrarySync-dljqurabsjpzepgufrwefrpszihc/Build/Intermediates.noindex/AMSMB2.build/Debug-iphoneos/AMSMB2.build/Objects-normal/arm64/FileHandle.dia:1:1: Could not read serialized diagnostics file: Invalid File: Invalid diagnostics signature
I'm using Swift 5 and XCode 11.4 beta 3