Skip to content

Commit

Permalink
refactor(app-update)!: remove currentVersion and availableVersion
Browse files Browse the repository at this point in the history
… properties (#150)
  • Loading branch information
robingenz committed Feb 27, 2024
1 parent de6bcf8 commit a8e0940
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-buckets-joke.md
@@ -0,0 +1,5 @@
---
'@capawesome/capacitor-app-update': major
---

refactor: remove `currentVersion` and `availableVersion` properties
11 changes: 11 additions & 0 deletions packages/app-update/BREAKING.md
Expand Up @@ -4,8 +4,19 @@ This is a comprehensive list of the breaking changes introduced in the major ver

## Versions

- [Version 6.x.x](#version-6xx)
- [Version 5.x.x](#version-5xx)

## Version 6.x.x

### `currentVersion` property

The `currentVersion` property has been replaced by the `currentVersionCode` and `currentVersionName` properties in the `AppUpdateInfo` interface.

### `availableVersion` property

The `availableVersion` property has been replaced by the `availableVersionCode` and `availableVersionName` properties in the `AppUpdateInfo` interface.

## Version 5.x.x

### Capacitor 5
Expand Down
Expand Up @@ -80,9 +80,7 @@ public void getAppUpdateInfo(PluginCall call) {
}
JSObject ret = new JSObject();
ret.put("currentVersionName", pInfo.versionName);
ret.put("currentVersion", String.valueOf(pInfo.versionCode));
ret.put("currentVersionCode", String.valueOf(pInfo.versionCode));
ret.put("availableVersion", String.valueOf(appUpdateInfo.availableVersionCode()));
ret.put("availableVersionCode", String.valueOf(appUpdateInfo.availableVersionCode()));
ret.put("updateAvailability", appUpdateInfo.updateAvailability());
ret.put("updatePriority", appUpdateInfo.updatePriority());
Expand Down
2 changes: 0 additions & 2 deletions packages/app-update/ios/Plugin/AppUpdatePlugin.swift
Expand Up @@ -46,9 +46,7 @@ public class AppUpdatePlugin: CAPPlugin {
call.resolve([
"currentVersionName": currentVersionName,
"availableVersionName": availableVersionName,
"currentVersion": currentVersionName,
"currentVersionCode": currentVersionCode,
"availableVersion": availableVersionName,
"availableVersionReleaseDate": availableVersionReleaseDate,
"updateAvailability": updateAvailability,
"minimumOsVersion": minimumOsVersion
Expand Down
16 changes: 0 additions & 16 deletions packages/app-update/src/definitions.ts
Expand Up @@ -80,14 +80,6 @@ export interface AppUpdateInfo {
* @example "1.1.0"
*/
availableVersionName?: string;
/**
* Version code (Android) or CFBundleShortVersionString (iOS) of the currently installed app version.
*
* Only available on Android and iOS.
*
* @deprecated On **Android**, use `currentVersionCode` instead. On **iOS**, use `currentVersionName` instead.
*/
currentVersion: string;
/**
* The current version code of the app.
*
Expand All @@ -100,14 +92,6 @@ export interface AppUpdateInfo {
* @example "1"
*/
currentVersionCode: string;
/**
* Version code (Android) or CFBundleShortVersionString (iOS) of the update.
*
* Only available on Android and iOS.
*
* @deprecated On **Android**, use `availableVersionCode` instead. On **iOS**, use `availableVersionName` instead.
*/
availableVersion: string;
/**
* The available version code of the update.
*
Expand Down
5 changes: 3 additions & 2 deletions packages/file-picker/BREAKING.md
Expand Up @@ -4,13 +4,14 @@ This is a comprehensive list of the breaking changes introduced in the major ver

## Versions

- [Version 6.x.x](#version-6xx)
- [Version 5.x.x](#version-5xx)

## Version 6.x.x

### Replace the `multiple` option
### `multiple` property

The `multiple` option has been replaced by a new `limit` option in the `pickFiles(...)`, `pickImages(...)`, `pickMedia(...)` and `pickVideos(...)` methods.
The `multiple` property has been replaced by a new `limit` property in the `PickFilesOptions` and `PickMediaOptions` interfaces.

## Version 5.x.x

Expand Down

0 comments on commit a8e0940

Please sign in to comment.