InAppPurchase icon indicating copy to clipboard operation
InAppPurchase copied to clipboard

XCode 13 'Product' is ambiguous for type lookup in this context

Open netgfx opened this issue 2 years ago • 3 comments

Describe the bug I get an error about 'Product' is ambiguous for type lookup in this context

To Reproduce Steps to reproduce the behavior: Any mention of Product

Expected behavior Not throw an error, maybe it needs to be renamed?

Screenshots 9076F1E9-F4FD-43B7-B540-691B3AD0BC4A_4_5005_c

Desktop (please complete the following information):

  • OS: iOS
  • Browser Mobile
  • Version XCode 13.0

netgfx avatar Oct 14 '21 15:10 netgfx

Same problem here. Do you ever work this out?

jbmaxwell avatar May 14 '22 00:05 jbmaxwell

Just to note, I have the same apparent conflict with StoreKit, but the normal fix of just using the module to specify which one I want (e.g., InAppPurchase.Product) also fails with: 'Product' is not a member type of class 'InAppPurchase.InAppPurchase', which makes it seem like something in the way this framework is designed has put me in a corner. (Actually, I'm really not sure why the compiler thinks it's a class...?? I don't see any weird singleton design... strange...)

Did you find a workaround?

Or....

bump.

jbmaxwell avatar May 15 '22 01:05 jbmaxwell

Okay, no, I get it. The main class in InAppPurchase is called InAppPurchase, so you can't actually use the module to narrow the scope... bummer. Only solution was to make sure StoreKit and InAppPurchase don't appear in the same file.

jbmaxwell avatar May 16 '22 01:05 jbmaxwell