This also appears to fix crashes when running ReactTests with Chrome debugging enabled!
The crash when tests failed was due to JavaScriptCore trying to create a backtrace with the native call stack.
The test structure is now provided by a JS API, that is used by all things that run tests. Also, the tests can be run manually by tapping a button in the ReactTests app.
The deleteTestFiles() function is now added to the Realm object, so that it's easy for the RPC module to handle this as well. We can only do this in testing environments in the future.
An exception was thrown when parsing the JSON when only a string was passed. This is better and no longer uses the Objective-C API for converting the dictionary to a JSValue.
* sk-react-framework: (27 commits)
Change RealmReact to be a dynamic framework
finish Array to List rename
RJSArray -> RJSList
move property getters to object store code
move List class to its own file
ObjectArray -> List
Add Notification constructor and destructor
Small improvement to notifications test
RJSException no longer requires JS strings
Protect realm and callback from GC in addNotification
Add comments
pr fixes
minimal tests for migrations
Check for NaN inside RJSValidatedValueToNumber
allow running all tests at the same path by invalidating all cached realm paths between test runs
Native methods should convert to numbers/bools
Out of bounds getters for Results return undefined
Out of bounds list item getters return undefined
Consolidate code that verifies array index bounds
Add list item setters in JS
...
It embeds RealmJS and GCDWebServers frameworks. This fixes#58, where there were issues with building for devices rather than just the simulator.
Some changes were made so that RealmReact.m didn't need to be weakly linked to libReact.a since that would actually cause any executable that uses this framework from being able to compile with bitcode.
Since most often some kind of JS Error is passed into RJSException, it would mask the original error by throwing a new exception because that Error was not a string!