Skip to content

Added tests for ReceiptFetcher.receiptData on watchOS and moved to StoreKitWorkarounds#1640

Merged
NachoSoto merged 4 commits into
mainfrom
watch-os-sandbox-receipt-url-tests
Jun 2, 2022
Merged

Added tests for ReceiptFetcher.receiptData on watchOS and moved to StoreKitWorkarounds#1640
NachoSoto merged 4 commits into
mainfrom
watch-os-sandbox-receipt-url-tests

Conversation

@NachoSoto

@NachoSoto NachoSoto commented May 31, 2022

Copy link
Copy Markdown
Contributor

Fixes CSDK-24.
Fix added in #1625.

@NachoSoto NachoSoto requested a review from a team May 31, 2022 23:10

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 test ensures that the logic is only for watchOS.

@taquitos taquitos 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.

🎈🐐

@NachoSoto

Copy link
Copy Markdown
Contributor Author

I'll look at the failures tomorrow.

@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.

Looks awesome!! 🚢

Comment thread Sources/Purchasing/ReceiptFetcher.swift Outdated

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.

[not for this PR] I wonder if it'd make sense to move this one to StoreKitWorkarounds

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.

Oh yeah! Let me do that

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.

Done

@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.

good to go after fixing the URL param for watchOSReceiptURL

Comment thread Sources/Purchasing/ReceiptFetcher.swift Outdated
Comment on lines 65 to 71

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.

pod lib lint caught this:
the receiptURL variable is URL? but watchOSReceiptURL(_:) takes a non-optional URL.
we should update this method to take in an optional URL? or update the callsite to only call it if the receipt URL is not nil.

This wouldn't be caught in Xcode unless you're explicitly building for watchOS targets.
pod lib lint is awesome 🎉

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.

Smart of me to not compile this watchOS fix on watchOS 🤦🏻

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.

Oh dang, good catch!

@NachoSoto NachoSoto force-pushed the watch-os-sandbox-receipt-url-tests branch from eb06b62 to e3f602d Compare June 2, 2022 16:22
@NachoSoto NachoSoto requested a review from aboedo June 2, 2022 16:24
@NachoSoto

NachoSoto commented Jun 2, 2022

Copy link
Copy Markdown
Contributor Author

Does this still look good?

@NachoSoto NachoSoto changed the title Added tests for ReceiptFetcher.receiptData on watchOS Added tests for ReceiptFetcher.receiptData on watchOS and moved to StorekitWorkarounds Jun 2, 2022
@NachoSoto NachoSoto changed the title Added tests for ReceiptFetcher.receiptData on watchOS and moved to StorekitWorkarounds Added tests for ReceiptFetcher.receiptData on watchOS and moved to StoreKitWorkarounds Jun 2, 2022
@NachoSoto

Copy link
Copy Markdown
Contributor Author

iOS 15 tests fail because they timed out.

@NachoSoto NachoSoto merged commit 9b4b24d into main Jun 2, 2022
@NachoSoto NachoSoto deleted the watch-os-sandbox-receipt-url-tests branch June 2, 2022 19:14
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