meta tag in cordova app conflicting with Evothings Workbench
Posted: 03:05, 25 Aug 2015
Not sure if anyone else has observed this behavior, and perhaps it's just my setup, but this has been bothering me for the last two days and I only just finally figured it out fifteen minutes ago.
I have developed a prototype application in Evothings, but need to save data to the device. AFAIK, Evothings does not natively support this. (If I am wrong, please someone, let me know!) Thus, I am rewriting/porting to the cordova framework (which Evothings is built on). Frustratingly, when attempting to use Evothings Workbench to automatically update the app, as per these directions -- Cordova Guide -- whether I used in the config.xml file, or placed a link to directly in the index.html file, or copied the www folder from the cordova project to an Evothings project and opened the index.html file in the Evothings Client, the Client would stay connected while it loaded initially, but in ~8 seconds or so it would disconnect. After hours of [strike]head-banging-related-activities[/strike] debugging, I traced it back to this meta tag automatically inserted into the cordova-generated index.html file:
After commenting out this meta tag, neither the cordova app nor the Evothings client disconnect after loading the app for the first time. Hopefully this helps someone else!
I have developed a prototype application in Evothings, but need to save data to the device. AFAIK, Evothings does not natively support this. (If I am wrong, please someone, let me know!) Thus, I am rewriting/porting to the cordova framework (which Evothings is built on). Frustratingly, when attempting to use Evothings Workbench to automatically update the app, as per these directions -- Cordova Guide -- whether I used
Code: Select all
<content src="http://192.168.x.xx:4042" />
Code: Select all
http://192.168.x.xx:4042
Code: Select all
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
After commenting out this meta tag, neither the cordova app nor the Evothings client disconnect after loading the app for the first time. Hopefully this helps someone else!