Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capacitor Support #615

Closed
AgDude opened this issue Jan 16, 2019 · 42 comments
Closed

Capacitor Support #615

AgDude opened this issue Jan 16, 2019 · 42 comments

Comments

@AgDude
Copy link

AgDude commented Jan 16, 2019

I think the title says it all. https://capacitor.ionicframework.com/

Capacitor is becoming the preferred solution for new Ionic apps, and we are looking at moving some of our existing apps to that as well. We have thus far been very happy with code-push in our cordova apps and would like very much like to continue using it as we make the transition to capacitor.

This was discussed here: microsoft/cordova-plugin-code-push#450 (but that doesn't seem like the right place for it)

@botatoes
Copy link
Contributor

botatoes commented Jan 22, 2019

Hi,

Thanks for the feedback for CodePush. I've added Capacitor to the code-push backlog. We are looking through priorities and adjusting them accordingly. Unfortunately, Capacitor support is not on our backlog for this quarter. We are aware of its growth and will continue to monitor its presence to help better prioritize our backlog of feature requests. Will close this for now

@sneko
Copy link

sneko commented May 28, 2019

Hi @botatoes , do you have any news on this?

Thank you,

@dylanvdmerwe
Copy link

dylanvdmerwe commented May 31, 2019

Capacitor is now fully released on version 1 and is the preferred method recommended by the ionic team to do native apps - not cordova. https://blog.ionicframework.com/announcing-capacitor-1-0/

@digaus
Copy link

digaus commented Jul 28, 2019

Its now 3rd quarter and I want to switch to capacitor but cannot because code push is not supported... Would rellay love to get a fast update on this..

@dylanvdmerwe
Copy link

Code push is a blocker for us to move to Capacitor.

@DavidBajon
Copy link

Still no update on this?

@jacksongross
Copy link

It's been a while now and Capacitor is past a 1.0 release now (they are actually working towards a 2.0 release). Can anyone share an update on when this might be available? This is a huge blocker for our team to move to Capacitor.

@thgick
Copy link

thgick commented Apr 2, 2020 via email

@kapten96
Copy link

kapten96 commented Jun 9, 2020

Any updates on this?

@darron1217
Copy link

darron1217 commented Jul 19, 2020

Capacitor is currently 2.3 and working towards 3.0

npm's weekly download count is currently 64,825 and there are plenty of potential users(who uses cordova for now) waiting for plugin supports.

Also this is a web resource, which might be easier to implement rather than native scripts (I guess)

@rvuyyuru1
Copy link

any update on this please

@johannds
Copy link

+1 for Capacitor support. The platform is growing rapidly and the company that heads up development on it have ramped up their development efforts.

@sta55en
Copy link

sta55en commented Aug 29, 2020

This is something that is urgently needed. Capacitor is heading towards a version 3.0 release soon and there's no support, even though there are thousands of projects using Capacitor out there.

When is the plan to support it?

@HumanX-Life
Copy link

Please? Not sure what else to say after all the requests on this issue.

@dylanvdmerwe
Copy link

dylanvdmerwe commented Sep 17, 2020

As per my previous comment, code push over a year later is still a blocker for us before we can migrate to capacitor.

@rizrmd
Copy link

rizrmd commented Sep 17, 2020

Current progress is stalled at microsoft/cordova-plugin-code-push#450 (comment)

@mkuchak
Copy link

mkuchak commented Sep 30, 2020

+1 That would be a very, very desirable feature.

@alimcharaniya
Copy link

+1 to everyone above. I would prefer using MS CodePush over Ionic's AppFlow.

Don't forget documentation for mono-repos (lerna), please. As many ionic developers are reusing web-app code.

@andreidubov andreidubov reopened this Oct 13, 2020
@andreidubov
Copy link
Contributor

Reopened the card due to a large number of requests for capacitor support.

@edy-ap
Copy link

edy-ap commented Oct 17, 2020

+1
here is some work
https://github.com/areo/capacitor-codepush

@Babsvik
Copy link

Babsvik commented Dec 4, 2020

Reopened the card due to a large number of requests for capacitor support.

Hey @andreidubov do you guys have any eta on when this might have a release candidate?

@rammere
Copy link

rammere commented Dec 16, 2020

Hey ,
The community is very big now,
Can we get ETA for this one ?

@andrii-z4i
Copy link

Hi @rammere , thank you for your patience, but I think we will not be able to work on it soon.
The reason for this is that we are in maintenance mode now Roadmap 2020-2021

Just like any software engineering team, as we focused on building and scaling App Center, we accumulated technical debt that can no longer be sustained. Therefore, as we look to what is next, the App Center team will prioritize improving reliability and performance for the service through mid-2021. This means new feature work will be significantly reduced. Switching focus to reliability and performance wasn’t an easy decision, but nevertheless an important one.

Saying that I would expect that we can come back to the feature roadmap review not sooner than the mid of 2021.

@gillarf
Copy link

gillarf commented Jan 13, 2021

+1 for this - please, we really need this to work with Capacitor

@GalvinGao
Copy link

GalvinGao commented Jan 16, 2021

DISCLAIMER: This comment proposes a possible "workaround" style answer to the problem and may not be recommended. You shall not use this approach before the AppCenter team call for a real release on Capacitor platform but, with that being said if it works well then it doesn't matter xD

I was trying to just dive in with the Cordova option that AppCenter claims to be supporting and surprisingly it works (and very surprisingly almost hassle-free), at least from what I can tell - I saw myself in the Analytics panel of AppCenter.
Here's the steps I taken, basically following the instructions on the Capacitor side where you install the Cordova plugins:

  1. Install all AppCenter capabilities with yarn add cordova-plugin-appcenter-analytics cordova-plugin-appcenter-crashes cordova-plugin-appcenter-push (OR if you are using npm: npm install cordova-plugin-appcenter-analytics cordova-plugin-appcenter-crashes cordova-plugin-appcenter-push)
  2. npx cap sync
  3. Add <preference name="APP_SECRET" value="..." /> (do NOT wrap with <platform> tags) to iOS/App/App/config.xml and Android/app/src/main/res/xml/config.xml
    • NOTICE: after you've filled in your APP_SECRET, do NOT run npx cap update or your APP_SECRET will be removed by Capacitor. I haven't found a working method of getting Capacitor copy over the APP_SECRET for me (and seems they doesn't support it by-design: See Important: Configuration at here)
    • After this your config.xml shall look like this:
`ios/App/App/config.xml` Content
<?xml version='1.0' encoding='utf-8'?>
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <access origin="*" />
  
  <feature name="AppCenterAnalytics">
    <param name="ios-package" value="AppCenterAnalyticsPlugin"/>
    <param name="onload" value="true"/>
  </feature>

  <feature name="AppCenterCrashes">
    <param name="ios-package" value="AppCenterCrashesPlugin"/>
    <param name="onload" value="true"/>
  </feature>

  <feature name="AppCenterPush">
    <param name="ios-package" value="AppCenterPushPlugin"/>
    <param name="onload" value="true"/>
  </feature>

  <feature name="AppCenterShared">
    <param name="ios-package" value="AppCenterSharedPlugin"/>
    <param name="onload" value="true"/>
  </feature>

  <preference name="APP_SECRET" value="00000000-0000-0000-0000-000000000000" />
  
</widget>
  1. Go to your project file, build and run it! After you launch your App you should be able to see it in the Analytics panel of AppCenter now.
Here's a screenshot

image

Hope this helps!

  • Edit: remove -D option from yarn

@Mahmoud-Masri
Copy link

Mahmoud-Masri commented Jan 27, 2021

Just add this and it will work (at least for android, I haven't tested it on IOS yet)

note: change dist with the name of the folder you're uploading to the code-push

const baseUrl = (
    await Capacitor.Plugins!.Filesystem.getUri({ path: '', directory: FilesystemDirectory.Data })
).uri.replace('file://', '')

codePush.getPendingPackage((localPackage) => {
    if (localPackage) {
        const path = `${baseUrl}${localPackage.localPath}/dist`
        switchToPath(path)
    } else {
        codePush.getCurrentPackage((localPackage) => {
            const path = `${baseUrl}${localPackage.localPath}/dist`
            switchToPath(path)
        })
    }
})


async function switchToPath(path: string) {
    if ((await Capacitor.Plugins!.WebView.getServerBasePath()).path === path) {
        return
    }

    Capacitor.Plugins!.WebView.setServerBasePath({ path })
    Capacitor.Plugins!.WebView.persistServerBasePath()
}

Off course you'll also need to add the development key to the config.xml

<preference name="CodePushDeploymentKey" value="xxxxx" />

@leo6104
Copy link

leo6104 commented Feb 5, 2021

I made a plugin for Capacitor CodePush. It require @capacitor 3.0.0-beta.1 version & plugins.
https://github.com/mapiacompany/capacitor-codepush

It has an issue with @capacitor/filesystem plugin for now. After next release, it will be working.

I tested it in Android & iOS.

@gillarf
Copy link

gillarf commented Mar 1, 2021

I made a plugin for Capacitor CodePush. It require @capacitor 3.0.0-beta.1 version & plugins.
https://github.com/mapiacompany/capacitor-codepush

It has an issue with @capacitor/filesystem plugin for now. After next release, it will be working.

I tested it in Android & iOS.

Thanks for much for the hard work @leo6104 - do you have any updates on the next release? It would be great to have filesystem working.

@leo6104
Copy link

leo6104 commented Mar 1, 2021

It is my working dependencies. (package.json)

    "capacitor-codepush": "git+https://github.com/mapiacompany/capacitor-codepush.git",
    "@capacitor-community/http": "git+https://github.com/leo6104/capacitor-community-http.git#dist",
    "@capacitor/device": "^0.5.3",
    "@capacitor/dialog": "^0.4.3",
    "@capacitor/filesystem": "^0.4.0",

There is no issue with capacitor official plugins latest version. (device, dialog, filesystem)
But, it has an issue with @capacitor-community/http plugin. (Compatibility issue with Capacitor >= 3.0.0-beta.2)

In my project, i cannot wait for next release of @capacitor-community/http so i fork the @capacitor-community/http repository and fix some issue and use the git url https://github.com/leo6104/capacitor-community-http.git#dist

In the future they release 1.0.0 stable version, i will replace my git repository to @capacitor-community/http capacitor v3.

When its all dependencies to be stable, i have a plan to publish it in npm repository.
If Capacitor team approve it included on capacitor-community, Its plugin will be named to @capacitor-community/codepush. If they not approve, it might be @mapiacompany/capacitor-codepush

I will comment on here when it release on NPM.

@alexcroox
Copy link

alexcroox commented Mar 1, 2021

Fingers crossed @leo6104 I'm very curious to know if they accept it into capacitor-community given their Appflow product 🤞 . Either way thanks again for your hard work on getting this working, there is a ton of people that have been waiting for it to move off Cordova and I can't wait to implement it myself!

@mkuchak
Copy link

mkuchak commented Mar 3, 2021

Fingers crossed @leo6104 I'm very curious to know if they accept it into capacitor-community given their Appflow product . Either way thanks again for your hard work on getting this working, there is a ton of people that have been waiting for it to move off Cordova and I can't wait to implement it myself!

I expect the same thing. If they do not accept it, it is simply not an "open source" project and does not deserve to be used with this purpose.

@o-alexandrov
Copy link

@andreidubov @andrii-z4i
Could you kindly update on the plans for this feature?

  • hopefully, this project is still alive, even though since Apr 22nd 2021, there's no date when the enhancements in this repo will be resumed

The great part is:

It would be great for the community, if you could support the project there by either:

  • adopting it into this repo
  • or by making sure, the interaction between the capacitor plugin above and App Center is as you envisioned

@ashish141199
Copy link

Hi @andreidubov @andrii-z4i
Since now ionic has officially discontinued cordova and are now actively promoting capacitor, more and more developers and organisations are shifting to capacitor. We request you to provide support for capacitor as soon as possible. Or maybe atleast let us know your plans on the same.

@gijsmin
Copy link

gijsmin commented Aug 20, 2021

Any news?

@conkyliu
Copy link

conkyliu commented Sep 2, 2021

我为 Capacitor CodePush 制作了一个插件。它需要@capacitor 3.0.0-beta.1 版本和插件。
https://github.com/mapiacompany/capacitor-codepush

目前@capacitor/filesystem 插件存在问题。下一个版本后,它将起作用。

我在 Android 和 iOS 上对其进行了测试。

Can capatcitor v2 work?

@jsBiztech
Copy link

Is there any update on when the support for code push will be available?

@Hambat
Copy link

Hambat commented Sep 21, 2021

Any updates code-push for capacitor 3?

@alexcroox
Copy link

@Hambat please read this thread, a working version is here: https://github.com/mapiacompany/capacitor-codepush

@Ankitd013
Copy link

Can anyone make a video documentation using capacitor-codepush.It will be very much helpful.
I tried every steps but still code push is not working.

@ghost ghost added the Stale label Dec 13, 2021
@ghost
Copy link

ghost commented Dec 13, 2021

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

@ghost
Copy link

ghost commented Dec 28, 2021

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

@ghost ghost closed this as completed Dec 28, 2021
@riderx
Copy link

riderx commented Nov 1, 2022

If needed i made an alternative tool for capacitor : https://github.com/Cap-go/capacitor-updater

@ghost ghost removed the Stale label Nov 1, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests