Skip to content

Custom Entitlement Computation: disabled unnecessary APIs#2442

Merged
NachoSoto merged 3 commits into
mainfrom
custom-entitlement-disabled-api
Apr 26, 2023
Merged

Custom Entitlement Computation: disabled unnecessary APIs#2442
NachoSoto merged 3 commits into
mainfrom
custom-entitlement-disabled-api

Conversation

@NachoSoto

@NachoSoto NachoSoto commented Apr 25, 2023

Copy link
Copy Markdown
Contributor

Disabled API:

  • getCustomerInfo
  • logIn
  • logOut
  • Purchases.attribution
  • syncPurchases
  • restorePurchases
  • Trial eligibility
  • Promotional purchases
  • async counterparts

@NachoSoto NachoSoto requested a review from a team April 25, 2023 20:22
@NachoSoto NachoSoto force-pushed the spm-custom-entitlements branch from c96ddc6 to da51d52 Compare April 25, 2023 20:22
@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch from 45895ca to 2ff5221 Compare April 25, 2023 20:22

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We know this at compile time now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch 2 times, most recently from 71ad769 to a4f87e7 Compare April 25, 2023 20:51
@NachoSoto NachoSoto force-pushed the spm-custom-entitlements branch from 63c9a6c to 9c406cd Compare April 25, 2023 20:56
@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch from a70e30d to cca5cc3 Compare April 25, 2023 20:57
Base automatically changed from spm-custom-entitlements to main April 25, 2023 22:12
@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch from 0979a4d to 9c9b13d Compare April 25, 2023 22:22

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't happen anymore.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@NachoSoto

Copy link
Copy Markdown
Contributor Author

I want to make sure the new SPM installation test is still working with this (since the job only runs on release branches)

@aboedo aboedo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only thing is enabling getOfferings

Comment on lines 1385 to 1425

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably group this one and the one for (self as DeprecatedSearchAdsAttribution).postAppleSearchAddsAttributionCollectionIfNeeded() a few lines above into one, since this method is only called from there, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also called from applicationWillResignActive.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOfferings didn't make the cut here but it should be enabled

@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch from 9c9b13d to 74333a2 Compare April 26, 2023 06:13
@NachoSoto

Copy link
Copy Markdown
Contributor Author

Updated to enable getOfferings.

@NachoSoto NachoSoto requested a review from aboedo April 26, 2023 06:17
@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch from f6764ff to c86c222 Compare April 26, 2023 06:17
@NachoSoto NachoSoto force-pushed the custom-entitlement-disabled-api branch from c86c222 to c327bf3 Compare April 26, 2023 06:34

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have separate API tests for the new package? To make sure the APIs we are exposing there don't change. I guess that can be done in a different PR though.

}
}

#endif

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It reads a bit strange that this endif is not indented at the same level as the following line... NABD though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the default indentation by Xcode is even worse, it always moves # lines to the very left.

@NachoSoto

Copy link
Copy Markdown
Contributor Author

Should we have separate API tests for the new package?

I'm going to do that today in a separate PR, but that doesn't have to block the release.

@NachoSoto

Copy link
Copy Markdown
Contributor Author

TODO: also hide purchase with promotional offer methods /cc @aboedo

@tonidero

Copy link
Copy Markdown
Contributor

Hid the promotional offer purchase methods in #2448

…ge (#2448)

### Description
This will remove the `promotionaOffer` purchase methods from the API in
the custom entitlement computation package
@NachoSoto NachoSoto enabled auto-merge (squash) April 26, 2023 16:08
@NachoSoto NachoSoto disabled auto-merge April 26, 2023 16:08
@NachoSoto NachoSoto changed the title Custom Entitlement Computation: disabled authentication and attribution API Custom Entitlement Computation: disabled unnecessary APIs Apr 26, 2023
@NachoSoto NachoSoto enabled auto-merge (squash) April 26, 2023 16:08
…rInfoStream (#2446)

fixes resubscribes to customerInfoStream in the
CustomEntitlementsComputation sample app

@aboedo aboedo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should re-enable restore and sync purchases before shipping, but it can be a separate PR

Comment on lines +231 to 232
#if !ENABLE_CUSTOM_ENTITLEMENT_COMPUTATION
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.2, *)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch on this one

@NachoSoto NachoSoto merged commit 4a74d33 into main Apr 26, 2023
@NachoSoto NachoSoto deleted the custom-entitlement-disabled-api branch April 26, 2023 17:51
@NachoSoto

Copy link
Copy Markdown
Contributor Author

Not I was gonna do it here haha, I forgot I had the auto merge.

NachoSoto added a commit that referenced this pull request Apr 26, 2023
NachoSoto added a commit that referenced this pull request Apr 26, 2023
NachoSoto added a commit that referenced this pull request Apr 26, 2023
## Disabled API:

- `getCustomerInfo`
- `logIn`
- `logOut`
- `Purchases.attribution`
- `syncPurchases`
- `restorePurchases`
- Trial eligibility
- Promotional purchases
- `async` counterparts

---------

Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
NachoSoto added a commit that referenced this pull request Apr 26, 2023
NachoSoto added a commit that referenced this pull request Jul 14, 2023
For some reason the existing command was failing, but CI was ignoring that failure.
This moves the job to our `Fastfile`, and fixes compilation.

That API was removed in #2442.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants