oracle / oracle/pushiomanager-react-native
SDK wrapper does not properly implement methods across platforms
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 19
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Using the method declarePreference as an example:
-
- On both iOS and Android this method requires reading the source code to understand how to use it. The lack of valid documentation contributes to a lack of transparency into how methods are not implemented the same on both Android and iOS.
- On iOS
declarePreference:
- To store a String requires a parameter of
0which is opaque to the developers using this library. Why a 0? Presumably because it was easy to write the iOS implementation and ask for a 0 rather than to offer something more declarative. The correctness and user friendliness of such shortcuts aside, the library does not document this enum anywhere. Developers are left scanning the source code in order to use the library and React Native developers are not supposed to be scanning native source code and are not expected to understand it. This is not how a Javascript SDK wrapper is meant to be used. - On Android the very same method, instead of a
0requires"STRING"to store a string. This is not a correct cross platform implementation, and defeats the purpose of bringing a library like this to a cross platform framework like React Native. Your iOS and Android developers are supposed to be cooperating and making sure that the javascript methods are implemented identically on both platforms. Where there are exceptions, you're supposed to call them out in documentation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the JavaScript wrapper entry point for declarePreference and compare its iOS and Android native implementations, starting with how the string type is represented on each platform. Done means the method has a consistent cross-platform contract, with any required platform differences clearly documented for React Native users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript, react-native
- Domain
- developer-experience, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100