Add BTAppContextSwitcher.setReturnURLScheme
func missing from v5 conversion
#1077
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
We got an inbound about this function missing when using our V6 SDK from a Swift app
Changes
setReturnURLScheme
func, like we had in V5sharedInstance
directlyDiscussion
What used to be static in V5 (which is all of the public methods on BTAppContextSwitcher) are class methods in V6. So currently in V6, merchants need to call these functions like this:
BTAppContextSwitcher.sharedInstance().handleOpenURL(context: UIOpenURLContext)
orBTAppContextSwitcher.sharedInstance.handleOpenURL(URL)
.I am guessing this was not intentional, since it isn't capture in our migration guide?
IMO merchants should not have access to
sharedInstance
and all methods onBTAppContextSwitcher
should be static.If folks agree, we'll have to decide how we want to proceed. A few options:
sharedInstance
& convert methods back to static (most generous)sharedInstance
property + add new static methods that merchants should useChecklist
Authors
@scannillo