viezel / NappUI

A collection of extended functionality for the UI components of Titanium SDK
Other
121 stars 34 forks source link

NappUI breaking Leaflet #28

Open timanrebel opened 11 years ago

timanrebel commented 11 years ago

For Snowciety we use Leaflet as our map client running inside a web view. Last week, Leaflet stopped working and it took me 1,5 days to figure out why. Including the NappUI module via tiapp.xml breaks it.

I haven't got the time to create a test case app, but was wondering if you do anything to the web view by default? Will try to create a test to prove this issue asap.

viezel commented 11 years ago

Hi @timanrebel, hmm thats not good. I only got some PRs regarding webview, so im not really sure. I took at look at the code, and this is for sure something that could conflict: https://github.com/viezel/NappUI/blob/master/Classes/TiUIWebView%2BExtend.m#L72-L120

timanrebel commented 11 years ago

Hi @viezel, Was looking at that piece of code as well, but couldn't figure out why adding headers (which I don't set, so only 'x-adp-app') would break stuff. But the second invocation does a lot more and it might not be Leaflet, but the fact that we are loading local html instead of remote.

Ti.API.info breaks as well, so it might even be that Ti thinks that the html is remote instead of local and thus does not allow for Ti calls.

dezinezync commented 11 years ago

@timanrebel if you're not using the UIWebView features from the module, I'd recommned deleting the header and implementation files and then building and using the module in your project.

The pointed out implementation does seem hacky, and not in a good way. I tried the above and turns out, it crashes the app upon simply loading a url with a badfood error. :/