jinSasaki / InAppPurchase

A Simple and Lightweight framework for In App Purchase (Store Kit 1)
MIT License
288 stars 30 forks source link

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

Open netgfx opened 2 years ago

netgfx commented 2 years ago

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):

jbmaxwell commented 2 years ago

Same problem here. Do you ever work this out?

jbmaxwell commented 2 years ago

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 commented 2 years ago

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.