I have updated XCode to 13.0. And build my app. Now it is showing error as following
//MARK:- UberRide
class UberRide: NSObject {
var rideImgUrl: URL
var rideName: String
var ridePrice: Double = 0.0
var rideTime: String
init(product: Product) {
self.rideImgUrl = product.imageURL!
self.rideName = product.name!
if let price = product.priceDetails?.minimumFee {
self.ridePrice = price
}
rideTime = ""
}
}
Error is 'Product' is ambiguous for type lookup in this context and Type of expression is ambiguous without more context
How to fix it?
Probably your type conflicts with new Product in StoreKit?
Check your imports. Do you need the full
StoreKitthere? You could also import only specific classes, thus preventing the conflict.If you need to use both types in one file, you can always distinguish them by fully qualified name, e.g:
MyProject.ProductorStoreKit.Product.