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

fix download progress, update plugins version #74

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'CapacitorCodepush'
s.name = 'NerdfrenzsCapacitorCodepush'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
s.homepage = package['homepage']
s.author = package['author']
s.source = { :git => package['repository'], :tag => s.version.to_s }
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '12.0'
s.ios.deployment_target = '13.0'
s.dependency 'Capacitor'
s.dependency 'SSZipArchive'
s.swift_version = '5.0'
s.swift_version = '5.1'
end
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

# Capacitor Plugin for CodePush

## Capacitor v6 Support [v2.0.1]
## If you want Capacitor v5 plugin, install [v1.0.4]

This plugin provides client-side integration for the [CodePush service](https://microsoft.github.io/code-push/), allowing you to easily add a dynamic update experience to your Capacitor app(s).

<!-- Capacitor Catalog -->
Expand Down Expand Up @@ -31,11 +34,10 @@ In order to ensure that your end users always have a functioning version of your

Tested with these environment
```
"@capacitor-community/http": "^1.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/device": "^1.0.0",
"@capacitor/dialog": "^1.0.0",
"@capacitor/filesystem": "^1.0.0"
"@capacitor/core": "^5.0.3",
"@capacitor/device": "^5.0.2",
"@capacitor/dialog": "^5.0.2",
"@capacitor/filesystem": "^5.0.2"
```

This Capacitor plugin does not work with Capacitor v2 or older versions.
Expand All @@ -45,8 +47,8 @@ This Capacitor plugin does not work with Capacitor v2 or older versions.
Once you've followed the general-purpose ["getting started"](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/) instructions for setting up your CodePush account, you can start CodePush-ifying your Capacitor app by running the following command from within your app's root directory:

```shell
npm i @capacitor-community/http@next @capacitor/device @capacitor/dialog @capacitor/filesystem -D
npm i https://github.com/mapiacompany/capacitor-codepush -D
npm i @capacitor/device @capacitor/dialog @capacitor/filesystem -D
npm i @nerdfrenzs/capacitor-codepush -D
npx cap sync
```

Expand Down Expand Up @@ -99,7 +101,7 @@ With the Capacitor plugin installed and configured, the only thing left is to ad
The simplest way to do this is to perform the following in your app's `deviceready` event handler:

```javascript
import { codePush } from 'capacitor-codepush';
import { codePush } from '@nerdfrenzs/capacitor-codepush';
codePush.sync();
```

Expand All @@ -108,7 +110,7 @@ If an update is available, it will be silently downloaded, and installed the nex
If you would like your app to discover updates more quickly, you can also choose to call `sync` every time the app resumes from the background, by adding the following code (or something equivalent) as part of your app's startup behavior. You can call `sync` as frequently as you would like, so when and where you call it just depends on your personal preference.

```javascript
import { codePush } from 'capacitor-codepush';
import { codePush } from '@nerdfrenzs/capacitor-codepush';
import { Plugins, AppState } from '@capacitor/core';

const { App } = Plugins;
Expand Down
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ buildscript {
apply plugin: 'com.android.library'

android {
namespace "com.microsoft.capacitor.codepush"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
Expand Down Expand Up @@ -49,7 +50,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':capacitor-android')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation 'com.nimbusds:nimbus-jose-jwt:5.1'
implementation('com.nimbusds:nimbus-jose-jwt:5.1') { exclude group: "net.minidev", module: "json-smart" }
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
Expand Down
3 changes: 1 addition & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microsoft.capacitor.codepush">
>
</manifest>
9 changes: 0 additions & 9 deletions dist/esm/callbackUtil.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/esm/callbackUtil.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/esm/callbackUtil.js.map

This file was deleted.

163 changes: 0 additions & 163 deletions dist/esm/codePush.d.ts

This file was deleted.

Loading