Open arpa-srf opened 3 weeks ago
I'm facing the same problem, is there any fix planned?
Same
Same issue here. For anyone who needs it right now, it looks like PageMap
now needs to conform to IteratorProtocol
and Collection
.
By no means is this a fix, but if you need it to build for whatever purposes for updating to Xcode 16, here's what I have so far:
Add this to the
PageMap
file
extension PageMap: IteratorProtocol {
typealias Element = Item
mutating func next() -> Item? {
guard let index = latestPageIndex else { return nil }
return page(atIndex: index)?.items.first
}
}
extension PageMap: Collection {
subscript(position: Int) -> Item {
get {
return page(atIndex: position)!.items.first!
}
}
}
Remove this from the
PageMap
file (or leave it, just gives a warning)
extension PageMap: Sequence {
public func makeIterator() -> IndexingIterator<PageMap> {
return IndexingIterator(_elements: self)
}
We just removed the conformance to Sequence (remove these lines) and it builds without issue. Given this is an internal type and no errors are thrown its likely this isnt used anymore.
This allowed us to build our project with Xcode 16
instantsearch-ios
PageMap.swift
It should go without saying that this is recommended only for trying Xcode 16 and not for shipping.
Describe the bug 🐛 Build with instantsearch-ios as a dependency fails on Xcode 16 beta
Errors:
To Reproduce 🔍 Steps to reproduce the behavior:
(Also possible to reproduce with Examples project in repo)
Expected behavior 💭 Build succeeds
Screenshots 🖥 Errors in PageMap.swift
Environment: