Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.xml branch-config doesnt support multiple associated-domains #277

Closed
djett41 opened this issue Jan 31, 2017 · 7 comments
Closed

config.xml branch-config doesnt support multiple associated-domains #277

djett41 opened this issue Jan 31, 2017 · 7 comments

Comments

@djett41
Copy link

djett41 commented Jan 31, 2017

I have a requirement for multiple deep links and need to add multiple in my config.xml, in which I want multiple intent-filter's to be generated in the AndroidManifest.xml with different schemes/hosts/prefix's.

Currently if I define multiple branch-config elements, only the first one wins, and the entitlements file only shows the first one, as well as only one intent-filter.

This plugin should support multiple branch configuration. Thanks!

@renesansz
Copy link
Contributor

hey @djett41 ,
I'll check on this issue, can you also provide your config.xml content?
Thanks

@djett41
Copy link
Author

djett41 commented Jan 31, 2017

Thanks for the quick reply @renesansz. These are actually different. This issue has to do with the AndroidManifest.xml while the other has to do with the ios .entitlements file.

In my example I would like for my AndroidManifest.xml to have multiple intent-filters

      <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:host="example.lt1" android:scheme="https" android:pathPrefix="/Aaaa"/>
      </intent-filter>

      <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:host="example.lt2" android:scheme="https" android:pathPrefix="/Bbbb"/>
      </intent-filter>

In this case I would want to have a config.xml with the following

    <branch-config>
        <ios-team-id value="{my team id}" />
        <host name="example.lt1" scheme="https" />
        <android-prefix value="/Aaaa" />
    </branch-config>

     <branch-config>
        <ios-team-id value="{my team id}" />
        <host name="example.lt2" scheme="https" />
        <android-prefix value="/Bbbb" />
    </branch-config>

or something that allows me to supply more than one branch config. Currently, the plugin will only add the first one to the AndroidManifest.xml

@ethanneff
Copy link
Contributor

Hello @djett41,

Thank you for reaching out. The android-prefix is only needed if you have a bnc.lt link domain (docs). This is outdated link domain with limited functionality. If you want the full capabilities of Branch and want to do custom configurations, I would recommend updating your bnc.lt link domain to app.link. This can be done in your Branch Dashboard (https://dashboard.branch.io/settings/link).

I will be closing this ticket. Feel free to reach out to Branch Support if you have specific questions regarding your Branch account.

@djett41
Copy link
Author

djett41 commented Feb 1, 2017

@ethanneff Thanks for the quick reply.

We have a bnc.lt domain and an app.link domain. All new links use the app.link, but some old links from bnc.lt are still live. Just to confirm, do we only need to include the bnc.lt link domain in the android-prefix and not the app.link?

@smaspe
Copy link

smaspe commented Mar 17, 2017

@ethanneff why did you close this?

config.xml branch-config doesnt support multiple associated-domains

That is still true, it is not possible to define any other associated domain beside the app.link (which is necessary for any kind of deep-linking inside the application)

@ethanneff
Copy link
Contributor

Hello @smaspe,

You can now have multiple link domains: 0f90b3e

Please update to the latest Branch SDK to take advantage of this update. docs

<!-- sample config.xml -->
<widget id="com.eneff.branch.cordovatestbed" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <!-- Branch -->
  <plugin name="branch-cordova-sdk" spec="~2.4.2" /> <!-- optional spec -->
  <branch-config>
    <branch-key value="key_live_ndqptlgXNE4LHqIahH1WIpbiyFlb62J3" />
    <uri-scheme value="branchcordova" />
    <link-domain value="yourcustomdomain.com" />
    <link-domain value="cordova.app.link" />  <!-- optional previous link domain -->
    <link-domain value="bnc.lt" />  <!-- optional previous link domain -->
    <ios-team-release value="PW4Q8885U7" />
    <ios-team-debug value="FG35JLLMXX" /> <!-- optional -->
    <android-prefix value="/WSuf" /> <!-- optional (for bnc.lt) -->
    <android-testmode value="true" /> <!-- optional (simulate installs) -->
  </branch-config>

Best,

@smaspe
Copy link

smaspe commented Mar 22, 2017

@ethanneff cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants