You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by 李广镇 <gu...@alibaba-inc.com> on 2017/02/20 06:18:48 UTC

Anyone can help me about add new platform to cordova?

Hi all, 
  I'm trying to add a new platform for cordova.
  I have analyzed android port as a reference these days, and found there are two kinds of platform support architecture.
  1) Inside cordova-lib repo
      cordova-lib/cordova-lib/src/cordova/metadata/android_parser.js  //For prepare andorid projects
      cordova-lib/cordova-lib/src/plugman/platforms/android.js  // For plugin supports
  2) Inside cordova-android repo
      Main entry is Api.js, 'prepare' and 'plugin support' functions are moved inside this repo.
  Found some platforms support only use the first one, such as browser.
  android and iOS use both of these two ways.
  My questions:
  1) If I want to add a new platform support, do I need support both of these two ways? or just the second one?
  2) When I finished the development of new platform support locally, Is there any requirements need to be done for cordova to accept these patches?  such as, do I need support all of the core 21 plugins API? 
  Can anyone give me a suggestion?

Thanks.
Guangzhen

回复:Anyone can help me about add new platform to cordova?

Posted by 李广镇 <gu...@alibaba-inc.com>.
Thanks @Shazron @Steven GillGot it, I will have a try :-)
Br.Guangzhen
------------------------------------------------------------------发件人:Shazron <sh...@gmail.com>发送时间:2017年2月21日(星期二) 09:41收件人:dev@cordova.apache.org <de...@cordova.apache.org>抄 送:李广镇(广镇) <gu...@alibaba-inc.com>主 题:Re: Anyone can help me about add new platform to cordova?
Also check out https://issues.apache.org/jira/browse/CB-11000 which depends on https://issues.apache.org/jira/browse/CB-11346
On Mon, Feb 20, 2017 at 10:25 AM, Steven Gill <st...@gmail.com> wrote:
You only need to support Api.js.

Cordova has a bunch of built in checks for our core platforms. We want to
remove them so if you have a compatible platform, it should work.



On Feb 19, 2017 10:19 PM, "李广镇" <gu...@alibaba-inc.com> wrote:

> Hi all,
>   I'm trying to add a new platform for cordova.
>   I have analyzed android port as a reference these
> days, and found there are two kinds of platform support architecture.
>   1) Inside cordova-lib repo
>       cordova-lib/cordova-lib/src/cordova/metadata/android_
> parser.js  //For prepare andorid projects
>       cordova-lib/cordova-lib/src/plugman/platforms/android.
> js  // For plugin supports
>   2) Inside cordova-android repo
>       Main entry is Api.js, 'prepare' and 'plugin support'
> functions are moved inside this repo.
>   Found some platforms support only use the first one, such as browser.
>   android and iOS use both of these two ways.
>   My questions:
>   1) If I want to add a new platform support, do I need
> support both of these two ways? or just the second one?
>   2) When I finished the development of new platform
> support locally, Is there any requirements need to be done
> for cordova to accept these patches?  such as, do I need
> support all of the core 21 plugins API?
>   Can anyone give me a suggestion?
>
> Thanks.
> Guangzhen
>


Re: Anyone can help me about add new platform to cordova?

Posted by Shazron <sh...@gmail.com>.
Also check out https://issues.apache.org/jira/browse/CB-11000 which depends
on https://issues.apache.org/jira/browse/CB-11346

On Mon, Feb 20, 2017 at 10:25 AM, Steven Gill <st...@gmail.com>
wrote:

> You only need to support Api.js.
>
> Cordova has a bunch of built in checks for our core platforms. We want to
> remove them so if you have a compatible platform, it should work.
>
>
>
> On Feb 19, 2017 10:19 PM, "李广镇" <gu...@alibaba-inc.com> wrote:
>
> > Hi all,
> >   I'm trying to add a new platform for cordova.
> >   I have analyzed android port as a reference these
> > days, and found there are two kinds of platform support architecture.
> >   1) Inside cordova-lib repo
> >       cordova-lib/cordova-lib/src/cordova/metadata/android_
> > parser.js  //For prepare andorid projects
> >       cordova-lib/cordova-lib/src/plugman/platforms/android.
> > js  // For plugin supports
> >   2) Inside cordova-android repo
> >       Main entry is Api.js, 'prepare' and 'plugin support'
> > functions are moved inside this repo.
> >   Found some platforms support only use the first one, such as browser.
> >   android and iOS use both of these two ways.
> >   My questions:
> >   1) If I want to add a new platform support, do I need
> > support both of these two ways? or just the second one?
> >   2) When I finished the development of new platform
> > support locally, Is there any requirements need to be done
> > for cordova to accept these patches?  such as, do I need
> > support all of the core 21 plugins API?
> >   Can anyone give me a suggestion?
> >
> > Thanks.
> > Guangzhen
> >
>

Re: Anyone can help me about add new platform to cordova?

Posted by Steven Gill <st...@gmail.com>.
You only need to support Api.js.

Cordova has a bunch of built in checks for our core platforms. We want to
remove them so if you have a compatible platform, it should work.



On Feb 19, 2017 10:19 PM, "李广镇" <gu...@alibaba-inc.com> wrote:

> Hi all,
>   I'm trying to add a new platform for cordova.
>   I have analyzed android port as a reference these
> days, and found there are two kinds of platform support architecture.
>   1) Inside cordova-lib repo
>       cordova-lib/cordova-lib/src/cordova/metadata/android_
> parser.js  //For prepare andorid projects
>       cordova-lib/cordova-lib/src/plugman/platforms/android.
> js  // For plugin supports
>   2) Inside cordova-android repo
>       Main entry is Api.js, 'prepare' and 'plugin support'
> functions are moved inside this repo.
>   Found some platforms support only use the first one, such as browser.
>   android and iOS use both of these two ways.
>   My questions:
>   1) If I want to add a new platform support, do I need
> support both of these two ways? or just the second one?
>   2) When I finished the development of new platform
> support locally, Is there any requirements need to be done
> for cordova to accept these patches?  such as, do I need
> support all of the core 21 plugins API?
>   Can anyone give me a suggestion?
>
> Thanks.
> Guangzhen
>