Deploying an app with custom scripts

I have a build process for an ionic2 app that works locally. It makes a build that I can use and all is well.

Now I am trying to deploy this app using ionic package build ios ...

Unfortunately the build process that I have depends on adding a framework binary (specifically the TwilioVoiceClient.framework) to my project with some custom scripts that are called from these hooks in my config.xml

    <hook src="scripts/twilio.js" type="after_platform_add"/>
    <hook src="hooks/fix_xcode_schmes.rb" type="after_platform_add"/>

. The problem is that when I pass up the project the build fails and the following error displays in the console

Script file does't exist and will be skipped: /Users/package/workspace/apps-0a609a24-90/cordova/scripts/twilio.js
Error: ENOENT: no such file or directory, stat '/Users/package/workspace/apps-0a609a24-90/cordova/hooks/fix_xcode_schmes.rb'

I will note that I have tried this with the scripts sitting at scripts/twilio.js and hooks/fix_xcode_schmes.rb respectively, and with them at cordova/scripts/twilio.js and cordova/hooks/fix_xcode_schmes.rb respectively. The error is the same either way.

Can anyone shed some light on what ionic is actually doing when I try to package the project? Is there any way that I can get ionic to find this script file after everything is passed up?

+1 this happens to me as well. Anyone?

Ionic Package and Hooks:
https://docs.ionic.io/services/package/#hooks
https://github.com/ionic-team/ionic-package-hooks

There is a hook waiting to be merged here: https://github.com/ionic-team/ionic-package-hooks/pull/35
Who would approve it?

A specific hooks for singular framework… I don’t thing anyone from Ionic will want to add this to their maintenance load. But sure, try. Ionic can be contacted about Package via here:
http://ionicframework.com/support#support
(Scroll down to “Business and Customer Support”)

This is a hook for the Twilio framework. hardly specific.Hard to believe no one is using VoIP in their apps.

There are other ways for Cordova plugins to include code like this besides using a hook. That’s why not many plugins require this.