Do you need to use SKProductsRequest to fetch products in the Sandbox envrionment?

I would like to know if you have to use SKProductsRequest to fetch your products in the sandbox environment or if you can use Product.products(for:)?

Product.products(for:) is only returning products when I have a StoreKit configuration file selected. Can a StoreKit configuration file be used with the sandbox environment or only Xcode environment?

To fetch product information, use SKProductsRequest if you are using StoreKit 1 APIs and use Product.products(for:) if you are using StoreKit 2 APIs. See Fetching Product Information from the App Store for details. StoreKit in Testing only uses products that you have defined in your StoreKit configuration file. It doesn't access the sandbox environment.

From Setting up StoreKit testing in Xcode:

There are two types of StoreKit configuration files: local and, in Xcode 14 and later, synced.
Set up a local configuration file if you haven’t set up your app in App Store Connect yet, or you want to try out new types of in-app purchases or subscriptions before you set them up in App Store Connect. The local data is convenient to edit in Xcode, and stands in for the data that otherwise comes from App Store Connect.
Set up a synced configuration file if you have in-app purchases or subscriptions already set up in App Store Connect that you want to test in Xcode.
Do you need to use SKProductsRequest to fetch products in the Sandbox envrionment?
 
 
Q