Fri, 11 Sep 2020 08:24:35 GMT
Join the conversation at slack.cordova.io
Thu, 10 Sep 2020 08:25:49 GMT
@jordi289 says
You still have to init the platform you want to use as far as I know, so somewhere in your script you have to at least call
cordova platform add <platform>
once.
Thu, 10 Sep 2020 08:26:47 GMT
@abul.asar22 says
sure.. i’ll add that one.
Thu, 10 Sep 2020 08:39:06 GMT
@erisu says
@jordi289 Technically, that
platform add
command is not necessary if you clone a project that has everything setup correctly in thepackage.json
/config.xml
.
cordova prepare
is enough to perform the re-setup of the project,
$ ls -la config.xml package.json res www $ cordova prepare Discovered platform "ios". Adding it to the project Using cordova-fetch for cordova-ios@^6.1.0 Adding ios project... Creating Cordova project for the iOS platform: ... iOS project created with cordova-ios@6.1.1 Discovered platform "android". Adding it to the project Using cordova-fetch for cordova-android@^9.0.0 Adding android project... Creating Cordova project for the Android platform: ...``` But adding it doesn’t hurt..
Thu, 10 Sep 2020 08:40:05 GMT
@erisu says
The add command though should be used at least when adding a new platform for the first time to a new or existing project…
Thu, 10 Sep 2020 08:40:55 GMT
@jordi289 says
Yeah true, but according to his error log I don't think it is setup correctly 😅
Thu, 10 Sep 2020 08:41:22 GMT
@erisu says
same feeling
Thu, 10 Sep 2020 08:53:07 GMT
@abul.asar22 says
Guys, added the step to add platform and got following error
Using cordova-fetch for cordova-ios@6.0.0 Adding ios project... Unable to load PlatformApi from platform. SyntaxError: Unexpected token ... Error: Uncaught, unspecified "error" event. (The platform "ios" does not appear to be a valid cordova platform. It is missing API.js. ios not supported.) rake aborted!```
Thu, 10 Sep 2020 08:56:32 GMT
@pratiksha.bhavsar0895 says
What is the cordova cli version used ?
Thu, 10 Sep 2020 08:57:36 GMT
@pratiksha.bhavsar0895 says
Trying updating it and then lets check.
Thu, 10 Sep 2020 08:58:08 GMT
@abul.asar22 says
cordova@7.1.0
. Any suggested version for ios 6
Thu, 10 Sep 2020 08:58:52 GMT
@pratiksha.bhavsar0895 says
Update cordova version and try installing cordova-ios@latest
Thu, 10 Sep 2020 08:59:05 GMT
@pratiksha.bhavsar0895 says
I think this will work
Thu, 10 Sep 2020 09:00:16 GMT
@pratiksha.bhavsar0895 says
https://cordova.apache.org/docs/en/3.1.0/guide/cli/index.html#updating-cordova
Thu, 10 Sep 2020 09:07:12 GMT
@erisu says
Do not ise
sudo
like it says in that document.
Thu, 10 Sep 2020 09:07:27 GMT
@erisu says
That document version is really old and sudo should not be used.
Thu, 10 Sep 2020 09:09:09 GMT
@pratiksha.bhavsar0895 says
Yay without sudo it works.
Thu, 10 Sep 2020 09:57:44 GMT
@abul.asar22 says
same error
cordova platform add ios Using cordova-fetch for cordova-ios@6.1.1 Adding ios project... Unable to load PlatformApi from platform. SyntaxError: Unexpected token ... Uncaught, unspecified "error" event. (The platform "ios" does not appear to be a valid cordova platform. It is missing API.js. ios not supported.) rake aborted!``` with cordova 9.0.0 : (
Thu, 10 Sep 2020 10:00:06 GMT
@erisu says
what version of node are you using?
Thu, 10 Sep 2020 10:02:24 GMT
@abul.asar22 says
6.16.0
Thu, 10 Sep 2020 10:03:22 GMT
@erisu says
Can you upgrade it to 10.x or preferably 12.x which is the current LTS by the NodeJS team?
Thu, 10 Sep 2020 10:04:11 GMT
@abul.asar22 says
sure..
Thu, 10 Sep 2020 10:05:29 GMT
@erisu says
v12.18.3 $ npm -v 6.14.6```
Thu, 10 Sep 2020 10:05:39 GMT
@erisu says
This is the version information you should see when you install the latest 12.x.. Also 12.x should last around 2022-04-30.. That is the current expected EOL for 12.x.
Thu, 10 Sep 2020 21:44:10 GMT
@ruanoliveira862 says
Can I use cordova with firebase auth?? I'm trying call SigninWithRedirect, but i got this error from firebase: auth/operation-not-supported-in-this-environment
I need use Google login, Facebook login, and email login (passwordless)
have any workaround?
Thu, 10 Sep 2020 21:51:58 GMT
@norman137 says
The error sounds like a firebase implementation detail, so you may have better luck going through firebase support channels, where they are probably more people familiar in that domain.
Thu, 10 Sep 2020 22:09:23 GMT
@ruanoliveira862 says
... i put deviceready on main.ts of my angular project. But it's not called, and application not bootstrapped
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
document.addEventListener('deviceready', () => {
platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.error(err));
}, false);
Thu, 10 Sep 2020 22:35:44 GMT
@norman137 says
> auth/operation-not-supported-in-this-environment > Thrown if this operation is not supported in the environment your application is running on. “location.protocol” must be http or https. https://firebase.google.com/docs/reference/js/firebase.auth.Auth
Doesn't sound like firebase supports cordova environments. Because on iOS, your web app runs either from the
file://
protocol, or a scheme of your choosing. Schemes however cannot use existing schemes such ashttp
orhttps
. So this cannot satisfy their protocol environment.On android, the webapp is always served from the
file://
protocol. So android will not satisfy the protocol environment either.For android, there is the ionic webview that does allow you to serve the webapp over
http
orhttps
, but Google engineers have warned ionic about using that approach so it is a solution that may not work in the future. Ref: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/484
Thu, 10 Sep 2020 22:36:52 GMT
@norman137 says
I‘m assuming you’re using the JS api if you're seeing the environment not supported error.
Thu, 10 Sep 2020 22:37:08 GMT
@norman137 says
So you may need to find or build a plugin that interfaces with the native ios/android sdk.
Thu, 10 Sep 2020 22:37:28 GMT
@norman137 says
Instead of using their JS sdk, which is obviously intended to be used in a traditional web environment.
Thu, 10 Sep 2020 08:30:43 GMT
@timbru says
This is the PR: https://github.com/apache/cordova-lib/pull/821, XML is supported, too.
Thu, 10 Sep 2020 08:49:32 GMT
@erisu says
I also remember this PR. I will also be following Norman’s & Tim’s current setup for while myself. Not everyone has upgraded to 10 to support this.
Thu, 10 Sep 2020 13:26:03 GMT
@joel says
I think I see. So for 9.X, in package.json,
cordova.id
and in plugin.xml,package.id
should not be scoped, but should be hyphen cased or otherwise be unique from anything else in the unscoped world.