Retired: ICDevs.org Bounty 0 - React-Native Agent

The bounty has been ratified and is open for applications. I’m trying to work with DFINITY to fix the message board code that won’t let me edit my original post…if we can’t get it resolved we may need to pick a different venue.

This step is pretty straightforward. In an effort to keep people from duplicating the effort, someone needs to step up and ‘apply’ for the bounty. The bounty is now 21 ICP.

If you’d like to apply in a less public way you are welcome to send me a DM on the forum software or at Austin at icdevs dot org.

2 Likes

@skilesare

I saw the NNS Motion proposal which I assumed created: Internet Computer Network Status

Maybe I am missing something, but I am not sure what the proposal is asking the community, to be honest. Since the proposal is sent, can you help update in the thread to clarify what the community is voting on?

(its possible I am the one missing something very obvious)

Oh man… I guess I screwed that up. I was using axon: Axon and I thought that “motions” just stayed on the system and had no action. I guess we approved the neuron to propose a motion to the NNS. Oops. Well…I guess the community can ratify it also!

This was not meant to go to the NNS. I guess we need to add a top-level “motion” to axon to use it the way we want to.

6 Likes

Hello. How relevant is this task for porting Android Kotlin/Java?

Probably only tangentially related. I’d imagine that some of the code that would work for Java/kotlin would be on the back end of the Android libraries that react native has to talk to to communicate with the Android OS. If your interested in that side we could carve out that portion of it, but this bounty does require wiring it all up in react native template project.

I have fantastic news to share.

Thanks to the work of the maintainer of react-native-v8, the latest version of that library now supports WebAssembly.

That means BLS signature verification now works on both iOS and Android without needing to write any custom Rust or C++ native code.

Caveats:

  • Must be at least iOS 14 and can’t use Hermes
  • Android must use react-native-v8 v0.65.2-patch.1 or v0.66.3-patch.1. That means you must be running React Native v0.65 or v0.66 (for now). Hermes and JSC (for Android) are not yet supported
6 Likes

This is great news! Does this mean that setting up a project is as easy as npm install with the right config?

Hmm that would be part of it, but the tricky thing with mobile is that every RN + IC project would still need to make some changes to their Android and iOS native code to properly install some of the npm dependencies, such as react-native-v8.

For example, they will need to update their build.gradle files. There might need to be a custom script (kinda like create-react-app or dfx new) that can auto-generate a skeleton RN + IC git repo.

Ok cool…so it sounds like this bounty has been reduced to writing up some basic instructions and integrating the configurations with those instructions into GitHub - MioQuispe/create-ic-app: Use your favourite frontend framework with the Internet Computer.

There are 21 ICP in this bounty right now…maybe we should reward the maintainer of react-native-v8 with some of this? And the have the rest for the person willing to put the instructions together?

This is a great opportunity for someone to get their feet wet with the IC and make ~$800 in the process.

2 Likes

Yeah, that’d be awesome if we could reward the react-native-v8 maintainer with a part of the bounty. I’m sure he would be happy about that.

2 Likes

Do you have a github username? I can reach out.

1 Like

This is his profile: Kudo (Kudo Chien) · GitHub

We’ve accelerated this bounty with 10 more ICP from the DFINITY Acceleration Grant.

We are going to set aside 5 ICP for the dec that added the wasm stuff to the android build. This is now a 26 ICP bounty for basically setting up some config files. If you want to get involved in building for the IC, this is a great spot to do it!

2 Likes

Thank you to the moon and back. This unblocked me after months. I’m the founder of DSocial, we are YouTube on the IC.

Mobile app is back in development now :slight_smile: Thank you!

1 Like

Working on iOS but not Android: GitHub - decentralised-social/expo-rn-dfinity-icp-example: Example React Native (in Expo) using ICP

Expo (React Native) JS Engine when running in Debug

Shake phone, and tap Debug Remote JS, you’ll notice the app now works on Android. This is because the JS Engine on Android in Debug mode supports BigInt :man_facepalming:

But that means normal mode and native builds do not #FunTimes :wink:

This is amazing :rofl:

I wonder why a polyfill does not work?

LOL

Basically the * / ** === & | etc etc ops, don’t work reliably via the polyfill. These seem to give unexpected results and as such the while loops runs forever.

This only happens is the typeof of a bigint is object, thus not native support. If typeof is bigint it works.

iOS device/simulator: debugger on/off: bigint
Android simulator/device, debugger on: bigint
Android simulator/device, debugger off: object

@dpdp - did you pull the bls verification code that you’re patching in from an existing package, or did you write it yourself? If it is from Origyn, do we have your permission to add it to agent-js? I’ve just merged support to polyfill BLS verification without patching feat: support for bls verification polyfill by krpeacock · Pull Request #626 · dfinity/agent-js · GitHub, and I’d like to make this process simple by shipping the polyfill as an additional package on NPM as @dfinity/bls-verify, so that we don’t have to ask people to copy a large file around

Oh wait, I see that it was auto-generated from the wasm

@kuchmenko did work on this and can explain a bit more; I think we just converted the wasm to js; but there is some caveats;

@kuchmenko mentioned Plug has another solution which is to run the Rust code via FFI;