Commit Graph
14 Commits
Author SHA1 Message Date
Antonio Pallares 80e3dc014c Add support for the Test Store (#5632)
* add `testStore` to `Store` enum

* fix RevenueCatUI test

* add extra logs to simulated purchases
2025-10-09 15:45:51 +02:00
Antonio Pallares ac22c9a049 Enable Test Store (#5596)
* Remove `SIMULATED_STORE` flag

* Remove unnecessary test (now that the compiler flag does not exist anymore)

* remove `.testStore` enum case from `Store`

Will be added in the future once the test store is released publicly

* Rename variables for internal consistency
2025-09-25 12:08:46 -03:00
Antonio Pallares e66033c5af Rename Test Store to Simulated Store internally (#5459)
* Rename Test Store to Simulated Store only internally

* fix lint

* fix test under `SIMULATED_STORE` compiler flag

* fix test compilation

* Add name clarification to `APIKeyValidationResult.simulatedStore` enum case

* Fix public-facing strings

* Improve comment

* improve comment
2025-09-01 19:04:01 +02:00
Antonio Pallares d7a166353d Add Test Store enum case to Store (#5438)
* Add Test Store case to the `Store` enum

Under the `TEST_STORE` compiler flag

* Cover new `.testStore` case in switches over the `Store` enum

* add extra unit test
2025-08-01 11:15:34 +02:00
Will Taylor 47dd2f56c1 Add Paddle Store enum case (#4981)
* add paddle Store enum case

* add parsing tests

* add PurchaseInformation tests

* lint

* fix renewal price in tests

* combine swiftlint disables
2025-06-03 09:18:55 -05:00
Mark Villacampa f0ccae7c87 Add enum entry for external purchases store (#3779) 2024-04-04 22:43:13 +02:00
Toni Rico bf81b25c67 Add RC_BILLING store (#3773)
### Description
iOS part of adding `RC_BILLING` store to the mobile SDKs
2024-03-26 11:23:26 +01:00
NachoSoto 9872dcac01 Renamed Decoder.throwValueNotFoundError (#1569)
The method doesn't actually throw, so calling `throw decoder.throwValueNotFoundError()` was confusing. Now the code reads `throw decoder.valueNotFoundError()`.
2022-05-23 18:27:35 -07:00
NachoSoto 56e3519ec1 Added tests for PeriodType/PurchaseOwnershipType/Store (#1558)
Follow up to #1551. Using `Codable.encodeAndDecode` we ensure that each value can be bidirectionally converted.
These tests exposed that unknown values were being encoded as `null`, but then failed to decode.

I've updated the implementation and added a few more tests to cover this behavior.
2022-05-19 11:27:12 -07:00
Will Taylor 80815c8cf8 Rename AmazonStore to Amazon to match Android SDK naming conventions 2022-05-19 12:37:46 -05:00
Will Taylor d2b5f55700 Add AmazonStore to Store enum 2022-05-19 10:58:52 -05:00
NachoSoto 30c1973c7a PeriodType/PurchaseOwnershipType/Store: conform to Encodable (#1551)
These will be used in an upcoming PR.
2022-05-10 08:47:42 -07:00
NachoSoto f9a8d68399 Fixed ErrorUtils.logDecodingError (#1539)
## Changes:

- Improved output of decoding errors:

#### Before:
```
[Purchases] - ERROR: 😿‼️ Couldn't decode data from json. Error:
The operation couldn’t be completed. (RevenueCat.CodableError error 0.))
```

#### After:
```
[Purchases] - ERROR: 😿‼️ Couldn't decode data from json. Error:
Found unexpected value 'tienda' for type 'Store'
```

- `CodableStrings.decodingError` relied on `Error.localizedDescription`, so `CodableError` now conforms to `LocalizedError` to provide that as well
- Added incorrect `value` to the error to find out why it was invalid
- Removed extra `)` at the end of the error string
- Cleaned up `switch`es to use a single `let` syntax
2022-04-26 10:48:02 -07:00
aboedo f5697de730 renamed Purchases folder to Sources (#1416)
* renamed `Purchases` folder to `Sources`

* temporarily enabling installation test jobs

* re-disabling installation test jobs
2022-03-28 11:53:24 -03:00