-
Notifications
You must be signed in to change notification settings - Fork 145
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
ios trying to load branch.js instead of build.min.js #38
Comments
Also, these two script tags are in the head of the generated index.html: <head>
...
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="branch" src="soschat-client/branch.js"></script>
...
<script src="file:///var/mobile/Containers/Bundle/Application/D0E381E2-9A91-4A9E-9182-A3CF0298F011/VeociDEV.app/www/plugins/io.branch.sdk/dist/build.min.js"></script>
...
</head> |
I'm using Phonegap build and including the plugin via npm in the config file. I am also using require to load the scripts. It seems like there is some sort of conflict with the cordova.require the plugin uses to load build.min.js or something. If I include an empty branch.js file in the source folder, it'll load but then I will see a require error loading backbone.js. It looks like something is colliding with "_". As stated above, this works with android perfectly. I was able to install/build with the plugin and am running. |
Hey team - this is probably due to some complexity around how our current cordova module uses the web SDK as a base library. When I get some time this weekend, we're about to merge a new repo that's a light wrapper around our core platform SDKs. https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/tree/project-restructure The readme needs some cleanup, but if you're feeling brave, this should definitely address the issue. I likely won't be trying to patch this bug in the older module as we're going to migrate to the newer one soon. Will leave this open until we run the official migration. |
Thanks for the response. I suspected it was something like that. I was afraid that we were doing something non-standard with require that was causing the namespace collisions. It's weird to me that no one has seen this before though. I guess no one is using the latest version of cordova with requirejs? Not sure if that info helps. Any timetable for the official migration? |
Yea - it is strange. I bet no one paid that much attention.. The new wrapper is ready. I just need to verify README and update our official dev docs. It's more when I have time since we're a bit short on Cordova engineers. I'd estimate 7 days or so until I can find the time to do it. As part of the migration, the plan is to keep the original repo active and just do it slowly as the interface has changed substantially. For example, we use promises in the new version compared with the simple callbacks as we've tried to adapt to common practice. |
Yeah, I saw that. Looks good. Are you planning to increment the version on npm in that timeframe as well? |
Probably as a big version increase (2.0). I'm slightly worried about not properly being able to message people if they don't have the module pinned. |
Great. Looking forward to getting my hands on the production ready stuff. Thanks for all your work. |
Hey any update on this yet? |
Waiting on some tweaks to the library by the dev team but I'm hoping to merge this week. Sorry about the delay :( |
No worries about the delay. I noticed in the official docs you seem to have merged 2.0 on Saturday. It doesn't seem like it has been published to npm yet though. Any idea when that will happen? |
Hi all - v2.0 is released on this repo and NPM. This should be resolved at this point. Please leave feedback on the new module and we'll hop right on it! |
First and foremeost branch.io is awesome. It's making my life so much easier.
However, for ios (android is working fine) I have a phonegap plugin loading the cordova branch.io sdk through npm; when the application runs it seems to be attempting to load branch.js which doesn't exist in the loaded scripts. There is, however, a build.min.js in the available resources.
Here's the console error:
[Error] Failed to load resource: The requested URL was not found on this server. (branch.js, line 0)
A screenshot of the resources from safari remote debugger:
And
window.branch
is an empty object.note: being built with phonegap
The text was updated successfully, but these errors were encountered: