Files
purchases-ios/Examples/MagicWeatherSwiftUI/Shared/Sources/Views
NachoSoto 761ca1209d New TestStoreProduct for creating mock StoreProducts and Offerings (#2711)
Fixes #1563 and #2193.

This introduces **`DEBUG` and `Swift` only** types that allow creating a
whole `Offering` for tests and SwiftUI previews.

Example:
![Screenshot 2023-06-26 at 12 36
40](https://github.com/RevenueCat/purchases-ios/assets/685609/03d83e65-b95b-40ba-80ad-f8be435c6d3e)

By making it available in only `DEBUG` builds we ensure that apps can't
accidentally try to purchase these products, which would be impossible.
If this is attempted in `DEBUG` builds, we return `ErrorCode`.

When trying to compile this API in release builds, you get an error with
a suggestion:

![image](https://github.com/RevenueCat/purchases-ios/assets/685609/f83b8848-dab6-4ae6-a92d-5c07a30be217)
2023-06-29 14:06:24 -07:00
..