I'm developing an app for the iPhone, but I guess the question is the same on the Mac. What is your approach to debug the state of your application after it has been launched by its URL scheme?
Go to the Play store, find the app and view its page. Copy the URL from the browser address bar. Make a note of this as the "Android Fallback URL." You'll see a parameter called "id" followed by an equal sign (=).
Custom URL schemes provide a way to reference resources inside your app. Users tapping a custom URL in an email, for example, launch your app in a specified context. Other apps can also trigger your app to launch with specific context data; for example, a photo library app might display a specified image.
There is a way to debug your application when it is launched from an external URL:
application:handleOpenURL:
or application:didFinishLaunchingWithOptions:
I'm on Xcode 8.2.1 and the fastest way is to simply go to Product -> Edit Scheme and select “Wait for executable to be launched” like the image below. When debugging started, it will not launch the app but "waiting for "THE APP" to launch..". When an action (click on the push notification), the breakpoint will kick in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With