Commit Graph
14 Commits
Author SHA1 Message Date
NachoSoto 2bcd0ce328 5.0.0 changes: support SK2 by default 2024-07-01 14:37:21 -05:00
NachoSoto 15df832fea Xcode 15.3 beta 2: remove nonisolated workaround (#3640)
See #3599.

This is listed in the [release
notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes)
as fixed.
2024-02-06 14:11:16 -08:00
NachoSoto 53fe9cd7bd Xcode 15.3 beta 1: fix compilation errors (#3599)
### Changes:
- `InternalAPI` is now `Sendable` to deal with new compilation error
- `PaywallEventStoreType` is now `Sendable`
- Extracted `SK2BeginRefundRequestHelperType` to make
`SK2BeginRefundRequestHelper` `Sendable`
- Updated `MockSK2BeginRefundRequestHelper` to be thread-safe and
`Sendable`
- Fixed compilation error in `DebugContentViews`
- Fixed compilation error in `DebugViewModel`
- Fixed compilation error in `StoreMessagesHelper`
2024-01-25 15:29:31 -08:00
NachoSoto 67b421e2b1 .debugRevenueCatOverlay: added Locale (#3539)
This adds the `Locale.identifier` and the currency code.
It can help debug issues with paywalls, currencies, localization, etc.

![Simulator Screenshot - iPhone 15 Pro Max - 2023-12-21 at 11 05
36](https://github.com/RevenueCat/purchases-ios/assets/685609/c0b5db10-8ab8-4119-9992-522065979612)
2023-12-21 12:19:54 -08:00
NachoSoto 4bca13f90d Debug View: display receipt status (#3303) 2023-10-16 07:34:34 -07:00
NachoSoto 0608e97577 DebugViewModel: fixed runtime crash on iOS < 16 (#3139)
Fixes https://github.com/RevenueCat/purchases-capacitor/issues/100 and
https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/14093/workflows/b3f8d001-6f39-40db-a5c5-00fc37d0211e/jobs/105838

```
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   ???                           	               0x0 ???
1   libswiftCore.dylib            	       0x18f9b8cf8 swift_getSingletonMetadata + 956
2   RevenueCat                    	       0x107f42de4 type metadata accessor for DebugViewModel + 64
3   libobjc.A.dylib               	       0x18017d938 realizeClassMaybeSwiftMaybeRelock(objc_class*, mutex_tt<false>&, bool) + 116
4   libobjc.A.dylib               	       0x180184eb0 realizeAllClasses() + 168
5   libobjc.A.dylib               	       0x180187b3c objc_copyClassList + 36
6   XCTestCore                    	       0x10532fcb0 +[XCTestCase(RuntimeUtilities) _allSubclasses] + 36
7   XCTestCore                    	       0x10532fdb8 +[XCTestCase(RuntimeUtilities) allSubclasses] + 16
```

Both `XCTest` (to load tests at runtime) and `Capacitor` use
`objc_getClassList`. That's broken before iOS 16 and will try to load
the metadata for `DebugViewModel` even though it's not `@available`.
A similar issue has been reported before:
https://openradar.appspot.com/radar?id=4970535809187840 /
https://github.com/apple/swift/issues/58099

This adds a layer of indirection so loading `DebugViewModel` at runtime
doesn't require the metadata for `NavigationPath`.
2023-09-05 10:12:12 -07:00
NachoSoto dab5035a19 visionOS: support for Xcode 15 beta 6 (#2989)
### Context:

`#if os(iOS)` no longer evaluates to `true` when compiling for
`visionOS`
Which means we need `|| os(xrOS)`.
But to support older Xcode we need `#if swift(>=5.9) && os(xrOS)`.
But, fun fact, short-circuiting doesn’t work in `Xcode 13`.
And we still need that to run iOS <15 tests (`FB12223404` /
`FB12805891`)

💩 

This works around that by defining our own `VISION_OS` flag.

### Changes:
- Added `VISION_OS` compile time flag to determine SDK
- Replaced `#if os(xrOS)` with `#if VISION_OS`
- Added flag to `Package.swift` (thanks @neonichu for helping with this)
2023-08-09 11:19:40 -07:00
NachoSoto c7db551bc4 xrOS: add support for debugRevenueCatOverlay (#2702) 2023-06-26 13:06:13 -07:00
NachoSoto 76c440b204 xrOS: fixed compilation by disabling debug overlay (#2681)
We can look into making them work in the future, but for now this helps
compile the SDK for `xrOS`.
2023-06-22 08:42:04 -07:00
NachoSoto 6ba378ba5e debugRevenueCatOverlay: display receiptURL (#2652)
Useful when debugging issues like #2558.

![Screenshot 2023-06-14 at 11 58
28](https://github.com/RevenueCat/purchases-ios/assets/685609/3fcb55bc-107e-46fd-aced-0d12d0667cba)
2023-06-15 08:37:58 -07:00
NachoSoto 7958e91dff debugRevenueCatOverlay: added support for macOS (#2648)
I wanted to support it to be able to look into #2558.


![image](https://github.com/RevenueCat/purchases-ios/assets/685609/cdba0488-965e-4887-bef0-ae151430889a)
2023-06-15 08:10:03 -07:00
NachoSoto 551cb2d8d2 DebugView: added snapshot tests (#2630)
UI tests for #2567.
2023-06-13 08:54:36 -07:00
NachoSoto ce470442cf debugRevenueCatOverlay improvements (#2594) 2023-06-08 08:37:22 -07:00
NachoSoto 3b53f2426c Introduced debugRevenueCatOverlay(): new SwiftUI debug overlay (#2567)
![simulator_screenshot_DBF551B9-3BA8-440D-9B3F-16DB1D47A0A7](https://github.com/RevenueCat/purchases-ios/assets/685609/af1ddee9-6ae7-4766-9b12-4875416477c6)
2023-06-07 09:16:45 -07:00