Skip to content
  • Home
  • University
  • Developers
  • API
  • Releases
  • Status
  • Home
  • University
  • Developers
  • API
  • Releases
  • Status
Home Getting Started Getting Started FAQs Does Heap work well with hybrid mobile frameworks?
Getting Started Installation Administration Define & Analyze Analysis Examples Heap Plays Success Guides Integrations Heap Connect Data Privacy

Table of Contents

Was this article helpful?

Yes No

Thank you for your feedback!

Does Heap work well with hybrid mobile frameworks?

Heap should work with Cordova on iOS. For iOS, you would need to use a cookie manager. You can create your own, or you can use our Electron library.

Cordova apps use UI Web Views, which do not inherently support cookies at this time. For questions, reach out to support@heap.io.

Heap will also work with Android with some slight modifications. For Android, add this line within /android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java:

    CookieManager.setAcceptFileSchemeCookies(true);

To work, setAcceptFileSchemeCookies(true) has to be run before CookieManager is instantiated. For example:

     public SystemCookieManager(WebView webview) {
            webView = webview;
            CookieManager.setAcceptFileSchemeCookies(true);
            cookieManager = CookieManager.getInstance();

            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                cookieManager.setAcceptThirdPartyCookies(webView, true);
            }
        }

If you use Crosswalk, Cordova and Ionic will work on Android if you add this line within platforms/android/src/org/crosswalk/engine/XWalkCordovaCookieManager.java:

      public XWalkCordovaCookieManager() {
            cookieManager = new XWalkCookieManager();      ///forces file cookies
            cookieManager.setAcceptFileSchemeCookies(true);
            }

If you have any questions about your specific use case, please reach out to support@heap.io for help!

Was this article helpful?

Yes No

Thank you for your feedback!

Last updated February 27, 2020.

cordovaelectronhybrid mobile apps install
  • Blog
  • Partners
  • Security
  • Terms
  • About
  • Careers
  • Privacy
  • Contact Us

© 2021 Heap, Inc.