I have a testing app in react native, and all works fine when I have enabled the debug js remotely. It works fine in device (from XCode) and simulator, after run:
The main part of your question has been answered, but I see there's still some uncertainty about why it works with remote debugging enabled.
When debugging remotely, the JavaScript code is actually running in Chrome, and the diffs to the virtual dom are being communicated to the native app over a web socket.
http://facebook.github.io/react-native/docs/javascript-environment
atob
and btoa
are available in the context of the browser, and that's why it works there.
When you stop debugging, though, the JavaScript is again interpreted in a process on your device or simulator, which doesn't have access to functions that are provided by the browser.