Turns out the JSC included with React Native on Android includes a buggy implementation of ArrayIterator that is missing an exposed next() method, so we implement it ourselves instead.
The method name changed to sortedBy to reflect that it returns a new Results object and to be more succinct. Also, the second optional argument instead reflects descending (or rather, reverse) since it's an anti-pattern to have an optional argument default to true in JS, and this also follows precedences set by other JS libraries and by Python's sorted function.
* master: (207 commits)
Convert to using new React Native MainActivity template
Create RealmReactPackage for our Android plugin
Fix doc for Android
NPM ignore react-native/android folder
Skip building Android module under Xcode
Skip building Android module for iOS tests
gitignore Android downloads folder
Update README with instructions to run on Android
Use un-patched RN for Android by installing hook into JSC
cleanup build system
Use Realm in node_modules for ReactTests on Android
Change Demo => ReactTests
adding a 'publishAndroid' task to generate the AAR with prebuilt .so files
Adjust POM_NAME
Use consistent package naming
Remove old Demo files
Add copyright to JNI file
Cleanup platform.hpp
Make our Android module buildable as a dependency
Add `npm test` command
...
This component is fully backwards compatible with the original React ListView, but is compatible with Realm Results and List objects to use their snapshot functionality along with more efficiently checking if each row should update.
* sk-schema-api:
Improve clarity of schema parsing and serialization
Add test that checks schema validation
Update README with new Schema API
Cleanup some code and comments to make it consistent
Convert tests to create objects with property objects
Update example apps with new schema API
Remove confusion between propTypes and objectTypes
Simplify object schema info returned from RPC
RPC now keeps object keys in the same order
Change schema API to take properties as an object
Add method to clear mutation listeners in RPC client
Plug small leak from not releasing a JSStringRef
Make RJSStringForValue use consistent exception style
Improve error messages inside RJSUtil
The RPC layer now only speaks in objectTypes, since they don't always equate to propTypes. We were overloading the use of propTypes for no good purpose.
The Results class was updated to match the style of List and include a flag (m_live) that determines if it should sync updates. If an object in the static Results is deleted, then it will return null.
The top-level package.json explicitly includes the directories it needs (vendor/.npmignore cuts down the cruft). The publish-beta.sh script essentially uses `npm pack` to package up the NPM module and then push it into an orphaned `beta` branch.
Specifically for objects with lists, since the mutation listener would fire on a list that no longer is attached. If during the mutation listener that error is thrown, then the listener will be removed and the error will not be propagated.
Previously we were not accounting for the byte offsets and misunderstood how the Uint8Array constructor worked. The tests now confirm everything works as expected with multiple different typed arrays and slices of the data.
React Native now leaves the original object accessible when it "polyfills" objects. So we check for that, but still have the previous logic in place in case they change their minds.