isleofcode / corber Goto Github PK
View Code? Open in Web Editor NEWCLI for building hybrid apps with Ember/Vue/Glimmer/Cordova
Home Page: http://corber.io
License: MIT License
CLI for building hybrid apps with Ember/Vue/Glimmer/Cordova
Home Page: http://corber.io
License: MIT License
using "ember-cordova": "0.1.11",
deviceready fires, but using this latest from github, it does not fire.
ember cordova:serve --platform=android --reload-url=localhost:4200
**'EMBER_CORDOVA' is not recognized as an internal or external command,
operable program or batch file.**
....
BUILD SUCCESSFUL
Total time: 7.843 secs
Built the following apk(s):
E:/.../ember-cordova/cordova/platforms/android/build/outputs/apk/android-debug.apk
**'EMBER_CORDOVA' is not recognized as an internal or external command,**
operable program or batch file.
npm ERR! Windows_NT 10.0.10586
I'm running the latest version of ember-cordova.
When I try a cordova build with ember cdv:build --platform=android
, the build fails with
`Error: ember-cordova: You must specify the locationType as 'hash' in your environment.js.
at Class.module.exports.validateLocationType (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cordova/lib/commands/build.js:66:13)
at Class.module.exports.run (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cordova/lib/commands/build.js:28:10)
at Class. (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cli/lib/models/command.js:152:17)
at lib$rsvp$$internal$$tryCatch (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/home/billy/BitBucket/Personal/wheres-my-ride/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
I do have locationType: 'hash',
in my environment.js file, and I also tried using defaultLocationType as is done in ember-cli-cordova. No love. It seems locationType in the validateLocationType() function comes back as undefined.
I fear this is a dumb newbie question, so apologies in advance, but ... what am I missing?
thx.
-Billy B
`
Any special tricks I need to do to migrate existing project from ember-cli-cordova
?
Is it possible to highlight the path in the readme?
isleofcode
isleofcode/
install ember-cordova
Error: Cannot find module 'config-chain'
File: /bin/sh
Command failed: cordova create cordova isleofcode isleofcode
Error: Command failed: cordova create cordova isleofcode isleofcode
at checkExecSyncError (child_process.js:464:13)
at execSync (child_process.js:504:13)
at /Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cordova/lib/tasks/bash.js:23:7
at lib$rsvp$$internal$$initializePromise (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cli/lib/ext/promise.js:32:8)
at Class.module.exports.Task.extend.run (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cordova/lib/tasks/bash.js:17:12)
at Class.module.exports.Task.extend.run (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cordova/lib/tasks/create-cordova-project.js:30:21)
at Class.module.exports.afterInstall (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cordova/blueprints/ember-cordova/index.js:42:19)
at lib$rsvp$$internal$$tryCatch (/Users/<user>/Projects/tmp/isleofcode/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
I have icons inside font files (.eot, .svg, .ttf, .woff) sitting in the "public" folder. Everything works great when I use ember cdv:serve
and test on a simulator, however, when I create a build and run on a device no icons are displayed.
Commit a58181b renamed a property in tasks/validate-plugin.js:
pluginName => desiredKeyName
This breaks validation in the command serve.js where "pluginName"
is still used to initialize the Validator. (Line 83)
Hi. Encountering this issue when installing browser
on a newly inited Ember 2.6 repo.
ember cdv platform add browser
Running 'cordova platform add browser'
Adding browser project...
Running command: /Users/brent/.cordova/lib/npm_cache/cordova-browser/4.1.0/package/bin/create /projects/embercordova/ember-cordova/cordova/platforms/browser cordova cordova
Creating Browser project. Path: platforms/browser
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for browser
Installing "cordova-plugin-whitelist" for ios
Failed to install 'cordova-plugin-whitelist':CordovaError: Could not find *-Info.plist file, or config.xml file.
at Object.parseProjectFile [as parse] (/projects/embercordova/ember-cordova/cordova/platforms/ios/cordova/lib/projectFile.js:51:15)
at Api.addPlugin (/projects/embercordova/ember-cordova/cordova/platforms/ios/cordova/Api.js:209:33)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:611:6)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at doNTCallback0 (node.js:417:9)
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Could not find *-Info.plist file, or config.xml file.
ember cordova:build --platform android
Build failed.
File: language-app/services/audio-player.js
The Broccoli Plugin: [Babel] failed with:
SyntaxError: language-app/services/audio-player.js: Unexpected token (20:37)
_mediaError(error) {
console.log(JSON.stringify(error);
}
});
[...]
Symlinked dist/ to cordova/www
[...]
BUILD SUCCESSFUL
I believe that if application build fails then the dist directory should not be symlinked and Cordova CLI should not be invoked at all. What do you think?
Trying to serve my app after conversion from ember-cli-cordova
to ember-cordova
(also changed name to 'mobile.spike' to avoid the dash-constraint raised as separate issue).
SyntaxError: modules/ember-cordova/services/device/platform.js: Line 160: "v" is read-only
const v = version.toString();
if (v.indexOf('.') > 0) {
v = v.replace('.', '_');
} else {
v += '_0';
}
at File.errorWithNode (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/file/index.js:489:13)
at NodePath.errorWithNode (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/path/index.js:155:26)
at NodePath.Scope (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/transformers/es6/constants.js:48:25)
at NodePath.<anonymous> (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/visitors.js:221:17)
at NodePath.call (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/path/context.js:56:28)
at NodePath.visit (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/path/context.js:90:8)
at TraversalContext.visitSingle (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/context.js:132:12)
at TraversalContext.visit (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/context.js:148:19)
at Function.traverse.node (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/index.js:76:17)
at NodePath.visit (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/traversal/path/context.js:107:26)
➜ ember-cordova git:(master) ember -v
version: 2.3.0
node: 4.0.0
os: darwin x64
➜ ember-cordova git:(master) node -v
v4.0.0
➜ ember-cordova git:(master) npm -v
3.8.6
➜ ember-cordova git:(master)
➜ ember-cordova git:(master) ember s
version: 2.3.0
DEPRECATION: this.pickFiles is deprecated, please use broccoli-funnel directly instead [addon: qunit-bdd]
broccoli-funnel does not support `files:` option with globs, please use `include:` instead
DEPRECATION: this.mergeTrees is deprecated, please use broccoli-merge-trees directly instead [addon: qunit-bdd]
Attempting to watch missing directory: tests/dummy/app
Error: Attempting to watch missing directory: tests/dummy/app
at EventEmitter.Watcher_addWatchDir [as addWatchDir] (/Users/flama/Projects/ember-cordova/node_modules/broccoli-sane-watcher/index.js:90:11)
at /Users/flama/Projects/ember-cordova/node_modules/broccoli/lib/builder.js:94:35
at lib$rsvp$$internal$$tryCatch (/Users/flama/Projects/ember-cordova/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/Users/flama/Projects/ember-cordova/node_modules/rsvp/dist/rsvp.js:1048:17)
at /Users/flama/Projects/ember-cordova/node_modules/rsvp/dist/rsvp.js:331:11
at lib$rsvp$asap$$flush (/Users/flama/Projects/ember-cordova/node_modules/rsvp/dist/rsvp.js:1198:9)
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
Presumably we should wait for the deviceready promise in the cordova service within application route's beforeModel
hook, but what if you're writing an app that has a cordova target AND a web app target? Would be nice if the cordova service gave you a promise to wait for that resolved immediately if it detected that it wasn't running in a cordova context.
Library today requires Node 3 || 4. We probably need to support 0.1x or document lack of support given issues like #84.
@anulman / @runspired thoughts?
It would be nice to have a sample app, which kind of will help early adopters. It should atleast cover basic features provided by ember-cordova.
Ember-Cli-Cordova creator had done this - https://vimeo.com/107885050
I have been facing bunch of issues. One of it is how to getride of splash screen.
Even after this it is not loading my app. still stuck at splash screen.
// app/routes/application.js
import Ember from 'ember';
import SplashscreenMixin from 'ember-cordova/mixins/device/splashscreen';
const { Route } = Ember;
export default Route.extend(SplashscreenMixin, {
beforeModel() {
this.get('splashscreen').hide();
},
model() {
return ['red'];
}
});
I checked out the emberjs example super-rentals app: https://github.com/emberjs/super-rentals. After installing all of the dependencies, I opened 2 tabs:
I hook up the safari browser of my notebook to the app running in simulator, its console tap displaying information "exeption nativeEvalAndFetch : ReferenceError: Can't find variable: cordova global code - index.html:1:127".
I had a config option "output-path": "dist" in my .ember-cli config file.
When this option is set, the cordova www directories are not updated.
Maybe it should be documented or asserted that this option is not set.
Best solution would be to override it when running some cdv.
Sorry for posting this here. Not sure if this is the right place
Here is what I'm doing:
I start my ember server and create the UI like a webapp then I run ember cordova run ios --device
to run in my iPhone.
My API is a Rails app running in my own computer, then I deployed the api to Heroku and changed the API address point based on the environment.
It looks like that the run option doesn't know my production environment.
Now, I run ember cordova:build --environment=production --platform=ios && ember cordova run ios --device
to simulate but this is slow.
Is that workflow correct? Is there any way to improve this workflow?
I also tried the live reload
ember cordova:serve --platform=ios
and
ember cdv:open —-platform=ios
But it doesn't look as I was looking for.
Any suggestions to improve the workflow?
This is my first foray into Cordova so please bear with me. Here is what I attempted:
ember-cli-cordova
and got it up and running (including running the generator - I'm only using iOS right now)ember-cordova
so switched to thatcordova
-> ember-cordova/cordova
ember cordova:open
would open in XCode and I could hit build
to run itNext I tried to get LiveReload working:
allow-navigation
config in ember-cordova/cordova/config.xml
is currently set to *
to remove any additional potential problems from thatember-cordova
config in environment.js
is currently set to the following:{
cordova: {
rebuildOnChange : false,
emberUrl : `http://${addresses[0]}:4200`,
reloadUrl : `http://${addresses[0]}:4200`,
liveReload : {
enabled : true,
platform : 'ios'
},
}
}
I have tried both 4200
and 49154
for the reloadUrl
considering I wasn't sure what the docs meant. I would assume it would just use emberUrl
if that's what it wanted but since the reloader is serving from 49154
my assumption is that reloadUrl
is looking for that and not the emberUrl
.
Either way, neither of them worked.
ember cordova:serve
This does all the stuff, but the docs make it seem as though it should launch the app, however it does not.ember cordova:open
in a separate tab. This opens XCode, but does not run the appemberUrl
index.html
)App in simulator refreshes to reflect those changes
App in simulator does not refresh
Interestingly, even if I quit Simulator and rebuild the app in XCode I still don't see the changes. I must completely rebuild the entire app to see changes to the code.
On a fresh ember app, just after doing ember new my-app
I install ember-cordova and am getting this error:
➤ ember install ember-cordova git:master
Installed packages for tooling via npm.
installing ember-cordova
create /ember-cordova/.npmignore
/bin/sh: cordova: command not found
File: /bin/sh
Command failed: cordova create cordova sympstruments sympstruments
Error: Command failed: cordova create cordova sympstruments sympstruments
at checkExecSyncError (child_process.js:464:13)
at execSync (child_process.js:504:13)
at /Users/devinrhode2/repos/sympstruments/node_modules/ember-cordova/lib/tasks/bash.js:23:7
at lib$rsvp$$internal$$initializePromise (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cli/lib/ext/promise.js:32:8)
at Class.module.exports.Task.extend.run (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cordova/lib/tasks/bash.js:17:12)
at Class.module.exports.Task.extend.run (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cordova/lib/tasks/create-cordova-project.js:30:21)
at Class.module.exports.afterInstall (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cordova/blueprints/ember-cordova/index.js:42:19)
at lib$rsvp$$internal$$tryCatch (/Users/devinrhode2/repos/sympstruments/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
sympstruments ➤
It should be noted in the docs how to use splash screens and icons. It doesn't match the docs for cordova-plugin-splashscreen. In that it says to add XML configs for splashscreen locations, but b/c those don't match that fails the build. The correct thing seems to be to not include any extra xml.
Also I recommend adding links to https://github.com/AlexDisler/cordova-splash and https://github.com/AlexDisler/cordova-icon for generating the images. As a handy helpful tip for cordova folk.
Hi. Encountering this issue when installing android
on a newly inited Ember 2.6 repo.
ember cdv platform add android
Running 'cordova platform add android'
Adding android project...
Error: Error validating package name. Package name must look like: com.company.Name
File: /bin/sh
Command failed: cordova platform add android
Error: Command failed: cordova platform add android
at checkExecSyncError (child_process.js:441:13)
at Object.execSync (child_process.js:481:13)
at CoreObject.BashTask.runCommand (/projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:28:16)
at /projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:22:12
at lib$rsvp$$internal$$initializePromise (/projects/embercordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/projects/embercordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/projects/embercordova/node_modules/ember-cli/lib/ext/promise.js:32:8)
at CoreObject.Task.extend.run (/projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:16:12)
at CoreObject.module.exports.run (/projects/embercordova/node_modules/ember-cordova/lib/commands/cordova.js:60:8)
at CoreObject.module.exports.validateAndRun (/projects/embercordova/node_modules/ember-cordova/lib/commands/cordova.js:45:17)
i'm up-to-date with branch master of this repo. and still not have a dummy app
I can't run this project :(
#30
I am building with ember cdv:build
but after update i got this error :
Built project successfully. Stored in "dist/".
Symlinked dist/ to cordova/www
Using this version of Cordova with older version of cordova-ios is being deprecated. Consider upgrading to [email protected] or newer.
Error: The provided path "/home/v3ss/workspace/wavelocator/client/ember-cordova/cordova/platforms/ios" is not a Cordova iOS project.
i am building android
here is my env
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'client',
environment: environment,
rootURL: '/',
locationType: 'hash',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
},
cordova: {
rebuildOnChange: false,
emulate: false,
platform: 'android'
}
};
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
ENV.APP.LOG_VIEW_LOOKUPS = true;
}
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
}
if (environment === 'production') {
}
return ENV;
};
On a new Ember 2.6 projects, installation of the addon fails with the following:
❯ ember install ember-cordova [13:30:01]
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
⠧ Installing packages for tooling via npmConsidering PhantomJS found at /usr/local/bin/phantomjs
Looks like an `npm install -g`
Linking to global install at /usr/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs
Writing location.js file
Installed packages for tooling via npm.
/projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:16
return new Promise(() => {
^
Unexpected token )
/projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:16
return new Promise(() => {
^
SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/projects/embercordova/node_modules/ember-cordova/lib/tasks/ember-build.js:4:23)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
>>>elapsed time 35s
blank screen on the simulator
and I see this error
[Error] Failed to load resource: The requested URL was not found on this server. (vendor.css, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (app.css, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (cordova.js, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (vendor.js, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (app.js, line 0)
"ember-cli": "2.6.2",
"ember-data": "^2.6.0",
"ember": "~2.6.0",
JSHint passing should be part of the test suite.
The -r command line parameter does not work. Only the environment/config works.
Your plugin helps us a lot!
(Although this is an issue tracker: just writing about the things that do not work, feels not right at all ;)
Followed the instructions, also I have this in my package.json and bower.json:
"name": "com.company.Name",
but getting this, not sure why:
ember cdv platform add android
Running 'cordova platform add android'
Adding android project...
Error: Error validating package name. Package name must look like: com.company.Name
File: /bin/sh
Command failed: cordova platform add android
Error: Command failed: cordova platform add android
at checkExecSyncError (child_process.js:469:13)
at execSync (child_process.js:509:13)
at /home/user/my-ember-cordova/node_modules/ember-cordova/lib/tasks/bash.js:23:7
at lib$rsvp$$internal$$initializePromise (/home/user/my-ember-cordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/home/user/my-ember-cordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/home/user/my-ember-cordova/node_modules/ember-cli/lib/ext/promise.js:32:8)
at Class.module.exports.Task.extend.run (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/tasks/bash.js:17:12)
at Class.module.exports.Task.extend.run (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/tasks/cordova.js:21:8)
at Class.module.exports.run (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/commands/cordova.js:54:27)
at Class.module.exports.validateAndRun (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/commands/cordova.js:44:17)
I'm running:
ember cordova:build --platform=android --environment=production
According to this line https://github.com/isleofcode/ember-cordova/blob/59bc6c00e473e2083cf4cfd34727b7468d0c0187/lib/tasks/cordova-build.js#L11 it should append --release
to the Cordova command.
However, when this function is invoked (https://github.com/isleofcode/ember-cordova/blob/59bc6c00e473e2083cf4cfd34727b7468d0c0187/lib/commands/build.js#L57) the environment parameter is not passed, so this condition is always false (undefined === "production"
)
Thank you for creating this addon!
I would like to report one inconsistency in how deviceready
event is handled. In Cordova docs (https://cordova.apache.org/docs/en/latest/cordova/events/events.html#deviceready):
The
deviceready
event behaves somewhat differently from others. Any event handler registered after thedeviceready
event fires has its callback function called immediately.
However, from what I have observed, this is not the case when using cordova
service:
// this invokes "vibrate" function
document.addEventListener("deviceready", this.vibrate.bind(this), false);
// this does not invoke "vibrate" function presumably because the event already fired long time ago
this.get("cordova").on("deviceready", this, "vibrate");
What do you think? Should we match the "unwrapped" behaviour?
Right now a ton of built cordova files get added to your repo. ideally, you would leave the platforms folder empty, or leave the platform.json file in there, and then an npm install post step would run the ember cordova add platform's as needed.
My application route is as follows:
import Ember from 'ember';
import subscribe from 'ember-cordova/utils/subscribe';
const {
inject,
Route
} = Ember;
export default Route.extend({
cordova: inject.service(),
logReady: subscribe('cordova.deviceready', function() {
window.navigator.splashscreen.hide();
})
});
I sometimes get a fatal error like this...
After reading the cordova service code I saw the ready
method and once I switched to that I had no further issues.
activate() {
this.get('cordova').ready().then(() => {
window.navigator.splashscreen.hide();
});
}
Any thoughts on why subscribing to deviceready
would cause that? I'm happy to update the docs to suggest using that ready
promise, it seems like a more reliable approach.
When baseURL is removed according to http://emberjs.com/blog/2016/04/28/baseURL.html#toc_upgrading
ember cdv:serve fails with an "undefined" error.
ember serve continues to work.
ember-cli 2.7.0
ember-cordova 2.2.0
Here is my enviorment config :
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'client',
environment: environment,
baseURL: '/',
defaultLocationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
},
cordova: {
rebuildOnChange: false,
emulate: false,
platform: 'android'
}
};
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
ENV.APP.LOG_VIEW_LOOKUPS = true;
}
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
}
if (environment === 'production') {
}
return ENV;
};
when
ember cordova:build
and
ember cordova:emulate
After splash is run on device , always "File not found" any every single jss /css /wahtever.
only index.html is ported?
Thanks for all the hard work on this project 👍 👍
I'm using it with cordova-hot-code-push, which supports passing extra arguments to cordova build
for different environments. Example. Eg:
cordova build -- chcp-dev
This doesn't work:
ember cdv:build -- chcp-dev
From looking at the code it's pretty obvious it won't work. Is it possible to pass through the chcp-dev
option in another way?
Alternatively, the changes being made as a result of passing through chcp-dev
could be put into hooks.
Regards,
-Jonathan.
Right now I have to increment the version in both config.xml and package.json. Maybe this is desirable by some, but probably not. config.xml should probably read from package.json
Hi. Encountering this issue when installing iOS on a newly inited Ember 2.6 repo.
ember cdv platform add ios
Running 'cordova platform add ios'
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: cordova
Name: cordova
iOS project created with [email protected]
Error: ENOENT: no such file or directory, open '/projects/embercordova/ember-cordova/cordova/platforms/ios/cordova/cordova-Info.plist'
File: /bin/sh
Command failed: cordova platform add ios
Error: Command failed: cordova platform add ios
at checkExecSyncError (child_process.js:441:13)
at Object.execSync (child_process.js:481:13)
at CoreObject.BashTask.runCommand (/projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:28:16)
at /projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:22:12
at lib$rsvp$$internal$$initializePromise (/projects/embercordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/projects/embercordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/projects/embercordova/node_modules/ember-cli/lib/ext/promise.js:32:8)
at CoreObject.Task.extend.run (/projects/embercordova/node_modules/ember-cordova/lib/tasks/bash.js:16:12)
at CoreObject.module.exports.run (/projects/embercordova/node_modules/ember-cordova/lib/commands/cordova.js:60:8)
at CoreObject.module.exports.validateAndRun (/projects/embercordova/node_modules/ember-cordova/lib/commands/cordova.js:45:17)
I use ember cordova run
and ember cordova run --device
quite a bit. I think they should be added to the docs, and possible to a cdv:run. I think there is a build requirement of ios-deploy, and something for android, but I don't recall.
It would be great if you could pass a template through to the cordova create
command.
$ ember install ember-cordova --template ../ember-cordova-template/
The option '--template' is not registered with the install command. Run `ember install --help` for a list of supported options.
Could not install /Users/jb/code/ember-cordova-template
EISDIR: illegal operation on a directory, read
Error: EISDIR: illegal operation on a directory, read
at Error (native)
Migrating from ember-cli-cordova, where I managed the icon myself with cordova-icon, how do I take advantage of the auto generation in ember-cordova?
When running ember cdv:serve
on ember-cordova 0.2.0, the cordova.js file has just the following comment: No-op script for when serving to both browser and Cordova device.
Hi, I'm hitting this issue on a new ember-cli 2.7.0 project while running ember cdv:build.
Have you seen this before?
TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.join (path.js:1213:7) at blabla/node_modules/ember-cordova/index.js:63:29 at Array.forEach (native) at CoreObject.module.exports.treeForPublic (blabla/node_modules/ember-cordova/index.js:62:13) at CoreObject._treeFor (blabla/node_modules/ember-cli/lib/models/addon.js:373:33) at CoreObject.treeFor (blabla/node_modules/ember-cli/lib/models/addon.js:341:21) at blabla/node_modules/ember-cli/lib/broccoli/ember-app.js:498:20 at Array.map (native) at EmberApp.addonTreesFor (blabla/node_modules/ember-cli/lib/broccoli/ember-app.js:496:30)
I have a small spike I'd got working with ember-cli-cordova
and wanted to switch over to ember-cordova
. I did the following:
ember-cli-cordova
from my package.jsonember install ember-cordova
, this resulted in the following error:Error seems to originate from the ember-cordova/lib/tasks/bash.js
shell script, stack trace is:
Error: Command failed: cordova create cordova mobile-spike mobile-spike
at checkExecSyncError (child_process.js:469:13)
at execSync (child_process.js:509:13)
at /Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cordova/lib/tasks/bash.js:23:7
at lib$rsvp$$internal$$initializePromise (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli/lib/ext/promise.js:32:8)
at Class.module.exports.Task.extend.run (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cordova/lib/tasks/bash.js:17:12)
at Class.module.exports.Task.extend.run (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cordova/lib/tasks/create-cordova-project.js:30:21)
at Class.module.exports.afterInstall (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cordova/blueprints/ember-cordova/index.js:34:19)
at lib$rsvp$$internal$$tryCatch (/Volumes/PEGASUS/repos/mine/lg2/mobile-spike/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
when installing latest version i am getthing this error
Cannot find module 'broccoli-merge-trees'
getting:
Unexpected token )
SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/projects/NuukTaxiApp/nuuk-mobile/node_modules/ember-cordova/lib/tasks/ember-build.js:5:23)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
when running: ember install ember-cordova
ember install ember-cordova
Installed packages for tooling via npm.
Cannot find module 'splicon/lib/icon-task'
Error: Cannot find module 'splicon/lib/icon-task'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (E:\***\***\node_modules\ember-cordova\lib\commands\mak
e-icons.js:3:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
I am on "ember-cli": "2.5.1"
It is quite weird, all geolocation features are not working when built for android even tho i did ember cordova plugin add cordova-plugin-geolocation
it all work fine, all i did was:
upgraded cordova to 6.3.0 frm 6.2.0
upgraded to ember 2.7
upgraded to ember-cordova 0.2
The README references splashscreen at:
https://github.com/isleofcode/ember-cordova/blob/master/docs/services/splash.md
Should be:
https://github.com/isleofcode/ember-cordova/blob/master/docs/services/splashscreen.md
Hi guys,
I am trying to set up the super-rentals project from emberjs guide(https://guides.emberjs.com/v2.5.0/tutorial/ember-cli/) with ember-cordova. After following the instructions on the README, I simply got a blank page in an ios simulator. I am new to ember and cordova. Is there a discuss channel or meetup where newb can seek for helps?
Thanks,
Xiong
ember-cordova: 0.1.4
ember-cli: 2.5.0
node: 5.3.0
os: darwin x64
$ ember cdv:serve
⠋ Buildingember-cordova: /Projects/js/cdv6/cdv/ember-cordova/cordova/platforms/ios/www/cordova_plugins.js did not exist. It is required for Device LiveReload to work.
Symlinked dist/ to cordova/wwww
ember-cordova: /Projects/js/cdv6/cdv/ember-cordova/cordova/platforms/ios/www/cordova_plugins.js did not exist. It is required for Device LiveReload to work.
File: /bin/sh
Command failed: EMBER_CORDOVA=true CORDOVA_RELOAD_ADDRESS=http://localhost:4200 CORDOVA_PLATFORM=ios EMBER_CORDOVA=true ember build --environment development
Error: Command failed: EMBER_CORDOVA=true CORDOVA_RELOAD_ADDRESS=http://localhost:4200 CORDOVA_PLATFORM=ios EMBER_CORDOVA=true ember build --environment development
at checkExecSyncError (child_process.js:464:13)
at execSync (child_process.js:504:13)
at /Projects/js/cdv6/cdv/node_modules/ember-cordova/lib/tasks/bash.js:23:7
at lib$rsvp$$internal$$initializePromise (/Projects/js/cdv6/cdv/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
at PromiseExt.lib$rsvp$promise$$Promise (/Projects/js/cdv6/cdv/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
at new PromiseExt (/Projects/js/cdv6/cdv/node_modules/ember-cli/lib/ext/promise.js:32:8)
at Class.module.exports.Task.extend.run (/Projects/js/cdv6/cdv/node_modules/ember-cordova/lib/tasks/bash.js:17:12)
at Class.module.exports.Task.extend.run (/Projects/js/cdv6/cdv/node_modules/ember-cordova/lib/tasks/build.js:44:23)
at Class.module.exports.run (/Projects/js/cdv6/cdv/node_modules/ember-cordova/lib/commands/serve.js:58:18)
at Class.<anonymous> (/Projects/js/cdv6/cdv/node_modules/ember-cli/lib/models/command.js:152:17)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.