-
Notifications
You must be signed in to change notification settings - Fork 129
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
Referrals: send pass share #2166
Conversation
# Conflicts: # podcasts/en.lproj/Localizable.strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @SergioEstevao works as described.
I just left few comments about the URL which can be replaced by a constant we already have
podcasts/ProfileViewController.swift
Outdated
@@ -500,7 +500,7 @@ class ProfileViewController: PCViewController, UITableViewDataSource, UITableVie | |||
|
|||
@objc private func referralsTapped() { | |||
hideReferralsHint() | |||
let viewModel = ReferralSendPassModel(offerInfo: referralsOfferInfo, | |||
let viewModel = ReferralSendPassModel(offerInfo: referralsOfferInfo, referralURL: URL(string: "https://pocketcasts.com"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we have a Server constant called pocketcastsDotCom
-> ServerConstants.Urls.pocketcastsDotCom
. We use it in few spot like the sharing helper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, but the URL here will be something defined by the server for each user... so this was a temporary use. But I updated it here to use the constant for now.
@danielebogo can you give it another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 📘 Part of: #2083 |
|:---:|
Fixes #
This PR adds the share capability for the Referrals send pass screen.
I initially tried to wrap the UIActivityViewController on an SwiftUI View but was having issues with the presentation using a bottom sheet ( there was always a part of the bottom sheet that didn't get the right color)
I tried to user ShareLink but the functionality is iOS 16 and above only so I needed to replicate it using UIActivityViewController any way.
In the end I'm using the UIActivityViewController in the host VC for the SendPass View. This allow me to proper display it and keep it contained inside the SendPass flow.
To test
Checklist
CHANGELOG.md
if necessary.