NachoSoto

NachoSoto

Software Engineer and Airline Pilot

Member Since 11 years ago

San Francisco, California

Experience Points
443
follower
Lessons Completed
98
follow
Lessons Completed
780
stars
Best Reply Awards
95
repos

2610 contributions in the last year

Pinned
⚡ Streams of values over time
⚡ UIImageView for rendering data asynchronously, with composable renderers and caches
Activity
May
20
1 day ago
push

NachoSoto push RevenueCat/purchases-ios

NachoSoto
NachoSoto

PurchasesOrchestrator: removed lazy hack for properties with @available

Fixes [CF-682], and probably #1528. Looks like possibly something was broken demangling lazy properties with @available in iOS 15.0 (per the 2 bug reports).

This changes the approach to simply having Any? as the value, and making the exposed @available property a derived one.

commit sha: 68378e2316d579a2ce1b38d64e98569a82668633

push time in 10 hours ago
pull request

NachoSoto pull request RevenueCat/purchases-ios

NachoSoto
NachoSoto

`PurchasesOrchestrator`: removed `lazy` hack for properties with `@available`

Fixes [CF-682], and probably #1528. Looks like possibly something was broken demangling lazy properties with @available in iOS 15.0 (per the 2 bug reports).

This changes the approach to simply having Any? as the value, and making the exposed @available property a derived one.

Activity icon
created branch

NachoSoto in RevenueCat/purchases-ios create branch lazy-var-workaround-2

createdAt 10 hours ago
push

NachoSoto push RevenueCat/purchases-ios

NachoSoto
NachoSoto

Added String.asData to avoid dealing with Data? (#1566)

Turns out Data(string.utf8) is a much simpler way of converting String to Data that doesn't lead to an Optional. UTF-8 can represent all valid Unicode code points, so this was always safe, but now we know at compile time.

The reason the old variant returned an Optional is because it accepts other encodings like .ascii which might not be able to represent everything in the String.

This simplifies several parts of the code that were dealing with an error that was impossible.

commit sha: a634e493f165211c79a7ac893b7b571de64d4711

push time in 10 hours ago
Activity icon
delete

NachoSoto in RevenueCat/purchases-ios delete branch string-as-data

deleted time in 10 hours ago
pull request

NachoSoto pull request RevenueCat/purchases-ios

NachoSoto
NachoSoto

Added `String.asData` to avoid dealing with `Data?`

Turns out Data(string.utf8) is a much simpler way of converting String to Data that doesn't lead to an Optional. UTF-8 can represent all valid Unicode code points, so this was always safe, but now we know at compile time.

The reason the old variant returned an Optional is because it accepts other encodings like .ascii which might not be able to represent everything in the String.

This simplifies several parts of the code that were dealing with an error that was impossible.

pull request

NachoSoto pull request RevenueCat/purchases-ios

NachoSoto
NachoSoto

`PurchasesOrchestrator`: don't listen for StoreKit 2 transactions if it's disabled

I tried adding tests for this, but because the listener is created internally, there is no time to override it with the mock before verifying if listenForTransactions is called.

Will at least prevent #1528 if SK2 is disabled.

push

NachoSoto push RevenueCat/purchases-ios

NachoSoto
NachoSoto

PurchasesOrchestrator: don't listen for StoreKit 2 transactions if it's disabled

I tried adding tests for this, but because the listener is created internally, there is no time to override it with the mock before verifying if listenForTransactions is called.

commit sha: b5af2c1436e19b38173d1389c0e9a5c7241d0b6b

push time in 10 hours ago
Activity icon
created branch

NachoSoto in RevenueCat/purchases-ios create branch lazy-var-workaround

createdAt 10 hours ago
Activity icon
delete

NachoSoto in RevenueCat/purchases-ios delete branch api-key-warnings

deleted time in 11 hours ago
pull request

NachoSoto pull request RevenueCat/purchases-ios

NachoSoto
NachoSoto

Validate API key

iOS part of CF-53.

TODO:

  • Add short version of URL.
open pull request

NachoSoto wants to merge RevenueCat/purchases-ios

NachoSoto
NachoSoto

Validate API key

iOS part of CF-53.

TODO:

  • Add short version of URL.
pull request

NachoSoto merge to RevenueCat/purchases-ios

NachoSoto
NachoSoto

Validate API key

iOS part of CF-53.

TODO:

  • Add short version of URL.
Activity icon
delete

NachoSoto in RevenueCat/purchases-ios delete branch http-client-sandbox-header

deleted time in 11 hours ago
pull request

NachoSoto pull request RevenueCat/purchases-ios

NachoSoto
NachoSoto

`HTTPClient`: added `X-Is-Sandbox` header

Fixes CF-649.

push

NachoSoto push RevenueCat/purchases-ios

NachoSoto
NachoSoto

HTTPClient: added X-Is-Sandbox header (#1582)

Fixes CF-649.

commit sha: 4ee86185c6e7855507b428e8ed271e0249213440

push time in 11 hours ago
pull request

NachoSoto merge to RevenueCat/purchases-ios

NachoSoto
NachoSoto

`HTTPClient`: added `X-Is-Sandbox` header

Fixes CF-649.

open pull request

NachoSoto wants to merge RevenueCat/purchases-ios

NachoSoto
NachoSoto

`HTTPClient`: added `X-Is-Sandbox` header

Fixes CF-649.

push

NachoSoto push RevenueCat/purchases-ios

NachoSoto
NachoSoto

Prepare the codebase to listen to the Storefront changes (1/4) (#1557)

  • Listen changes via paymentQueueDidChangeStorefront method

  • Create StoreKit2StorefrontListener.swift to listen to Storefront changes for SK2

  • Update PurchasesOrchestrator to listen to the Storefront changes

  • Include StoreKit2StorefrontListenerTests in StoreKitTests Co-authored-by: NachoSoto [email protected]

  • Remove force unwrap

Co-authored-by: NachoSoto [email protected]

  • Add required spaces

Co-authored-by: NachoSoto [email protected]

  • Remove useless cancel method when the listener is released
  • Notify Storefront changes in the main thread
  • Add cancel task when the Listener is released

Co-authored-by: NachoSoto [email protected]

NachoSoto
NachoSoto

updated the description of storetransaction (#1584)

NachoSoto
NachoSoto

Update willRenew comment - will be false for lifetime (#1579)

NachoSoto
NachoSoto

CF-527 - Auto generate release changelog (#1585)

  • Auto generate changelog from diff and get PR titles and creator

  • Getting last tag version to get diff from

  • The final version

  • Remove empty lane and error if no generated content

  • And update fastlane

NachoSoto
NachoSoto

Add AmazonStore to Store enum

NachoSoto
NachoSoto

Rename AmazonStore to Amazon to match Android SDK naming conventions

NachoSoto
NachoSoto

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.

NachoSoto
NachoSoto

Configuration.builder.with(usesStoreKit2IfAvailable:): fixed docstring (#1590)

NachoSoto
NachoSoto

HTTPClient: added X-Is-Sandbox header

Fixes [CF-649]

NachoSoto
NachoSoto

Simplified Bool -> String conversion

commit sha: 9e974bbc057cefa81fd9afb2d3817c3643cb689d

push time in 11 hours ago
open pull request

NachoSoto wants to merge RevenueCat/purchases-hybrid-common

NachoSoto
NachoSoto

Fix: auto release iOS

Auto release for iOS failed for a few reasons:

  • the API tester was using Cocoapods to get the actual PurchasesHybridCommon.framework, which was a leftover from a complicated intermediate setup during the swift migration. I updated it so that it uses the project from xcode instead. This also means that you don't need to call pod install when modifying the API in order to test the API tester, which was annoying.
  • with the API tester fixed, carthage would still complain because it was trying to build multiple slices and the whole fun apple silicon incompatibility thing, which annoyed me so I killed Carthage with fire. I replaced it with fastlane gym.
pull request

NachoSoto merge to RevenueCat/purchases-hybrid-common

NachoSoto
NachoSoto

Fix: auto release iOS

Auto release for iOS failed for a few reasons:

  • the API tester was using Cocoapods to get the actual PurchasesHybridCommon.framework, which was a leftover from a complicated intermediate setup during the swift migration. I updated it so that it uses the project from xcode instead. This also means that you don't need to call pod install when modifying the API in order to test the API tester, which was annoying.
  • with the API tester fixed, carthage would still complain because it was trying to build multiple slices and the whole fun apple silicon incompatibility thing, which annoyed me so I killed Carthage with fire. I replaced it with fastlane gym.
NachoSoto
NachoSoto

Seems reasonable 👍🏻

pull request

NachoSoto merge to RevenueCat/purchases-hybrid-common

NachoSoto
NachoSoto

Fix: auto release iOS

Auto release for iOS failed for a few reasons:

  • the API tester was using Cocoapods to get the actual PurchasesHybridCommon.framework, which was a leftover from a complicated intermediate setup during the swift migration. I updated it so that it uses the project from xcode instead. This also means that you don't need to call pod install when modifying the API in order to test the API tester, which was annoying.
  • with the API tester fixed, carthage would still complain because it was trying to build multiple slices and the whole fun apple silicon incompatibility thing, which annoyed me so I killed Carthage with fire. I replaced it with fastlane gym.
NachoSoto
NachoSoto

Seems reasonable 👍🏻

Activity icon
issue

NachoSoto issue comment RevenueCat/purchases-ios

NachoSoto
NachoSoto

Validate API key

iOS part of CF-53.

TODO:

  • Add short version of URL.
NachoSoto
NachoSoto

This is ready, just waiting to update the URL with a short link.

open pull request

NachoSoto wants to merge RevenueCat/purchases-ios

NachoSoto
NachoSoto

WIP [CF-553] Post AdServices token

Posts the AdServices token to the backend.

opening this for review as the code shouldn't have to change, but i do still need to do a manual test after a minor backend change.

also pending: unsure why 6 snapshots were created. working with nacho on that.

but otherwise this is ready for review

NachoSoto
NachoSoto

I wonder if this was just a bad test run with a previous change. @beylmk I recommend removing the entire __Snapshots__ directory and running the tests again. I'm doing that locally (even on iOS 12) and I don't reproduce the issue, it's only making the appropriate number of requests now.

pull request

NachoSoto merge to RevenueCat/purchases-ios

NachoSoto
NachoSoto

WIP [CF-553] Post AdServices token

Posts the AdServices token to the backend.

opening this for review as the code shouldn't have to change, but i do still need to do a manual test after a minor backend change.

also pending: unsure why 6 snapshots were created. working with nacho on that.

but otherwise this is ready for review

open pull request

NachoSoto wants to merge RevenueCat/purchases-ios

NachoSoto
NachoSoto

Allow CircleCI to generate new test snapshots

Depends on https://github.com/RevenueCat/purchases-ios/pull/1589

Motivation

Our snapshot testing sometimes needs regeneration and it requires regeneration of iOS 12. iOS 12 simulators only run on Intel machines and not all of us have them.

This PR will allow a CircleCI job to be manually triggered to regenerate snapshot tests

Description

Step 1: Trigger CircleCI workflow

Run bundle exec fastlane generate_snapshots

Step 2: Run CircleCI workflow with generate snapshots

This will start a series of jobs on CircleCI that will have the CIRCLECI_TESTS_GENERATE_SNAPSHOTS set to true that will regenerate new/updated snapshot test assets.

Screen Shot 2022-05-12 at 9 02 43 PM

Step 3: Create pull requests

If there are any files changed, a new PR will be created against the base branch (set earlier in the generate_snapshots lane)

Example PR 👉 https://github.com/RevenueCat/purchases-ios/pull/1578

Screen Shot 2022-05-12 at 8 57 46 PM
pull request

NachoSoto merge to RevenueCat/purchases-ios

NachoSoto
NachoSoto

Allow CircleCI to generate new test snapshots

Depends on https://github.com/RevenueCat/purchases-ios/pull/1589

Motivation

Our snapshot testing sometimes needs regeneration and it requires regeneration of iOS 12. iOS 12 simulators only run on Intel machines and not all of us have them.

This PR will allow a CircleCI job to be manually triggered to regenerate snapshot tests

Description

Step 1: Trigger CircleCI workflow

Run bundle exec fastlane generate_snapshots

Step 2: Run CircleCI workflow with generate snapshots

This will start a series of jobs on CircleCI that will have the CIRCLECI_TESTS_GENERATE_SNAPSHOTS set to true that will regenerate new/updated snapshot test assets.

Screen Shot 2022-05-12 at 9 02 43 PM

Step 3: Create pull requests

If there are any files changed, a new PR will be created against the base branch (set earlier in the generate_snapshots lane)

Example PR 👉 https://github.com/RevenueCat/purchases-ios/pull/1578

Screen Shot 2022-05-12 at 8 57 46 PM
Previous