Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better logs for promotional offer view #4336

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Oct 2, 2024

  • Improved debug logs for promotional offer view
  • Updated SKConfig file to add a promotional offer
  • Updated SKConfig file storefront to en_US

return .failure(CustomerCenterError.couldNotFindSubscriptionInformation)
}

guard let discount = subscribedProduct.discounts.first(where: {
$0.offerIdentifier == promoOfferDetails.iosOfferId
}) else {
Logger.warning(Strings.could_not_offer_for_active_subscriptions)
Logger.warning(Strings.could_not_offer_for_active_subscriptions(promoOfferDetails.iosOfferId, productIdentifier))
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I'm not sure if these should be warnings or debug... seems like a case that may happen somewhat often if the customer is not eligible by apple? Not a strong opinion though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems like a case that may happen somewhat often if the customer is not eligible by apple?

That will actually fail later, this will fail if the active product's discounts don't match with the promotional offers in the Customer Center config.

I actually think it could be a debug yes, I will change it

"_locale" : "es_ES",
"_storefront" : "ESP",
"_locale" : "en_US",
"_storefront" : "USA",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking but any reason to change the storefront/locale? I'm ok with the change though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is intentional, should've mention it in the description. This was causing the paywalls tester to have a mix of Spanish (subscription name) and English and figured we didn't want that.

@vegaro vegaro merged commit 5c079d7 into main Oct 2, 2024
7 checks passed
@vegaro vegaro deleted the improve-debugging-of-promo-offers branch October 2, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants