<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Based on the index.html file in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047620#M48616</link>
    <description>&lt;P&gt;Based on the index.html file you are showing, I'm betting that the template you used includes an event called "app.Ready" that indicates that all DOM, legacy and Cordova read events have completed. Trigger on that event before you try to access any Cordova or XDK functions, the underlying native system needs to finish initialization before you can call that stuff.&lt;/P&gt;

&lt;P&gt;If it's the template I'm thinking of, there should be an xdk/init-dev.js file and there might be a js/init-app.js file and js/app.js file. The first generates the app.Ready event. The last two provide examples of how to init your code. Lots of comments in those files.&lt;/P&gt;</description>
    <pubDate>Sat, 14 Mar 2015 00:10:17 GMT</pubDate>
    <dc:creator>PaulF_IntelCorp</dc:creator>
    <dc:date>2015-03-14T00:10:17Z</dc:date>
    <item>
      <title>intel.xdk.cache undefined - Cannot read property 'clearAllCookies' of undefined</title>
      <link>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047618#M48614</link>
      <description>&lt;PRE class="brush:jscript;"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;!--
  * Copyright © 2012-2015, Intel Corporation. All rights reserved.
  * Please see the included README.md file for license terms and conditions.
  --&amp;gt;

    &amp;lt;head&amp;gt;
        &amp;lt;meta charset="UTF-8"&amp;gt;
        &amp;lt;link rel="stylesheet" type="text/css" href="app_framework/2.1/css/af.ui.min.css"&amp;gt;
        &amp;lt;link rel="stylesheet" type="text/css" href="app_framework/2.1/css/icons.min.css"&amp;gt;
        &amp;lt;title&amp;gt;Test App&amp;lt;/title&amp;gt;
        &amp;lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&amp;gt;

        &amp;lt;!--
  * The "meta viewport" tag (below) helps your app size appropriately to a device's ideal viewport.
  * Note that Windows device viewports work better when initialized using the @viewport CSS rule.
  * For a quick overview of "meta viewport" and @viewport, see this article:
  *   &lt;A href="http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag" target="_blank"&gt;http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag&lt;/A&gt;
  * To see how it works, try your app on a real device with and without a "meta viewport" tag.
  * Additional useful references include:
  *   &lt;A href="http://www.quirksmode.org/mobile/viewports.html" target="_blank"&gt;http://www.quirksmode.org/mobile/viewports.html&lt;/A&gt;
  *   &lt;A href="http://www.quirksmode.org/mobile/metaviewport/devices.html" target="_blank"&gt;http://www.quirksmode.org/mobile/metaviewport/devices.html&lt;/A&gt;
  *   &lt;A href="https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html" target="_blank"&gt;https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html&lt;/A&gt;
--&amp;gt;

        &amp;lt;!-- &amp;lt;meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1"&amp;gt; --&amp;gt;
        &amp;lt;meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no"&amp;gt;
        &amp;lt;!-- &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes, minimum-scale=1, maximum-scale=2"&amp;gt; --&amp;gt;

        &amp;lt;style&amp;gt;
            /* following three (cascaded) are equivalent to above three meta viewport statements */
            /* see &lt;A href="http://www.quirksmode.org/blog/archives/2014/05/html5_dev_conf.html" target="_blank"&gt;http://www.quirksmode.org/blog/archives/2014/05/html5_dev_conf.html&lt;/A&gt; */
            /* see &lt;A href="http://dev.w3.org/csswg/css-device-adapt/" target="_blank"&gt;http://dev.w3.org/csswg/css-device-adapt/&lt;/A&gt; */
                @-ms-viewport { width: 100vw ; min-zoom: 100% ; zoom: 100% ; }          @viewport { width: 100vw ; min-zoom: 100% zoom: 100% ; }
                @-ms-viewport { user-zoom: fixed ; min-zoom: 100% ; }                   @viewport { user-zoom: fixed ; min-zoom: 100% ; }
                /*@-ms-viewport { user-zoom: zoom ; min-zoom: 100% ; max-zoom: 200% ; }   @viewport { user-zoom: zoom ; min-zoom: 100% ; max-zoom: 200% ; }*/
        &amp;lt;/style&amp;gt;

        &amp;lt;link rel="stylesheet" href="css/app.css"&amp;gt;
        &amp;lt;link rel="stylesheet" type="text/css" href="css/index_main.less.css" class="main-less"&amp;gt;

        &amp;lt;!-- IMPORTANT: Do not include a weinre script tag as part of your release builds! --&amp;gt;
        &amp;lt;!-- Place your remote debugging (weinre) script URL from the Test tab here, if it does not work below --&amp;gt;
        &amp;lt;!-- &amp;lt;script src="http://debug-software.intel.com/target/target-script-min.js#insertabiglongfunkynumberfromthexdkstesttab"&amp;gt;&amp;lt;/script&amp;gt; --&amp;gt;

        &amp;lt;!-- Recommended location for your JavaScript libraries --&amp;gt;
        &amp;lt;!-- These library references (below) are just examples to give you the general idea... --&amp;gt;
        &amp;lt;!-- &amp;lt;script src="lib/mc/hammer.js"&amp;gt;&amp;lt;/script&amp;gt; --&amp;gt;
        &amp;lt;!-- &amp;lt;script src="lib/ft/fastclick.js"&amp;gt;&amp;lt;/script&amp;gt; --&amp;gt;
        
        &amp;lt;script src="intelxdk.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;!-- phantom library, needed for Intel XDK "legacy" container api calls --&amp;gt;
        
        &amp;lt;script src="xhr.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;!-- phantom library, needed for Intel XDK "legacy" container CORS --&amp;gt;

        &amp;lt;!--
  * cordova.js is a phantom lib for "Cordova HTML5 web app," it does nothing in a "Standard HTML5 web app"
  * Seeing a "Failed to load resource: net::ERR_FILE_NOT_FOUND" message caused by this "cordova.js" script?
  * The cordova.js script is required if you convert your "Standard HTML5" project into a "Cordova" project.
  * You can safely ignore the error or comment out this line if you will not be developing a Cordova app.
--&amp;gt;
        &amp;lt;script src="cordova.js" id="xdkJScordova_"&amp;gt;&amp;lt;/script&amp;gt;

        &amp;lt;script src="js/app.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;!-- for your event code, see README and file comments for details --&amp;gt;
        &amp;lt;script src="js/init-app.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;!-- for your init code, see README and file comments for details --&amp;gt;
        &amp;lt;script src="xdk/init-dev.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;!-- normalizes device and document ready events, see file for details --&amp;gt;
        &amp;lt;!--            
            You may substitute jQuery for the App Framework selector library.
            See &lt;A href="http://app-framework-software.intel.com/documentation.php#afui/afui_jquery" target="_blank"&gt;http://app-framework-software.intel.com/documentation.php#afui/afui_jquery&lt;/A&gt;
        --&amp;gt;
        &amp;lt;script type="application/javascript" src="app_framework/2.1/appframework.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;script type="application/javascript" src="app_framework/2.1/appframework.ui.js" data-ver="1"&amp;gt;&amp;lt;/script&amp;gt;
        
        &amp;lt;script&amp;gt;
            $.ui.autoLaunch = true;
            $.ui.useOSThemes = true;
            $.ui.animateHeaders = false;
        &amp;lt;/script&amp;gt;
        
        &amp;lt;script&amp;gt;
            $.ui.ready(function() {
                alert("start");
                intel.xdk.cache.clearAllCookies();
                alert("1");
                intel.xdk.cache.clearMediaCache();
                alert("2");
                intel.xdk.cache.setCookie("thing123","testthing",-1);
                alert(intel.xdk.cache.getCookie("thing123"));
                alert("end");
            });
        &amp;lt;/script&amp;gt;
    &amp;lt;/head&amp;gt;

    &amp;lt;body id="afui"&amp;gt;

        &amp;lt;!-- IMPORTANT: Do not include a weinre script tag as part of your release builds! --&amp;gt;
        &amp;lt;!-- Place your remote debugging (weinre) script URL from the Test tab here, if it does not work above --&amp;gt;
        &amp;lt;!-- &amp;lt;script src="http://debug-software.intel.com/target/target-script-min.js#insertabiglongfunkynumberfromthexdkstesttab"&amp;gt;&amp;lt;/script&amp;gt; --&amp;gt;
        &amp;lt;div id="content" class="uwrap"&amp;gt;
            &amp;lt;div class="upage vertical-col left panel" id="mainpage" data-header="none" data-footer="none"&amp;gt;&amp;lt;a class="button widget uib_w_1 d-margins" data-uib="app_framework/button" data-ver="1"&amp;gt;Ceci n'est pas une button&amp;lt;/a&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/PRE&gt;

&lt;P&gt;When I run this app in debug, "start" is displayed, but "1" is not. I get this error&lt;/P&gt;

&lt;P&gt;Uncaught TypeError: Cannot read property 'clearAllCookies' of undefined&amp;nbsp;&lt;/P&gt;

&lt;P&gt;In the plugin settings, I have Cordova Device, Globalization, and Splashscreen, as well as XDK Cache and Device enabled.&lt;/P&gt;

&lt;P&gt;Help would be very much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 04:11:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047618#M48614</guid>
      <dc:creator>Daniel_B_3</dc:creator>
      <dc:date>2015-03-12T04:11:48Z</dc:date>
    </item>
    <item>
      <title>intel.xdk.device is also null</title>
      <link>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047619#M48615</link>
      <description>&lt;P&gt;intel.xdk.device is also null&lt;/P&gt;

&lt;P&gt;Truly stumped.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Solved. Disabled autolaunch and added this&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;        &amp;lt;script type="text/javascript" language="javascript"&amp;gt;
            document.addEventListener("deviceready", onDeviceReady, false);
            function onDeviceReady() {
                setTimeout(function () {
                    $.ui.launch();
                }, 50);
            }
        &amp;lt;/script&amp;gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 05:42:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047619#M48615</guid>
      <dc:creator>Daniel_B_3</dc:creator>
      <dc:date>2015-03-12T05:42:00Z</dc:date>
    </item>
    <item>
      <title>Based on the index.html file</title>
      <link>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047620#M48616</link>
      <description>&lt;P&gt;Based on the index.html file you are showing, I'm betting that the template you used includes an event called "app.Ready" that indicates that all DOM, legacy and Cordova read events have completed. Trigger on that event before you try to access any Cordova or XDK functions, the underlying native system needs to finish initialization before you can call that stuff.&lt;/P&gt;

&lt;P&gt;If it's the template I'm thinking of, there should be an xdk/init-dev.js file and there might be a js/init-app.js file and js/app.js file. The first generates the app.Ready event. The last two provide examples of how to init your code. Lots of comments in those files.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2015 00:10:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/intel-xdk-cache-undefined-Cannot-read-property-clearAllCookies/m-p/1047620#M48616</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2015-03-14T00:10:17Z</dc:date>
    </item>
  </channel>
</rss>

