Skip to content

Conversation

richherrera
Copy link
Contributor

@richherrera richherrera commented Mar 24, 2025

Summary of changes

Pop-up Bridge Revamp

Checklist

  • [ ] Added a changelog entry

Authors

richherrera and others added 13 commits February 4, 2025 11:52
* Bump up to swift  5.10

* Update workflows to use xCode 16

* Update README

* Add v3 Migration guide

* Add CHANGELOG entry

* Fix workflow xcode path
* Convert Objc classes into Swift classes

* Remove blank space
* Convert POPViewController to Swift

* Rename ViewController

* Address PR comments
* Update package.swift

* Update podfile

* Update pbxproj s

* Update popspec

* Change deployment target to 16.0

* Add CHANGELOG entry

* Update README

* Update migration guide

* Rever podfile changes

* Bump deployment target to ios 16

* Update SPM demo test example
* Add prefersEphemeralWebBrowserSession property to WebAuthenticationSession

* Add prefersEphemeralWebBrowserSession to the POPPopupBridge initializer

* Add CHANGELOG entry
* Add FPTIBatchData structure

* Keys sorted by name

* Add Bundle extension to expose BundleShortVersion

* Define clientSDKVersion tag
* Update UTs to compare dictionaries instead of strings

* Update UI Tests timeout to 10
* Add FPTIBatchData structure

* Keys sorted by name

* Add Bundle extension to expose BundleShortVersion

* Define clientSDKVersion tag

* Add PopupBridgeAnalytics enum
* Add venmo scheme to the allowlist in info.plist.

* Add URLOpenet protocol and uiapplication extension

* Add Venmo installed validation and pass it to the user script.

* Add docstring

* Use internal instead of static

* Remove bool description

* Update CHANGELOG

* Update README

* Update V3 migration guide
* Change FPTIBatchData structure

* Add NetworkClient and AnalyticsServices files

* Add Sessionable and NetworkError files

* Add Network errors

* Add Sessionable Protocol and Extension

* Sort files

* Add NetworkClient

* Implement AnalyticsService class

* Add Private Mark

* Add necessary files (TestPlan, mock files and UT files)

* Setup Test Plan

* Create MockSession class and NonEncodable structure

* Add NetworkClient tests

* Create MockNetworkClient class

* Sort files

* Add missing blank space

* Add UTs to test success and failures

* Remove iOS 15 validation

* Add analytics calls

* Set sessionID value

* Add AnalyticsService property

* Add MockAnalyticsService

* Fix PopupBridge tests adding mock

* Increase time interval

* Add MockAnalyticsService

* Add PopupBrdige UTs

* Strongly type FPTIBatchData

* Add catch block

* Update Sources/PopupBridge/FPTIBatchData.swift

Co-authored-by: Jax DesMarais-Leder <jdesmarais@paypal.com>

* Add analytics folder

* Remove test plan

* Address feedback

* Sort files

---------

Co-authored-by: Jax DesMarais-Leder <jdesmarais@paypal.com>
* Use weak self in closure

* Remove scriptHandlers

* Add WebViewScriptHandler

* Avoid retain cycle using WebViewScriptHandler

* Fix UTs

* Add assert memory leak

* Add trackForMemoryLeaks method

* Fix file

* Add test
@richherrera richherrera self-assigned this Mar 24, 2025
@richherrera richherrera requested a review from a team as a code owner March 24, 2025 17:03
@richherrera richherrera marked this pull request as draft March 24, 2025 17:04
* Update README

* Fix typo

* Add brackets

* Update README

* Add Venmo and PayPal examples

* Update PayPal SDK reference
@richherrera richherrera marked this pull request as ready for review March 31, 2025 15:09
Comment on lines +41 to +47
You must add the following to the queries schemes allowlist in your app's info.plist:

``` xml
<key>LSApplicationQueriesSchemes</key>
<array>
<string>com.venmo.touch.v2</string>
</array>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this only required for Venmo integrations or any popup bridge use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

only required for Venmo

README.md Outdated
Comment on lines 156 to 167
// if popup bridge is detected, we set the deepLinkReturnUrl param
// so that the Venmo app knows to app switch back to the app hosting
// the webview, instead of the url inside of the webview
createOptions.deepLinkReturnUrl = window.popupBridge.getReturnUrlPrefix();

// the Braintree SDK is waiting for the hash in the url to change,
// normally the Venmo app switches back to the window and updates
// the hash along with it, but since we're instructing Venmo to
// return to the app that _hosts_ the webview via the specified
// deep link return url, we have to manually update the hash of
// the webview's url with the hash popup bridge receives from
// the Venmo app upon completion
Copy link
Contributor

Choose a reason for hiding this comment

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

The comments here are helpful for us but they seem like leaking internal functionality to be part of public README. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right, updated: ac63134 what do you think?

Co-authored-by: Sarah Koop <skoop@paypal.com>
Comment on lines +293 to +294
| 3.x.x | Active | April 2025 | TBA | TBA |
| 2.x.x | Inactive | October 2023 | April 2025 | April 2026 |
Copy link
Contributor

Choose a reason for hiding this comment

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

If we plan to release today should these be March?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could wait until tomorrow when it's April 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

April from previous comment: #77 (comment)

richherrera and others added 2 commits March 31, 2025 10:07
Co-authored-by: Sarah Koop <skoop@paypal.com>
@richherrera richherrera merged commit 26a37cd into main Apr 1, 2025
4 checks passed
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.

3 participants