I have done some workaround and found nice solution for creating .ipa using gulp...
First Step :
Reference : How can I deploy (create .ipa) iphone app using 'cordova build ios --release'?
If you are using cordova ios 3.9.0 or newer, you can use this command to create the .ipa directly from the CLI with no extra commands:
cordova build ios --device --release
You'll need a build.json file on the root of your project
{
"ios": {
"debug": {
"codeSignIdentitiy": "iPhone Developer",
"provisioningProfile": "your-dev-provisioning-profile-UUID-here"
},
"release": {
"codeSignIdentitiy": "iPhone Distribution",
"provisioningProfile": "your-distribution-provisioning-profile-UUID-here"
}
}
}
To get the UUID I open the .mobileprovision file on a text editor and search for 'UUID', not sure if there is an easier way of finding it.
Second Step:
Reference : How to execute shell command using gulp
Write a gulp task to execute shell command
var IOS_BUILD_COMMAND = 'ionic build ios';
var IOS_IPA_COMMAND = 'cordova build ios --device --release';
gulp.task('ios_build', function (cb) {
exec(IOS_BUILD_COMMAND, function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp.task('ios_ipa', function (cb) {
exec(IOS_IPA_COMMAND,
{
cwd : './',
maxBuffer: 500 * 1024
},
function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
Third Step :
Execute gulp -r
from command line.
And Yo... its done..!!