GithubHelp home page GithubHelp logo

ionic-package-hooks's People

Contributors

alongendler avatar danielsogl avatar daruwanov avatar imhoffd avatar just-ghali avatar petetnt avatar rolandjitsu avatar vlavrynovych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-package-hooks's Issues

how to get different resolutions and different file names in the drawable- folders for custom resources

Hi,

regarding android_custom_resources.js, how should I name the several custom icon file that I put in the resources/android/custom folder so that they go to the right drawable-* folder ?

I am working with OneSignal notifications, as you can see here they mention several size for the icons files.
Or maybe do I have to only use one format and this hook takes care of degrading the file to other resolutions ?

I tried to put all the drawable-* folders containing their respective custom icon to resources/android/custom but it doesn't work with ionic package...

Thanks

Script file does't exist and will be skipped

I'm having trouble running the hooks.

Am I doing something wrong?

Script file does't exist and will be skipped: /home/package/workspace/ionic_dash-857a12a1-41/cordova/package-hooks/009_remove_values.js
Script file does't exist and will be skipped: /home/package/workspace/ionic_dash-857a12a1-41/cordova/package-hooks/010_add_platform_class.js
Script file does't exist and will be skipped: /home/package/workspace/ionic_dash-857a12a1-41/cordova/package-hooks/011_change_api_url.js
Script file does't exist and will be skipped: /home/package/workspace/ionic_dash-857a12a1-41/cordova/package-hooks/012_remove_script_index.js

Proposal for new script to be added to this repo: update_platform_config.js

We need to be able to add values to LSApplicationQueriesSchemes. We were previously doing this by using this script https://gist.github.com/marcocarnazzo/6f01a57d390e8fe3071f . It basically allows for you to put in your config.xml something like

twitter

and then after the hook runs it would have updated your plist file and appended the following:

LSApplicationQueriesSchemes

dps.f1f0ea0e-c7fc-484e-a577-b96ae276e380

This is a major issue for us because we need to be able to add QuerySchemes so we can check if an app is installed on a device.

Implementation question

Hi,

I would like to clarify something (got a bit confused in the readme):

Any file (hook) in the root of this repo could be used as a hook during ionic package? using the following:
<hook type="after_prepare" src="package-hooks/<hook_file_name>" />
Without adding any file to my local (development) repository?

So, if I require to run a hook to solve a particular problem, I should submit it as a hook file in a PR to this repo?

Thanks!

EDIT: Also, how can we confirm if a package hook ran during ionic package or not?

JS hooks included in config.xml file need to be implemented as node modules.

Not sure if this is just because of my local versions of cordova and ionic-cli, but any javascript hook called out in the config.xml file must be configured as a node module (as seen here). I noticed this after attempting to integrate android_ignore_translation_errors.js into my actual project. It failed but locally and with ionic package build android -p ### --release. It's hard to confirm that the ionic package failed attempts were because of this since I can only see the build error, but it was the same build error as I was getting when running ionic build android --release. After investigating I noticed only hooks in the hooks/after_prepare directory or .sh hooks included in the config.xml file were executing. the following seemed to fix my issue locally.



// add additional build-extras.gradle file to instruct android's lint to ignore translation errors
// v0.1.c
// causing error in the build --release
// Issue: https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/80
//
// Warning: This solution does not solve the problem only makes it possible to build --release
module.exports = function(ctx){
    // make sure android platform is part of build 
    if(ctx.opts.platforms.indexOf('android') < 0){
        return;
    }
    var fs = ctx.requireCordovaModule('fs'),
        path = ctx.requireCordovaModule('path'),
        deferral = ctx.requireCordovaModule('q').defer();

    var rootdir = path.join(ctx.opts.projectRoot, 'platforms/android');


    if(rootdir){

        var platforms = ctx.opts.platforms;
        for(var x = 0; x < platforms.length; x++){
            var platform = platforms[x].trim().toLowerCase();
            try{
                if(platform == 'android'){
                    var lintOptions = 'android { \nlintOptions {\ndisable \'MissingTranslation\' \ndisable \'ExtraTranslation\' \n} \n}';
                    fs.appendFileSync('platforms/android/build-extras.gradle', lintOptions, 'UTF-8');
                    console.log('Added build-extras.gradle ');
                    deferral.resolve();
                }
            }
            catch(e){
                console.log(e);
            }
        }
    }
    return deferral.promise;
};

copy_google_services.js ionic package build

Hello everyone,
i get this error using the copy_google_services hook for ios package operation on the Ionic Cloud Service:

iOS project created with [email protected]
Error: Invalid data, chunk must be a string or buffer, not object.

I put the hook in the config.xml as described, and copy the GooglePlist file into the www folder.
Thank for the help.
Best regards.

before_install hook needed to avoid Error Domain=IDEDistributionErrorDomain Code=1

Hi. I'm not experienced on pull requests so I expose my problem in this issue.

I successfully built an iOS app with "ionic package" on developer mode. I created my credentials to build a release version and I got the following error when running "ionic package build ios --profile production --release":
Error Domain=IDEDistributionErrorDomain Code=1 "(null)"
Details can be seen on this issue ionic-team/legacy-ionic-cloud#129

After some research, the problem seems to be with Apple WWDR certificate being expired on ionic cloud. A solution using a before_install hook is explained here fastlane-old/gym#100 (comment)

Unfortunately ionic package does not accept developer hooks, so I would like to ask for such a hook to be added on ionic-package-hooks as it seems to be the only alternative to successfully build an iOS release IPA file.

I don't know if I can upload the hook by myself so it is avaliable on "ionic package". If it is, I'm willing to do it myself if someone can give me some hints. I Hope someone can help on solving this issue.

Best regards.

Ability to provide custom hooks?

Hi there!

I'm not sure if this is possible, but I am trying to include a Push Notification icon (for Android) with my ionic package build to ensure I don't just get a white square.

I have the proper icon in the /resources folder along with my app icons generated through ionic resources. I also have an after_prepare hook that will copy the notification icon into the proper platform/android/res folder, but I can't seem to use it with ionic package.

So my question is, is it possible to supply a custom hook for use with ionic package? Or, if not, is there a way for me to include the push notification icon in the build that gets sent to ionic package?

Thanks!

Added a PR to solve deeplinks plugin error on cloud builds

We just added a PR with a hook that solves the bug on ionic cloud builds when using deeplinks plugin. Related issues are linked to the PR.
#41

Hope you can review it and add it to the repo soon, if not... deeplinks plugin doesn't work on cloud builds... which is not a good thing :)

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.