While Android's require implementation is able to handle circular references - iOS is not.
This is due to the underlying implementations - where Android is written in JS and mimics Node.js, while iOS is native. There's multiple possible solutions here:
- Use rollup under the hood on apps as part of our build process.
- Migrate iOS to use a shared require implementation with Android
I personally prefer the second, but it'd take some re-architecting of how iOS starts up - and it's unclear to me how we'd tweak Android to use a require implementation under common rather than the one baked into the the runtime (the JS is baked in as bytes and executed early).