@reown/appkit-core-react-native 0.0.0-develop-20241119182218 → 0.0.0-develop-20241121145434

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.
@@ -10,9 +10,16 @@ const ApiUtil = exports.ApiUtil = {
10
10
  getOrigin() {
11
11
  return _CoreHelperUtil.CoreHelperUtil.getBundleId();
12
12
  },
13
+ getReactNativeVersion() {
14
+ return [_reactNative.Platform.constants?.reactNativeVersion?.major, _reactNative.Platform.constants?.reactNativeVersion?.minor, _reactNative.Platform.constants?.reactNativeVersion?.patch].join('.');
15
+ },
13
16
  getUserAgent() {
14
- const reactNativeVersion = [_reactNative.Platform.constants.reactNativeVersion.major, _reactNative.Platform.constants.reactNativeVersion.minor, _reactNative.Platform.constants.reactNativeVersion.patch].join('.');
15
- return `${_reactNative.Platform.OS}-${_reactNative.Platform.Version}@rn-${reactNativeVersion}`;
17
+ const rnVersion = _reactNative.Platform.select({
18
+ ios: this.getReactNativeVersion(),
19
+ android: this.getReactNativeVersion(),
20
+ default: 'undefined'
21
+ });
22
+ return `${_reactNative.Platform.OS}-${_reactNative.Platform.Version}@rn-${rnVersion}`;
16
23
  }
17
24
  };
18
25
  //# sourceMappingURL=ApiUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_CoreHelperUtil","ApiUtil","exports","getOrigin","CoreHelperUtil","getBundleId","getUserAgent","reactNativeVersion","Platform","constants","major","minor","patch","join","OS","Version"],"sourceRoot":"../../../src","sources":["utils/ApiUtil.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEO,MAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACrBE,SAASA,CAAA,EAAG;IACV,OAAOC,8BAAc,CAACC,WAAW,CAAC,CAAC;EACrC,CAAC;EAEDC,YAAYA,CAAA,EAAG;IACb,MAAMC,kBAAkB,GAAG,CACzBC,qBAAQ,CAACC,SAAS,CAACF,kBAAkB,CAACG,KAAK,EAC3CF,qBAAQ,CAACC,SAAS,CAACF,kBAAkB,CAACI,KAAK,EAC3CH,qBAAQ,CAACC,SAAS,CAACF,kBAAkB,CAACK,KAAK,CAC5C,CAACC,IAAI,CAAC,GAAG,CAAC;IAEX,OAAQ,GAAEL,qBAAQ,CAACM,EAAG,IAAGN,qBAAQ,CAACO,OAAQ,OAAMR,kBAAmB,EAAC;EACtE;AACF,CAAC"}
1
+ {"version":3,"names":["_reactNative","require","_CoreHelperUtil","ApiUtil","exports","getOrigin","CoreHelperUtil","getBundleId","getReactNativeVersion","Platform","constants","reactNativeVersion","major","minor","patch","join","getUserAgent","rnVersion","select","ios","android","default","OS","Version"],"sourceRoot":"../../../src","sources":["utils/ApiUtil.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEO,MAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACrBE,SAASA,CAAA,EAAG;IACV,OAAOC,8BAAc,CAACC,WAAW,CAAC,CAAC;EACrC,CAAC;EAEDC,qBAAqBA,CAAA,EAAG;IACtB,OAAO,CACLC,qBAAQ,CAACC,SAAS,EAAEC,kBAAkB,EAAEC,KAAK,EAC7CH,qBAAQ,CAACC,SAAS,EAAEC,kBAAkB,EAAEE,KAAK,EAC7CJ,qBAAQ,CAACC,SAAS,EAAEC,kBAAkB,EAAEG,KAAK,CAC9C,CAACC,IAAI,CAAC,GAAG,CAAC;EACb,CAAC;EAEDC,YAAYA,CAAA,EAAG;IACb,MAAMC,SAAS,GAAGR,qBAAQ,CAACS,MAAM,CAAC;MAChCC,GAAG,EAAE,IAAI,CAACX,qBAAqB,CAAC,CAAC;MACjCY,OAAO,EAAE,IAAI,CAACZ,qBAAqB,CAAC,CAAC;MACrCa,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,OAAQ,GAAEZ,qBAAQ,CAACa,EAAG,IAAGb,qBAAQ,CAACc,OAAQ,OAAMN,SAAU,EAAC;EAC7D;AACF,CAAC"}
@@ -4,9 +4,16 @@ export const ApiUtil = {
4
4
  getOrigin() {
5
5
  return CoreHelperUtil.getBundleId();
6
6
  },
7
+ getReactNativeVersion() {
8
+ return [Platform.constants?.reactNativeVersion?.major, Platform.constants?.reactNativeVersion?.minor, Platform.constants?.reactNativeVersion?.patch].join('.');
9
+ },
7
10
  getUserAgent() {
8
- const reactNativeVersion = [Platform.constants.reactNativeVersion.major, Platform.constants.reactNativeVersion.minor, Platform.constants.reactNativeVersion.patch].join('.');
9
- return `${Platform.OS}-${Platform.Version}@rn-${reactNativeVersion}`;
11
+ const rnVersion = Platform.select({
12
+ ios: this.getReactNativeVersion(),
13
+ android: this.getReactNativeVersion(),
14
+ default: 'undefined'
15
+ });
16
+ return `${Platform.OS}-${Platform.Version}@rn-${rnVersion}`;
10
17
  }
11
18
  };
12
19
  //# sourceMappingURL=ApiUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","CoreHelperUtil","ApiUtil","getOrigin","getBundleId","getUserAgent","reactNativeVersion","constants","major","minor","patch","join","OS","Version"],"sourceRoot":"../../../src","sources":["utils/ApiUtil.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,OAAO,GAAG;EACrBC,SAASA,CAAA,EAAG;IACV,OAAOF,cAAc,CAACG,WAAW,CAAC,CAAC;EACrC,CAAC;EAEDC,YAAYA,CAAA,EAAG;IACb,MAAMC,kBAAkB,GAAG,CACzBN,QAAQ,CAACO,SAAS,CAACD,kBAAkB,CAACE,KAAK,EAC3CR,QAAQ,CAACO,SAAS,CAACD,kBAAkB,CAACG,KAAK,EAC3CT,QAAQ,CAACO,SAAS,CAACD,kBAAkB,CAACI,KAAK,CAC5C,CAACC,IAAI,CAAC,GAAG,CAAC;IAEX,OAAQ,GAAEX,QAAQ,CAACY,EAAG,IAAGZ,QAAQ,CAACa,OAAQ,OAAMP,kBAAmB,EAAC;EACtE;AACF,CAAC"}
1
+ {"version":3,"names":["Platform","CoreHelperUtil","ApiUtil","getOrigin","getBundleId","getReactNativeVersion","constants","reactNativeVersion","major","minor","patch","join","getUserAgent","rnVersion","select","ios","android","default","OS","Version"],"sourceRoot":"../../../src","sources":["utils/ApiUtil.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,OAAO,GAAG;EACrBC,SAASA,CAAA,EAAG;IACV,OAAOF,cAAc,CAACG,WAAW,CAAC,CAAC;EACrC,CAAC;EAEDC,qBAAqBA,CAAA,EAAG;IACtB,OAAO,CACLL,QAAQ,CAACM,SAAS,EAAEC,kBAAkB,EAAEC,KAAK,EAC7CR,QAAQ,CAACM,SAAS,EAAEC,kBAAkB,EAAEE,KAAK,EAC7CT,QAAQ,CAACM,SAAS,EAAEC,kBAAkB,EAAEG,KAAK,CAC9C,CAACC,IAAI,CAAC,GAAG,CAAC;EACb,CAAC;EAEDC,YAAYA,CAAA,EAAG;IACb,MAAMC,SAAS,GAAGb,QAAQ,CAACc,MAAM,CAAC;MAChCC,GAAG,EAAE,IAAI,CAACV,qBAAqB,CAAC,CAAC;MACjCW,OAAO,EAAE,IAAI,CAACX,qBAAqB,CAAC,CAAC;MACrCY,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,OAAQ,GAAEjB,QAAQ,CAACkB,EAAG,IAAGlB,QAAQ,CAACmB,OAAQ,OAAMN,SAAU,EAAC;EAC7D;AACF,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export declare const ApiUtil: {
2
2
  getOrigin(): any;
3
+ getReactNativeVersion(): string;
3
4
  getUserAgent(): string;
4
5
  };
5
6
  //# sourceMappingURL=ApiUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/ApiUtil.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;;;CAcnB,CAAC"}
1
+ {"version":3,"file":"ApiUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/ApiUtil.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;;;;CAsBnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-core-react-native",
3
- "version": "0.0.0-develop-20241119182218",
3
+ "version": "0.0.0-develop-20241121145434",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "types": "lib/typescript/index.d.ts",
6
6
  "module": "lib/module/index.js",
@@ -38,7 +38,7 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@reown/appkit-common-react-native": "0.0.0-develop-20241119182218",
41
+ "@reown/appkit-common-react-native": "0.0.0-develop-20241121145434",
42
42
  "valtio": "1.11.2"
43
43
  },
44
44
  "peerDependencies": {
@@ -6,13 +6,21 @@ export const ApiUtil = {
6
6
  return CoreHelperUtil.getBundleId();
7
7
  },
8
8
 
9
- getUserAgent() {
10
- const reactNativeVersion = [
11
- Platform.constants.reactNativeVersion.major,
12
- Platform.constants.reactNativeVersion.minor,
13
- Platform.constants.reactNativeVersion.patch
9
+ getReactNativeVersion() {
10
+ return [
11
+ Platform.constants?.reactNativeVersion?.major,
12
+ Platform.constants?.reactNativeVersion?.minor,
13
+ Platform.constants?.reactNativeVersion?.patch
14
14
  ].join('.');
15
+ },
16
+
17
+ getUserAgent() {
18
+ const rnVersion = Platform.select({
19
+ ios: this.getReactNativeVersion(),
20
+ android: this.getReactNativeVersion(),
21
+ default: 'undefined'
22
+ });
15
23
 
16
- return `${Platform.OS}-${Platform.Version}@rn-${reactNativeVersion}`;
24
+ return `${Platform.OS}-${Platform.Version}@rn-${rnVersion}`;
17
25
  }
18
26
  };