Giter Site home page Giter Site logo

gulp-cordova-build-ios's Introduction

gulp-cordova-build-ios

Build the cordova project for the iOS platform.

Installation

$ npm install --save-dev gulp-cordova-build-ios

Usage

const gulp = require('gulp');
const create = require('gulp-cordova-create');
const plugin = require('gulp-cordova-plugin');
const ios = require('gulp-cordova-build-ios');

gulp.task('build', () => {
	return gulp.src('www')
		.pipe(create())
		.pipe(plugin('org.apache.cordova.dialogs'))
		.pipe(plugin('org.apache.cordova.camera'))
		.pipe(ios());
});

This plugin will build the cordova project for the iOS platform.

API

ios([options])

options

reAdd

Type: boolean
Default: false

If the value is true, this will cause the ios platform to be removed and re-added.

version

Type: string

iOS platform version.

Related

See gulp-cordova for the full list of available packages.

License

MIT © Sam Verschueren

gulp-cordova-build-ios's People

Contributors

ankon avatar mdamt avatar samverschueren avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gulp-cordova-build-ios's Issues

Empty output

I am using the Android and iOS version of this plugin. The Android version works perfectly, though the iOS version is not giving me any output. This is my gulpfile:

var gulp = require('gulp');
var android = require('gulp-cordova-build-android');
var create = require('gulp-cordova-create');
var del = require('del');
var ios = require('gulp-cordova-build-ios');
var plugin = require('gulp-cordova-plugin');
var shell = require('gulp-shell');

gulp.task('default', function() {});

gulp.task('clean.cordova', function() {
  return del(['.cordova']);
});

gulp.task('build.cordova', shell.task('ng build -prod --base-href "./"'));

gulp.task('build.cordova.android', ['clean.cordova', 'build.cordova'], function() {
  return gulp.src('dist')
    .pipe(create({ id: 'com.some.something', name: 'My App Name' }))
    .pipe(android())
    .pipe(gulp.dest('dist/android'));
});

gulp.task('build.cordova.ios', ['clean.cordova', 'build.cordova'], function() {
  return gulp.src('dist')
    .pipe(create({ id: 'com.some.something', name: 'My App Name' }))
    .pipe(ios())
    .pipe(gulp.dest('dist/ios'));
});

Is there any reason why I don't receive any output at all?

Errors are not shown and gulp task is silently stopped

I have a strongly modified .cordova/platform/ios with a test project and multiple Info.plist in the configuration so behind the scene plugman cant find the right .plist file (solved by reordering the xcode project file).

I have a simple grunt tasks

...
function buildIosTask() {
    return gulp.src('.cordova')
        .pipe(ios())
        .pipe(gulp.dest(buildDest));
}
...
gulp.task('build-ios', [], buildIosTask);

I do:

$ gulp build-ios
[10:23:26] Starting 'build-ios'

Expected:

A print out with the error (pardon me if my gulp is setup wrongly)

When I look into gulp-cordova-build-ios/index.js and place a debugger err has the value:

{ stack: undefined,
name: 'CordovaError',
message: 'could not find -Info.plist file, or config.xml file.' }

Not working with cordova-ios 4.2.1

Not working well with cordova ios 4.2.1 platform.
It seems like the relative paths or something is messed up...falling back to default version cordova ios version (which is ended up using cordova-ios 4.1.1).

Allow defining the platform version

Currently the plugin always uses cordova platform add ios, it would be great if one could define an optional version to trigger an invocation like this: cordova platform add ios@VERSION.

Add the option to make a release iOS build

Hello there, me again.

As the gulp-cordova-build-android plugin does, I think we should add the possibility to make a release build when compiling an iOS app.

A very trivial implementation would be adding an option object instead of a single boolean to the ios() function, like this :

var gulp = require('gulp'),
    ios = require('gulp-cordova-build-ios');

gulp.task('rebuild', function() {
    return gulp.src('.cordova')
        .pipe(ios({
                rebasePlatform: true,
                release: true
        }));
});

And handling it like this in the index.js file :

module.exports = function(rm) {
     //.... Options values check and default settings
     var options = options.release ? ['--release'] : [];
     //.... Begin of the promise
     .then(function() {
            // Build the platform
            return cordova.build({platforms: ['ios'], options: options});
     })//... Rest of the promise

Releasing an iOS app means also having the developer certificate and provisoning store configured in XCode. We may (or not) leave this part to the developer's responsability.

Tell me what you think of this idea, and thank you !

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.