I am new to the Cordova CLI.
I need to perform the following steps programmatically via Cordova.
These are the steps I ended up doing to enable my application to share files through itunes between devices.
1.In your application navigate to your config.xml. Type this piece into your config under the platform tag
.
2. Then go to your command line tool and type: cordova prepare
A few things, make sure cordova is up to date, and that you added the platform for ios.
npm install -g cordova
This command installs cordova.
cordova platform add ios
This command adds the platform for ios.
What is happening is when you run the cordova prepare command you are using Apple's Xcode SDK that is generated in the platform/ios folder. There you can see the plist file that is generated for your application, which is labeled as "yourApp-info.plist". There you can see the new key and string produced in the xml layout which looks like this:
UIFileSharingEnabled
Also word of warning, my company dropped this ionic framework application into my lap a couple weeks ago (with a really short deadline). Everything I am telling you is based on couple weeks of learning. So this may not be the best practice, but I hope it helps someone out.
Link to the docs