0
votes

I have a Cordova-based mobile app. Currently I'm preparing new version for iOS 9 and I've encountered strange situation. In this app I have Backbone 1.2.3. Every collection I have is messed up. In Safari WebInspector I can see all methods (both Backbone and Underscore), but when I try to run one (e.g. toJSON or filter) it returns an empty array. So it's breaking my app :( I've checked the app on Android (Nexus 5 with 5.1.1 system version) and it all runs ok. Same thing on iOS 8.3 - everything is good.

What's going on? Is this iOS9 UIWebView bug or something?

1
You are pulling in data from an http source into your collection?area28
@area28 yes, I am fetching data.Łukasz Ksawery Rozbicki

1 Answers

0
votes

Not quite sure what you encountered. But as far as I know there is a bug on backbone when you intend to change the location hash or location href, the changes are not immediate.

This issue might be caused by Event loop. If you change the location.hash rapidly somewhere in your code, that might be the same issue.

To solve that, try to do this

window.setTimeout(function () {
    //your updating url code or fetching data code
    updateUrl();
}, 0);