Skip to content

Commit

Permalink
fix: definition issue and ios return key
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Oct 27, 2022
1 parent 115eb2c commit 7f2f0ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ios/Plugin/CapacitorUpdaterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
resArr.append(v.toJSON())
}
call.resolve([
"versions": resArr
"bundles": resArr
])
}

Expand Down
20 changes: 10 additions & 10 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ declare module '@capacitor/cli' {
autoUpdate?: boolean;

/**
* Automatically delete previous downloaded bundles when a newer native app version is installed to the device.
* Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device.
*
* Only available for Android and iOS.
*
Expand Down Expand Up @@ -108,7 +108,7 @@ export interface DownloadEvent {
}
export interface MajorAvailableEvent {
/**
* Emit when a new major version is available.
* Emit when a new major bundle is available.
*
* @since 4.0.0
*/
Expand Down Expand Up @@ -192,9 +192,9 @@ export interface CapacitorUpdaterPlugin {
notifyAppReady(): Promise<BundleInfo>;

/**
* Download a new version from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
* Download a new bundle from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
*
* @returns {Promise<BundleInfo>} The {@link BundleInfo} for the specified version.
* @returns {Promise<BundleInfo>} The {@link BundleInfo} for the specified bundle.
* @param url The URL of the bundle zip file (e.g: dist.zip) to be downloaded. (This can be any URL. E.g: Amazon S3, a github tag, any other place you've hosted your bundle.)
* @param version set the version code/name of this bundle/version
* @example https://example.com/versions/{version}/dist.zip
Expand All @@ -206,7 +206,7 @@ export interface CapacitorUpdaterPlugin {
*
* @returns {Promise<BundleInfo>} The {@link BundleInfo} for the specified bundle id.
* @param id The bundle id to set as current, next time the app is reloaded. See {@link BundleInfo.id}
* @throws An error if there are is no index.html file inside the version folder.
* @throws An error if there are is no index.html file inside the bundle folder.
*/
next(options: { id: string }): Promise<BundleInfo>;

Expand All @@ -215,7 +215,7 @@ export interface CapacitorUpdaterPlugin {
*
* @param id The bundle id to set as current. See {@link BundleInfo.id}
* @returns {Promise<Void>} An empty promise.
* @throws An error if there are is no index.html file inside the version folder.
* @throws An error if there are is no index.html file inside the bundle folder.
*/
set(options: { id: string }): Promise<void>;

Expand All @@ -229,15 +229,15 @@ export interface CapacitorUpdaterPlugin {
delete(options: { id: string }): Promise<void>;

/**
* Get all available versions
* Get all available bundles
*
* @returns {Promise<{version: BundleInfo[]}>} an Promise witht the version list
* @returns {Promise<{bundles: BundleInfo[]}>} an Promise witht the bundles list
* @throws An error if the something went wrong
*/
list(): Promise<{ bundles: BundleInfo[] }>;

/**
* Set the `builtin` version (the one sent to Apple store / Google play store ) as current version
* Set the `builtin` bundle (the one sent to Apple store / Google play store ) as current bundle
*
* @returns {Promise<void>} an empty Promise
* @param toLastSuccessful [false] if yes it reset to to the last successfully loaded bundle instead of `builtin`
Expand Down Expand Up @@ -305,7 +305,7 @@ export interface CapacitorUpdaterPlugin {
cancelDelay(): Promise<void>;

/**
* Get Latest version available from update Url
* Get Latest bundle available from update Url
*
* @returns {Promise<latestVersion>} an Promise resolved when url is loaded
* @throws An error if the something went wrong
Expand Down

0 comments on commit 7f2f0ae

Please sign in to comment.