Commit Graph
3 Commits
Author SHA1 Message Date
NachoSoto 3da1c50925 HTTPRequest.Path: escape appUserID (#2747)
We were escaping users for every (hopefully) request. This refactor
moves that responsibility to the path creation in `HTTPRequest.Path` to
ensure it's done consistently.

Additionally, this is required so that `SigningTests` produce a
consistent path (see #2746).
2023-07-05 15:41:51 -07:00
NachoSoto f05fd88214 Diagnostics: new FileHandler for abstracting file operations (#2673)
Implemented as an `actor` to easily synchronize operations on a file.

Simple interface:
![Screenshot 2023-06-16 at 16 45
14](https://github.com/RevenueCat/purchases-ios/assets/685609/2f4850a3-f915-4330-a5e2-3abf9b37fb54)
2023-06-22 13:02:34 -07:00
NachoSoto 7ca28477f4 Fixed ROT13.string thread-safety (#1686)
Fixes #1685.

### Description

Swift's `lazy` and `static` property initialization is always thread-safe. However, `key` was only created as an empty dictionary, and the evaluation of `ROT13.string`, which was the one initializing that data, wasn't isolated.
By creating `ROT13.key` inline, this ensures that the initialization is only done once in a thread-safe way.
2022-06-10 11:31:04 -07:00