Git Product home page Git Product logo

Comments (2)

tenbits avatar tenbits commented on June 1, 2024

After some investigations, I noticed that cordova prepare includes for some reason not all plugins to the frontend libraries:
platforms\ios\www\cordova_plugins.js and platforms\ios\www\plugins\*. That is why the codepush bundle miss those plugins and the app is broken. Do somebody knows why cordova adds not all resources to the www/ folder?

In a meanwhile I have fixed this issue, by using after_prepare hook and manually coping the frontend resources from android platform.

config.xml

<platform name="ios">
    <hook type="after_prepare" src="hooks/ios-prepare.js" />

ios-prepare.js

const io = require('atma-io');
io.File.copyTo(
    '/platforms/android/platform_www/cordova_plugins.js',
    '/platforms/ios/www/cordova_plugins.js',
);
io.Directory.copyTo(
    '/platforms/android/platform_www/plugins',
    '/platforms/ios/www/plugins/',
    { verbose: true }
);

Using the moment, I would like to express gratitude to the team - great library and the platform.

from cordova-plugin-code-push.

tenbits avatar tenbits commented on June 1, 2024

Another update

It was a bad idea to copy android frontend plugins to to ios www, as the scripts are different. Our final solution was to extract *.ipa package to the target windows machine, and in after_prepare hook to copy the proper cordova_plugins.js file and plugins/ folder from iOS bundle.

from cordova-plugin-code-push.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.