Capturing the custom URL

After performing the OAuth exhange, your server will redirect your merchant back to a custom URL that your app will capture. To do that, we'll need to define URL schemes and define a function in your app's AppDelegate.

Your server should not send sensitive information to the client via the custom URL, since multiple iOS apps are able to intercept custom URL schemes.

Broadcasting this event will trigger the braintreeLogin callback you defined earlier in your view's controller. This brings the merchant back into your application and completes the authorization flow.