I'm trying to use number formatter of Intl
, which works perfectly on iOS and when debugger is attached to either iOS or Android, but only fails on Android without debugger attached due to outdated JSC in Android.
After a bit research I've found two possible solutions:
- Use
Intl
polyfill - Use custom JSC in Android
I tried Intl
polyfill first like this after installing intl
and react-intl
using yarn:
//in my app's index.js
if (!global.Intl) {
global.Intl = require('intl');
}
Though it still says ReferenceError: Can't find variable: Intl
.
Then I gave up and tried to include custom JSC (I've confirmed that custom AAR is referenced correctly) though I still get the same error. No matter what I do I can't get Intl
to get running on Android without debugger attached.
What am I doing wrong? (I'm on React Native 0.59.9)