Skip to content

Commit

Permalink
fix: rename getId in getDeviceId
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Jul 9, 2022
1 parent 9d2dacd commit caac92c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ public void notifyDownload(final String id, final int percent) {


@PluginMethod
public void getId(final PluginCall call) {
public void getDeviceId(final PluginCall call) {
try {
final JSObject ret = new JSObject();
ret.put("id", this.implementation.deviceID);
ret.put("deviceId", this.implementation.deviceID);
call.resolve(ret);
} catch (final Exception e) {
Log.e(CapacitorUpdater.TAG, "Could not get device id", e);
Expand Down
2 changes: 1 addition & 1 deletion ios/Plugin/CapacitorUpdaterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CAP_PLUGIN_METHOD(notifyAppReady, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(setDelay, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getLatest, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getId, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getDeviceId, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getPluginVersion, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(next, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(isAutoUpdateEnabled, CAPPluginReturnPromise);
Expand Down
4 changes: 2 additions & 2 deletions ios/Plugin/CapacitorUpdaterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
}
}

@objc func getId(_ call: CAPPluginCall) {
call.resolve(["id": implementation.deviceID])
@objc func getDeviceId(_ call: CAPPluginCall) {
call.resolve(["deviceId": implementation.deviceID])
}

@objc func getPluginVersion(_ call: CAPPluginCall) {
Expand Down

0 comments on commit caac92c

Please sign in to comment.