@aws-amplify/react-native 1.0.29-unstable.fa02396.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/kotlin/com/amazonaws/amplify/rtncore/AmplifyRTNCoreModule.kt +25 -11
- package/dist/cjs/apis/getDeviceName.js +10 -0
- package/dist/cjs/apis/getDeviceName.js.map +1 -0
- package/dist/cjs/apis/index.js +3 -1
- package/dist/cjs/apis/index.js.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/apis/getDeviceName.d.ts +2 -0
- package/dist/esm/apis/getDeviceName.mjs +8 -0
- package/dist/esm/apis/getDeviceName.mjs.map +1 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.mjs +1 -0
- package/dist/esm/apis/index.mjs.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/types.d.ts +1 -0
- package/ios/AmplifyRTNCore.mm +3 -0
- package/ios/AmplifyRTNCore.swift +39 -23
- package/package.json +5 -5
- package/src/apis/getDeviceName.ts +8 -0
- package/src/apis/index.ts +1 -0
- package/src/index.ts +6 -1
- package/src/types.ts +2 -0
|
@@ -1,29 +1,43 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
package com.amazonaws.amplify.rtncore
|
|
2
5
|
|
|
6
|
+
import android.os.Build
|
|
7
|
+
import com.facebook.react.bridge.Promise
|
|
3
8
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
9
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
10
|
import com.facebook.react.bridge.ReactMethod
|
|
6
|
-
import com.facebook.react.bridge.Promise
|
|
7
11
|
import com.facebook.react.bridge.ReadableMap
|
|
8
12
|
|
|
9
13
|
class AmplifyRTNCoreModule(reactContext: ReactApplicationContext) :
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
14
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
15
|
+
override fun getName(): String {
|
|
16
|
+
return NAME
|
|
17
|
+
}
|
|
15
18
|
|
|
16
19
|
@ReactMethod
|
|
17
|
-
fun computeModPow(
|
|
20
|
+
fun computeModPow(
|
|
21
|
+
payload: ReadableMap,
|
|
22
|
+
promise: Promise,
|
|
23
|
+
) {
|
|
18
24
|
BigInteger.computeModPow(payload, promise)
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
@ReactMethod
|
|
22
|
-
fun computeS(
|
|
28
|
+
fun computeS(
|
|
29
|
+
payload: ReadableMap,
|
|
30
|
+
promise: Promise,
|
|
31
|
+
) {
|
|
23
32
|
BigInteger.computeS(payload, promise)
|
|
24
33
|
}
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
@ReactMethod
|
|
36
|
+
fun getDeviceName(promise: Promise) {
|
|
37
|
+
promise.resolve(Build.MODEL)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
companion object {
|
|
41
|
+
const val NAME = "AmplifyRTNCore"
|
|
42
|
+
}
|
|
29
43
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getDeviceName = void 0;
|
|
7
|
+
const nativeModule_1 = require("../nativeModule");
|
|
8
|
+
const getDeviceName = () => nativeModule_1.nativeModule.getDeviceName();
|
|
9
|
+
exports.getDeviceName = getDeviceName;
|
|
10
|
+
//# sourceMappingURL=getDeviceName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeviceName.js","sources":["../../../src/apis/getDeviceName.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDeviceName = void 0;\nconst nativeModule_1 = require(\"../nativeModule\");\nconst getDeviceName = () => nativeModule_1.nativeModule.getDeviceName();\nexports.getDeviceName = getDeviceName;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAClD,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;AACxE,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
|
package/dist/cjs/apis/index.js
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;
|
|
6
|
+
exports.getDeviceName = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;
|
|
7
7
|
var computeModPow_1 = require("./computeModPow");
|
|
8
8
|
Object.defineProperty(exports, "computeModPow", { enumerable: true, get: function () { return computeModPow_1.computeModPow; } });
|
|
9
9
|
var computeS_1 = require("./computeS");
|
|
10
10
|
Object.defineProperty(exports, "computeS", { enumerable: true, get: function () { return computeS_1.computeS; } });
|
|
11
11
|
var getOperatingSystem_1 = require("./getOperatingSystem");
|
|
12
12
|
Object.defineProperty(exports, "getOperatingSystem", { enumerable: true, get: function () { return getOperatingSystem_1.getOperatingSystem; } });
|
|
13
|
+
var getDeviceName_1 = require("./getDeviceName");
|
|
14
|
+
Object.defineProperty(exports, "getDeviceName", { enumerable: true, get: function () { return getDeviceName_1.getDeviceName; } });
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;\nvar computeModPow_1 = require(\"./computeModPow\");\nObject.defineProperty(exports, \"computeModPow\", { enumerable: true, get: function () { return computeModPow_1.computeModPow; } });\nvar computeS_1 = require(\"./computeS\");\nObject.defineProperty(exports, \"computeS\", { enumerable: true, get: function () { return computeS_1.computeS; } });\nvar getOperatingSystem_1 = require(\"./getOperatingSystem\");\nObject.defineProperty(exports, \"getOperatingSystem\", { enumerable: true, get: function () { return getOperatingSystem_1.getOperatingSystem; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDeviceName = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;\nvar computeModPow_1 = require(\"./computeModPow\");\nObject.defineProperty(exports, \"computeModPow\", { enumerable: true, get: function () { return computeModPow_1.computeModPow; } });\nvar computeS_1 = require(\"./computeS\");\nObject.defineProperty(exports, \"computeS\", { enumerable: true, get: function () { return computeS_1.computeS; } });\nvar getOperatingSystem_1 = require(\"./getOperatingSystem\");\nObject.defineProperty(exports, \"getOperatingSystem\", { enumerable: true, get: function () { return getOperatingSystem_1.getOperatingSystem; } });\nvar getDeviceName_1 = require(\"./getDeviceName\");\nObject.defineProperty(exports, \"getDeviceName\", { enumerable: true, get: function () { return getDeviceName_1.getDeviceName; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AACvG,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAClI,IAAI,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACvC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;AACnH,IAAI,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC3D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC;AACjJ,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.loadAppState = exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.loadAmplifyWebBrowser = exports.loadAmplifyPushNotification = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;
|
|
6
|
+
exports.loadAppState = exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.loadAmplifyWebBrowser = exports.loadAmplifyPushNotification = exports.getDeviceName = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;
|
|
7
7
|
var apis_1 = require("./apis");
|
|
8
8
|
Object.defineProperty(exports, "computeModPow", { enumerable: true, get: function () { return apis_1.computeModPow; } });
|
|
9
9
|
Object.defineProperty(exports, "computeS", { enumerable: true, get: function () { return apis_1.computeS; } });
|
|
10
10
|
Object.defineProperty(exports, "getOperatingSystem", { enumerable: true, get: function () { return apis_1.getOperatingSystem; } });
|
|
11
|
+
Object.defineProperty(exports, "getDeviceName", { enumerable: true, get: function () { return apis_1.getDeviceName; } });
|
|
11
12
|
var moduleLoaders_1 = require("./moduleLoaders");
|
|
12
13
|
Object.defineProperty(exports, "loadAmplifyPushNotification", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyPushNotification; } });
|
|
13
14
|
Object.defineProperty(exports, "loadAmplifyWebBrowser", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyWebBrowser; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loadAppState = exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.loadAmplifyWebBrowser = exports.loadAmplifyPushNotification = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;\nvar apis_1 = require(\"./apis\");\nObject.defineProperty(exports, \"computeModPow\", { enumerable: true, get: function () { return apis_1.computeModPow; } });\nObject.defineProperty(exports, \"computeS\", { enumerable: true, get: function () { return apis_1.computeS; } });\nObject.defineProperty(exports, \"getOperatingSystem\", { enumerable: true, get: function () { return apis_1.getOperatingSystem; } });\nvar moduleLoaders_1 = require(\"./moduleLoaders\");\nObject.defineProperty(exports, \"loadAmplifyPushNotification\", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyPushNotification; } });\nObject.defineProperty(exports, \"loadAmplifyWebBrowser\", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyWebBrowser; } });\nObject.defineProperty(exports, \"loadAsyncStorage\", { enumerable: true, get: function () { return moduleLoaders_1.loadAsyncStorage; } });\nObject.defineProperty(exports, \"loadNetInfo\", { enumerable: true, get: function () { return moduleLoaders_1.loadNetInfo; } });\nObject.defineProperty(exports, \"loadBuffer\", { enumerable: true, get: function () { return moduleLoaders_1.loadBuffer; } });\nObject.defineProperty(exports, \"loadUrlPolyfill\", { enumerable: true, get: function () { return moduleLoaders_1.loadUrlPolyfill; } });\nObject.defineProperty(exports, \"loadGetRandomValues\", { enumerable: true, get: function () { return moduleLoaders_1.loadGetRandomValues; } });\nObject.defineProperty(exports, \"loadBase64\", { enumerable: true, get: function () { return moduleLoaders_1.loadBase64; } });\nObject.defineProperty(exports, \"loadAppState\", { enumerable: true, get: function () { return moduleLoaders_1.loadAppState; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loadAppState = exports.loadBase64 = exports.loadGetRandomValues = exports.loadUrlPolyfill = exports.loadBuffer = exports.loadNetInfo = exports.loadAsyncStorage = exports.loadAmplifyWebBrowser = exports.loadAmplifyPushNotification = exports.getDeviceName = exports.getOperatingSystem = exports.computeS = exports.computeModPow = void 0;\nvar apis_1 = require(\"./apis\");\nObject.defineProperty(exports, \"computeModPow\", { enumerable: true, get: function () { return apis_1.computeModPow; } });\nObject.defineProperty(exports, \"computeS\", { enumerable: true, get: function () { return apis_1.computeS; } });\nObject.defineProperty(exports, \"getOperatingSystem\", { enumerable: true, get: function () { return apis_1.getOperatingSystem; } });\nObject.defineProperty(exports, \"getDeviceName\", { enumerable: true, get: function () { return apis_1.getDeviceName; } });\nvar moduleLoaders_1 = require(\"./moduleLoaders\");\nObject.defineProperty(exports, \"loadAmplifyPushNotification\", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyPushNotification; } });\nObject.defineProperty(exports, \"loadAmplifyWebBrowser\", { enumerable: true, get: function () { return moduleLoaders_1.loadAmplifyWebBrowser; } });\nObject.defineProperty(exports, \"loadAsyncStorage\", { enumerable: true, get: function () { return moduleLoaders_1.loadAsyncStorage; } });\nObject.defineProperty(exports, \"loadNetInfo\", { enumerable: true, get: function () { return moduleLoaders_1.loadNetInfo; } });\nObject.defineProperty(exports, \"loadBuffer\", { enumerable: true, get: function () { return moduleLoaders_1.loadBuffer; } });\nObject.defineProperty(exports, \"loadUrlPolyfill\", { enumerable: true, get: function () { return moduleLoaders_1.loadUrlPolyfill; } });\nObject.defineProperty(exports, \"loadGetRandomValues\", { enumerable: true, get: function () { return moduleLoaders_1.loadGetRandomValues; } });\nObject.defineProperty(exports, \"loadBase64\", { enumerable: true, get: function () { return moduleLoaders_1.loadBase64; } });\nObject.defineProperty(exports, \"loadAppState\", { enumerable: true, get: function () { return moduleLoaders_1.loadAppState; } });\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { nativeModule } from '../nativeModule.mjs';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
const getDeviceName = () => nativeModule.getDeviceName();
|
|
6
|
+
|
|
7
|
+
export { getDeviceName };
|
|
8
|
+
//# sourceMappingURL=getDeviceName.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeviceName.mjs","sources":["../../../src/apis/getDeviceName.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { nativeModule } from '../nativeModule';\nexport const getDeviceName = () => nativeModule.getDeviceName();\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,aAAa,GAAG,MAAM,YAAY,CAAC,aAAa;;;;"}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { computeModPow, computeS, getOperatingSystem } from './apis';
|
|
1
|
+
export { computeModPow, computeS, getOperatingSystem, getDeviceName, } from './apis';
|
|
2
2
|
export { loadAmplifyPushNotification, loadAmplifyWebBrowser, loadAsyncStorage, loadNetInfo, loadBuffer, loadUrlPolyfill, loadGetRandomValues, loadBase64, loadAppState, } from './moduleLoaders';
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { computeModPow } from './apis/computeModPow.mjs';
|
|
2
2
|
export { computeS } from './apis/computeS.mjs';
|
|
3
3
|
export { getOperatingSystem } from './apis/getOperatingSystem.mjs';
|
|
4
|
+
export { getDeviceName } from './apis/getDeviceName.mjs';
|
|
4
5
|
export { loadAmplifyPushNotification } from './moduleLoaders/loadAmplifyPushNotification.mjs';
|
|
5
6
|
export { loadAmplifyWebBrowser } from './moduleLoaders/loadAmplifyWebBrowser.mjs';
|
|
6
7
|
export { loadAsyncStorage } from './moduleLoaders/loadAsyncStorage.mjs';
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/esm/types.d.ts
CHANGED
package/ios/AmplifyRTNCore.mm
CHANGED
|
@@ -13,6 +13,9 @@ RCT_EXTERN_METHOD(computeS:(NSDictionary*)payload
|
|
|
13
13
|
withResolver:(RCTPromiseResolveBlock)resolve
|
|
14
14
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
15
15
|
|
|
16
|
+
RCT_EXTERN_METHOD(getDeviceName:(RCTPromiseResolveBlock)resolve
|
|
17
|
+
withResolver:(RCTPromiseRejectBlock)reject)
|
|
18
|
+
|
|
16
19
|
+ (BOOL)requiresMainQueueSetup
|
|
17
20
|
{
|
|
18
21
|
return NO;
|
package/ios/AmplifyRTNCore.swift
CHANGED
|
@@ -1,29 +1,45 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
#if canImport(UIKit)
|
|
5
|
+
import UIKit
|
|
6
|
+
#else
|
|
7
|
+
import Foundation
|
|
8
|
+
#endif
|
|
9
|
+
|
|
4
10
|
@objc(AmplifyRTNCore)
|
|
5
11
|
class AmplifyRTNCore: NSObject {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
@objc(multiply:withB:withResolver:withRejecter:)
|
|
13
|
+
func multiply(a: Float, b: Float, resolve: RCTPromiseResolveBlock, reject _: RCTPromiseRejectBlock) {
|
|
14
|
+
resolve(a * b)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@objc(computeModPow:withResolver:withRejecter:)
|
|
18
|
+
func computeModPow(
|
|
19
|
+
payload: [String: String],
|
|
20
|
+
resolve: RCTPromiseResolveBlock,
|
|
21
|
+
reject: RCTPromiseRejectBlock
|
|
22
|
+
) {
|
|
23
|
+
BigInteger.computeModPow(payload, resolve: resolve, reject: reject)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@objc(computeS:withResolver:withRejecter:)
|
|
27
|
+
func computeS(
|
|
28
|
+
_ payload: [String: String],
|
|
29
|
+
resolve: RCTPromiseResolveBlock,
|
|
30
|
+
reject: RCTPromiseRejectBlock
|
|
31
|
+
) {
|
|
32
|
+
BigInteger.computeS(payload, resolve: resolve, reject: reject)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@objc(getDeviceName:withResolver:)
|
|
36
|
+
func getDeviceName(resolve: @escaping RCTPromiseResolveBlock, reject _: @escaping RCTPromiseRejectBlock) {
|
|
37
|
+
var deviceName: String
|
|
38
|
+
#if canImport(UIKit)
|
|
39
|
+
deviceName = UIDevice.current.name
|
|
40
|
+
#else
|
|
41
|
+
deviceName = ProcessInfo.processInfo.hostName
|
|
42
|
+
#endif
|
|
43
|
+
resolve(deviceName)
|
|
44
|
+
}
|
|
29
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "React Native core module for aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test": "tslint 'src/**/*.ts'",
|
|
15
15
|
"test:android": "./android/gradlew test -p ./android",
|
|
16
16
|
"build-with-test": "npm run clean && npm test && tsc",
|
|
17
|
-
"build:esm-cjs": "rollup -c rollup.config.mjs",
|
|
17
|
+
"build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
|
|
18
18
|
"build:watch": "npm run build:esm-cjs -- --watch",
|
|
19
19
|
"build": "npm run clean && npm run build:esm-cjs",
|
|
20
20
|
"clean": "rimraf lib-esm lib dist",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"react-native-get-random-values": ">=1.9.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@aws-amplify/rtn-push-notification": "1.2.29
|
|
37
|
-
"@aws-amplify/rtn-web-browser": "1.0.29
|
|
36
|
+
"@aws-amplify/rtn-push-notification": "1.2.29",
|
|
37
|
+
"@aws-amplify/rtn-web-browser": "1.0.29",
|
|
38
38
|
"@react-native-async-storage/async-storage": "^1.17.12",
|
|
39
39
|
"@react-native-community/netinfo": "4.7.0",
|
|
40
40
|
"@types/base-64": "1.0.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"src"
|
|
62
62
|
],
|
|
63
63
|
"source": "src/index",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3283f520db9a28b317b261f08ad0ad33b5957441"
|
|
65
65
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { nativeModule } from '../nativeModule';
|
|
5
|
+
import { RTNCore } from '../types';
|
|
6
|
+
|
|
7
|
+
export const getDeviceName: RTNCore['getDeviceName'] = () =>
|
|
8
|
+
nativeModule.getDeviceName();
|
package/src/apis/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
computeModPow,
|
|
6
|
+
computeS,
|
|
7
|
+
getOperatingSystem,
|
|
8
|
+
getDeviceName,
|
|
9
|
+
} from './apis';
|
|
5
10
|
export {
|
|
6
11
|
loadAmplifyPushNotification,
|
|
7
12
|
loadAmplifyWebBrowser,
|