feat(deep-links): Use posthog-code-dev scheme in dev builds#1780
feat(deep-links): Use posthog-code-dev scheme in dev builds#1780Twixes wants to merge 1 commit intosignals/share-inboxfrom
posthog-code-dev scheme in dev builds#1780Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
65c167c to
665e5d9
Compare
665e5d9 to
15e39c8
Compare
|
@ryans-posthog probably not(?) but maybe related to the issues you were telling me about yesterday |

Problem
In development builds, the app was skipping deep link protocol registration entirely to avoid stealing the
posthog-code://scheme from a production install. This made it impossible to test deep linking as a dev.Changes
Introducing a
posthog-code-devURL scheme for development builds only, defined viagetDeeplinkProtocol(isDevBuild). This function returnsposthog-code-devin dev andposthog-codein production.posthog-code-dev://instead of skipping registration altogether.posthog-code://along with the legacytwig://andarray://schemes.How did you test this?
Updated and added unit tests in
service.test.tscovering:registerProtocolregisters onlyposthog-code-devin dev and all three schemes in production.handleUrlacceptsposthog-code-dev://in dev and rejectsposthog-code://, and vice versa in production.getProtocolreturns the correct scheme per build.