Giter VIP home page Giter VIP logo

margelo / react-native-bignumber Goto Github PK

View Code? Open in Web Editor NEW
331.0 5.0 11.0 1.4 MB

๐Ÿ”ข The fastest Big Number library for React Native

Home Page: https://margelo.io

License: MIT License

CMake 0.47% C++ 31.05% Java 2.50% JavaScript 47.50% TypeScript 16.36% Objective-C 0.58% Ruby 0.99% Objective-C++ 0.56%
bignumber big number jsi library react native react-native crypto wallet app cryptography math

react-native-bignumber's Introduction

๐Ÿ”ข react-native-bignumber

The fastest Big Number library for React Native.

  • ๐ŸŽ๏ธ Up to 300x faster than all other solutions
  • โšก๏ธ Lightning fast implementation with pure C++ and JSI
  • ๐Ÿงช Well tested in JS and C++ (OpenSSL)
  • ๐Ÿ’ฐ Made for crypto apps and Wallets
  • ๐ŸคŒ Up to 5x smaller in JS-bundle size
  • ๐Ÿ”ข Store numbers as big as your Phone's RAM can store
  • ๐Ÿ” Easy drop-in replacement for BN.js

Installation

React Native ย 

yarn add react-native-bignumber
cd ios && pod install

Expo ย 

expo install react-native-bignumber
expo prebuild

Usage

..as a normal library

The exposed BN class is used to create new BigNumber instances from strings (binary, hex, decimal), ArrayBuffers, Buffers, numbers, or other BigNumber instances.

import { BN } from 'react-native-bignumber'

const a = new BN(3274556)
const b = new BN(9856712)
const c = a.mul(b) // 32.276.355.419.872

Refer to BN.js' documentation for a full API reference and usage guide.

For example, this is how you calculate large Fibonacci numbers:

function fibonacci(n: number): BN {
  let prev = new BN(0)
  let prevPrev = new BN(1)
  let number = new BN(1)

  for (let i = 1; i < n; i++) {
    prevPrev = prev
    prev = number
    number = prevPrev.add(prev)
  }

  return number
}

const f = fibonacci(50) // 12.586.269.025

..as a drop-in replacement

Since popular libraries like ethers.js or elliptic use BN.js under the hood, react-native-bignumber exposes exactly the same API as BN.js so it can be used as a drop-in replacement and promises much greater speed at common crypto operations.

In your babel.config.js, add a module resolver to replace bn.js with react-native-bignumber:

+const path = require('path');

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
+   [
+     'module-resolver',
+     {
+       alias: {
+         'bn.js': 'react-native-bignumber',
+       },
+     },
+   ],
    ...
  ],
};

Now, all imports for bn.js will be resolved as react-native-bignumber instead.

In the Exodus app, this single line change reduced app launch time by 4 seconds! ๐Ÿš€

Community Discord

Join the Margelo Community Discord to chat about react-native-bignumber or other Margelo libraries.

Sponsors

Exodus

This library is supported by Exodus. Send, receive, and exchange Bitcoin and 160+ cryptocurrencies with ease on the world's leading Desktop, Mobile and Hardware crypto wallets: exodus.com

Adopting at scale

react-native-bignumber was built at Margelo, an elite app development agency. For enterprise support or other business inquiries, contact us at [email protected]!

react-native-bignumber's People

Contributors

axeldelafosse avatar ferossgp avatar gabimoncha avatar hannojg avatar mrousavy avatar nnnoel avatar shamilovtim avatar szymon20000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-bignumber's Issues

Points to old/wrong namespace [Android]

Android throws an runtime Error while loading the C++ library :

Didn't find class "com.reactnative bignumber.BigNumber Module"

I see we recently changed the namespace to com.margelo.bignumber . maybe something was missed ( just an assumption). Open to propose a fix creating a PR but need some initial pointers ๐Ÿ˜…

PS : thanks for the amazing libraries and OSS work . Team Margelo ๐Ÿ’™

Maybe use more c like approach.

Currently, every native BigNum contains separate set of native methods what probably slowdowns its initialisation.
Maybe it would be better to have one global set of methods and pass there all args.

Example

BN.add(a, b) 

instead of

a.add(b)

.toString('hex') and .toString(16) not returning correct hexadecimal representation

When using the .toString('hex') and .toString(16) methods on a BN object, the returned value doesn't seem to represent the correct hexadecimal format of the number. Instead, it's simply returning the decimal value as a string.

Code Sample

With bn.js:

console.log(
  "BN result",
  new BN(100).toString("hex"),
  new BN(100).toString(16),
);
// Expected LOG:  BN result 64 64

With react-native-bignumber:

console.log(
  "BN result",
  new BN(100).toString("hex"),
  new BN(100).toString(16),
);
// Actual LOG:  BN result 100 100

Env info:

    "react-native": "0.71.7",
    "react-native-bignumber": "^0.2.1",
    "bn.js": "^5.2.1",

Causes build errors with Expo's EAS Build

Kudos on this awesome library. I'm so excited to see and support the work from Margelo โ€“ you all make an incredible team.


I just encountered a strange issue I thought I'd make you aware of:

react-native-bignumber is causing the following Android build error in EAS build:

No signature of method: build_3f07tkrdhml72rs2c7ujzo3ms.android() is applicable for argument types: (build_3f07tkrdhml72rs2c7ujzo3ms$_run_closure2) values: [build_3f07tkrdhml72rs2c7ujzo3ms$_run_closure2@55bc1bb5]

Reproduced with versions 0.1.5 and 0.1.3.

Relevant expanded build logs:

> Configure project :expo
Using expo modules
...
> Configure project :react-native-bignumber
BigNumber: node_modules/ found at: /home/expo/workingdir/build/node_modules
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/node_modules/react-native-bignumber/android/build.gradle' line: 88
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':react-native-bignumber'.
[stderr] > No signature of method: build_3f07tkrdhml72rs2c7ujzo3ms.android() is applicable for argument types: (build_3f07tkrdhml72rs2c7ujzo3ms$_run_closure2) values: [build_3f07tkrdhml72rs2c7ujzo3ms$_run_closure2@55bc1bb5]
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 1m 9s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Android build crashes because of duplicate libssl.so

* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
   > 2 files found with path 'lib/x86_64/libssl.so' from inputs:
      - .../node_modules/react-native-bignumber/android/build/intermediates/library_jni/debug/jni
      - .../.gradle/caches/transforms-3/63e67c36e7887bc75ff2c57fc2a952d6/transformed/jetified-flipper-0.138.0/jni
     If you are using jniLibs and CMake IMPORTED targets, see
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets

I managed to have it fixed locally with a patch, but I'm not familiar with the implications in projects which do not have libssl from other dependencies.

diff --git a/android/build.gradle b/android/build.gradle
index a5dafe8..115c78d 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -118,7 +118,7 @@ android {
   }
     packagingOptions {
         jniLibs {
-            excludes += ['**/libc++_shared.so', '**/libfbjni.so', '**/libreactnativejni.so', '**/libjsi.so']
+            excludes += ['**/libc++_shared.so', '**/libfbjni.so', '**/libreactnativejni.so', '**/libjsi.so', '**/libssl.so']
         }
         resources {
             excludes += ['**/MANIFEST.MF']

Decimals being removed

Please correct me if I'm wrong.
I realised the decimals are being chopped off when creating a new instance of a string and then converting it back to a string (with or without any additional methods used).

const price = "10.50";
console.log(price); // 10.50

const bn = new BN(price);
console.log(bn.toString(10)); // 10

const bn2 = new BN(price, 10);
console.log(bn2.toString(10)); // 10

 console.log(bn.mul(new BN(3)).toString(10)) // 30

Not able to build react native app on Android

"react-native-bignumber": "0.1.9",

Error:

* Where:
Build file '.../node_modules/react-native-bignumber/android/build.gradle' line: 331
* What went wrong:
Execution failed for task ':react-native-bignumber:extractAARHeaders'.
> Could not resolve all files for configuration ':react-native-bignumber:extractHeaders'.
   > Could not find fbjni-0.5.0-headers.jar (com.facebook.fbjni:fbjni:0.5.0).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni/0.5.0/fbjni-0.5.0-headers.jar

Support for react native 0.71.x for android

hey there, while updating my project to react native 0.71.3 version, I ran into this build issue:

Build file 'PROJECT/node_modules/react-native-bignumber/android/build.gradle' line: 184

* What went wrong:
A problem occurred evaluating project ':react-native-bignumber'.
> Expected directory '/PROJECT/node_modules/react-native/android' to contain exactly one file, however, it contains no files.

I saw in react-native-vision-camera project, you released a fix:
mrousavy/react-native-vision-camera#1418

can it be applied here as well?
thanks ๐Ÿ™

Different output when using react-native-bignumber and bn.js

I'm trying to use this package in a project which uses elliptic and one of the functions produce different output when using react-native-bignumber and bn.js. I managed to identify piece of code that returns different output. I tested it in the example app of react-native-bignumber. The code looks pretty much like this.

import bn_elliptic from 'bn_elliptic';
import elliptic from 'elliptic';

const secp256k1 = new elliptic.ec('secp256k1');
const bn_secp256k1 = new bn_elliptic.ec('secp256k1');

const kI =
  '9dc74cbfd383980fb4ae5d2680acddac9dac956dca65a28c80ac9c847c2374e4';
const n = secp256k1.curve.n;
const G = secp256k1.curve.g;
const Q = G.mul(kI);

const n_BN = bn_secp256k1.curve.n;
const G_BN = bn_secp256k1.curve.g;
const Q_BN = G_BN.mul(kI);

console.log(Q.x.umod(n));
// output: e696d0036454d7b7890bd425947329f68d9c7c0e2de44958e5700a30ca98b02c
console.log(Q_BN.x.umod(n_BN));
// output: 54c4a33c6423d689378f160a7ff8b61330444abb58fb470f96ea16d99d4a2fed

It looks like there are some differences in umod implementation but I might be wrong.

Insta crash on Hermes but works with JSC

Hey friends ๐Ÿ‘‹,

I recently enabled this library in a project. Everything seemingly went through until I enabled Hermes engine. The app crashes immediately after launching with error:

error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been returned to the state before expression evaluation.

I found out that the issue happens in either of these methods BN_bn2lebinpad, BN_bn2binpad:

if (le)
{
BN_bn2lebinpad(thiz->bign, ab.data(runtime), len);
}
else
{
BN_bn2binpad(thiz->bign, ab.data(runtime), len);
}

Here's value of ab:
Screenshot 2023-01-24 at 12 05 06 PM

What I tried so far:

  • I commented out toArrayLike (inside commonjs/BigNumber.js) below here but weirdly the issue is still there. I wasn't able to find any toArrayLike invocations anywhere else

native.toArrayLike.call(
this.internalBigNum,
res.buffer,
endian === 'le',
len || -1
);

  • If I wrap if(ab.data(runtime) != NULL) the issue goes away but application doesn't behave correctly.

I would appreciate any suggestions.
Thanks!

Android tombstone on a clean "npx react-native init" project

My Environment

  1. Mac M1
  2. React Native version 0.69.3
  3. react-native-bignumber 0.8.1

Steps to reproduce

  1. npx react-native init helloRN
  2. yarn add react-native-bignumber
  3. In App.js:
  • `import {BN} from 'react-native-bignumber';
  • add a console.log(new BN("0x111");

When running npx react-native run-android I get the following tombstone:

08-04 08:20:53.312  6099  6099 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-04 08:20:53.312  6099  6099 F DEBUG   : Build fingerprint: 'google/sdk_gphone64_arm64/emulator64_arm64:12/SE1A.220203.002.A1/8151367:userdebug/dev-keys'
08-04 08:20:53.312  6099  6099 F DEBUG   : Revision: '0'
08-04 08:20:53.312  6099  6099 F DEBUG   : ABI: 'arm64'
08-04 08:20:53.312  6099  6099 F DEBUG   : Timestamp: 2022-08-04 08:20:53.144832398+0300
08-04 08:20:53.312  6099  6099 F DEBUG   : Process uptime: 0s
08-04 08:20:53.312  6099  6099 F DEBUG   : Cmdline: com.hellorn
08-04 08:20:53.312  6099  6099 F DEBUG   : pid: 6030, tid: 6081, name: mqt_js  >>> com.hellorn <<<
08-04 08:20:53.312  6099  6099 F DEBUG   : uid: 10147
08-04 08:20:53.312  6099  6099 F DEBUG   : tagged_addr_ctrl: 0000000000000001
08-04 08:20:53.312  6099  6099 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
08-04 08:20:53.312  6099  6099 F DEBUG   :     x0  0000000000000000  x1  00000000000017c1  x2  0000000000000006  x3  0000006d1c4b4320
08-04 08:20:53.312  6099  6099 F DEBUG   :     x4  00000000ebad808a  x5  00000000ebad808a  x6  00000000ebad808a  x7  00000000ebad808b
08-04 08:20:53.312  6099  6099 F DEBUG   :     x8  00000000000000f0  x9  0c0bea7f82fdc56d  x10 0000000000000000  x11 ffffff80fffffbdf
08-04 08:20:53.312  6099  6099 F DEBUG   :     x12 0000000000000001  x13 0000000000000045  x14 00000063f996e3c1  x15 00000063f99829c0
08-04 08:20:53.312  6099  6099 F DEBUG   :     x16 000000705c19b050  x17 000000705c177eb0  x18 0000006d16bf4000  x19 000000000000178e
08-04 08:20:53.312  6099  6099 F DEBUG   :     x20 00000000000017c1  x21 00000000ffffffff  x22 ffffffffffffffff  x23 0000006d1c4b4580
08-04 08:20:53.312  6099  6099 F DEBUG   :     x24 0000000000000000  x25 0000006d375bb1f0  x26 0000000000000001  x27 b400006f28340df0
08-04 08:20:53.312  6099  6099 F DEBUG   :     x28 b400006e78314e90  x29 0000006d1c4b43a0
08-04 08:20:53.312  6099  6099 F DEBUG   :     lr  000000705c12aba0  sp  0000006d1c4b4300  pc  000000705c12abcc  pst 0000000000001000
08-04 08:20:53.312  6099  6099 F DEBUG   : backtrace:
08-04 08:20:53.312  6099  6099 F DEBUG   :       #00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #01 pc 00000000000af7e4  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libc++_shared.so (BuildId: ece72a2eb
c3774a1be9fd21271258acd3bcdfaa7)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #02 pc 00000000000aedc8  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libc++_shared.so (BuildId: ece72a2eb
c3774a1be9fd21271258acd3bcdfaa7)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #03 pc 00000000000aebf8  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libc++_shared.so (__gxx_personality_
v0+200) (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #04 pc 00000000002c5ec4  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #05 pc 00000000002c5f94  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #06 pc 000000000013aa78  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (facebook
::jni::HybridClass<BigNumberCppAdapter, facebook::jni::detail::BaseHybridClass>::javaClassLocal()+184) (BuildId: 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #07 pc 000000000013a8d4  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (facebook
::jni::HybridClass<BigNumberCppAdapter, facebook::jni::detail::BaseHybridClass>::registerHybrid(std::initializer_list<JNINativeMethod>)+40) (BuildId: 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #08 pc 000000000013a880  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BigNumbe
rCppAdapter::registerNatives()+84) (BuildId: 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #09 pc 000000000013a81c  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #10 pc 000000000013a7e8  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #11 pc 000000000013a79c  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #12 pc 000000000013a774  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #13 pc 0000000000139358  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (BuildId:
 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #14 pc 00000000000102c4  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libfbjni.so (facebook::jni::initiali
ze(_JavaVM*, std::__ndk1::function<void ()>&&)+108) (BuildId: 5b9237c4cf8ff477d69b3a6401b060d9b7f17a75)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #15 pc 0000000000138d08  /data/app/~~pnHSV1U4W5mJ4pBc4Hq8jg==/com.hellorn-5FMUw2-Y0ruT8Ydw-TT1NQ==/lib/arm64/libreactnativeBigNumber.so (JNI_OnLo
ad+68) (BuildId: 863b4fcd31a6cce63769ea5f08d80ed76399fadc)
08-04 08:20:53.312  6099  6099 F DEBUG   :       #16 pc 0000000000453ffc  /apex/com.android.art/lib64/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1
::char_traits<char>, std::__1::allocator<char> > const&, _jobject*, _jclass*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+3116) (BuildId: e6c658201ef1
ec3760112fa1b838ab2c)

Can't merge user_target_xcconfig for pod targets: ["react-native-bignumber", "react-native-quick-crypto"]

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project!

Today I used patch-package to patch [email protected] for the project I'm working on.

Upon running 'pod install', we encountered the following warning message:
[!] Can't merge user_target_xcconfig for pod targets: ["react-native-bignumber", "react-native-quick-crypto"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

To resolve this, I patched the package and set the CLANG_CXX_LANGUAGE_STANDARD to "c++17" for the 'react-native-bignumber' pod. This adjustment successfully addressed the conflict and allowed the 'pod install' command to complete without any further issues.
Here is the diff that solved my problem:

diff --git a/node_modules/react-native-bignumber/react-native-bignumber.podspec b/node_modules/react-native-bignumber/react-native-bignumber.podspec
index d9fbaea..d8e6d38 100644
--- a/node_modules/react-native-bignumber/react-native-bignumber.podspec
+++ b/node_modules/react-native-bignumber/react-native-bignumber.podspec
@@ -32,7 +32,7 @@ Pod::Spec.new do |s|
     "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\"  \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" "
   }
   s.xcconfig               = {
-    "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
+    "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
     "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\"  \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\""
   }
 

This issue body was partially generated by patch-package.

Getting errors in ios build, working fine in android

I'm getting error something like this in ios build. In android app is compiled without any issues. Tried clearing RN cache. Re-installing node_modules and also deleting whole Pods folder and installing again. Nothing worked.

image

JSI Limitations

Hello!

I'm attempting to debug an application in iOS using Chrome, and hitting a JSI error. Curious, is there any way around this?

Thinking about possibly wrapping the native class and falling back to BN.js when JSI is not enabled (debug only). Wondering if there are other solutions that have been considered?

Xcode 15.3 build issue

Receive this error after Xcode update : No matching function for call to 'remove_if' in MGBigNumberHostObject.cpp

Screenshot 2024-03-06 at 14 46 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.