alinz / react-native-webview-bridge

React Native Webview with Javascript Bridge
MIT License
1.37k stars 493 forks source link

Moving the webview brigde to React-Native Core #109

Closed alinz closed 4 years ago

alinz commented 8 years ago

Hello guys,

I have decided that, it is time to move this project into core. one of the problem with maintaining this project is not be able to extend the native class and as a result I have to copy and paste the entire source code of WebView implementation of react-native. This makes it very difficult. So what I'm asking is goto this link and vote that one. If I get the confirmation from core-team I will make a PR request to WebView and I will merge this project to core.

stereodenis commented 8 years ago

@alinz it is good idea! But could you check PRs?)

goldenice commented 8 years ago

This should be a core functionality for sure, but perhaps a more high level approach (e.g. executing arbitrary JS in the webview) would be more useful. I'm not sure how that would work on iOS, but I do know that would be easy to implement on Android. Writing your own bridging implementation (at least RN to webview) would be trivial if that kind of communication is possible

alinz commented 8 years ago

@goldenice RN's WebView has already implemented run arbitrary JS. what I want to add is the reverse one. WebVIew send a message back to RN. If you look into the implementation of WebView, you will see most of the important classes are inlined and because of that you can't extend it. That's what I want to do in core.

stereodenis commented 8 years ago

@alinz https://github.com/alinz/react-native-webview-bridge/pull/90

fungilation commented 8 years ago

You have my vote. But approve pending PRs pretty please

Naoto-Ida commented 8 years ago

+1

Hamiltontx commented 8 years ago

+1

bbay commented 8 years ago

+1

tslater commented 8 years ago

Is there a PR for the react-native core?

alinz commented 8 years ago

working on it. should be send to them by couple of days.

huangciyin commented 8 years ago

+1

alinz commented 8 years ago

Since I'm still behind and react-native 30 is just around the corner, I will delay this and release the new version of app this weekend. Extremely busy with other stuff but I will find a time this weekend and make it available for you guys.

CaoLiang1991 commented 8 years ago

+1

starlight36 commented 8 years ago

+1

stereodenis commented 8 years ago

@alinz we're waiting))

imlooke commented 8 years ago

+1

benlinton commented 8 years ago

+1

ackdav commented 8 years ago

+1

HectorFL commented 8 years ago

+1

dfejgelis commented 8 years ago

RN 0.30 is here :)

fungilation commented 8 years ago

Is it including the bridge integrated? On Thu, Jul 21, 2016 at 11:15 AM Diego Fejgelis notifications@github.com wrote:

RN 0.30 is here :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alinz/react-native-webview-bridge/issues/109#issuecomment-234337820, or mute the thread https://github.com/notifications/unsubscribe-auth/ADoJSvvjF5Swi6t6IKt1bymr53AA2YQvks5qX7cvgaJpZM4I8_pF .

ackdav commented 8 years ago

doesnt seem like it...? -> release notes

jd327 commented 8 years ago

+1

jzimmek commented 8 years ago

+1

cbcye commented 8 years ago

+1 for this feature

kinergy commented 8 years ago

+1

Roman-K93 commented 8 years ago

+1

avishayil commented 8 years ago

+1

Fasani commented 8 years ago

+1

lebascou commented 8 years ago

+1

daikini commented 8 years ago

+1

rbmedia commented 8 years ago

+1

musicode commented 8 years ago

does it finished?

saulshanabrook commented 8 years ago

@musicode The core team haven't weighed in on whether they want this in React and there has been no public progress on integrating the code.

juankiz commented 8 years ago

Hey @alinz have you found time to work on the pull request? If you need more hands let us know, I'd be glad to help if needed :)

avishayil commented 8 years ago

@alinz Are you following here mate?

alidawud commented 8 years ago

Hi Mr. @alinz any good news?

MacKentoch commented 8 years ago

Some news here #141

stereodenis commented 8 years ago

https://github.com/facebook/react-native/pull/9762

fungilation commented 8 years ago

Hmm https://github.com/facebook/react-native/pull/9762#issuecomment-246062195

Etheryte commented 8 years ago

I wonder what a reasonable estimate would be on the above link getting merged? I need the functionality, but it would seem a waste to merge the different fixing branches from here only to have the functionality available in the main package shortly after.

fungilation commented 8 years ago

RN releases every 2 weeks. So in 0.34 or 0.35?

adamkdean commented 7 years ago

Still not release. Last activity 7 days ago. 😭

alinz commented 7 years ago

There is an issue in this PR https://github.com/facebook/react-native/pull/6478 which holds me back to send a PR to core. Core team still debating about the right API and I'm waiting for that. In a meantime, I was working on RPC implementation which significantly simplify the process of calling methods on both WebView and React-Native. Checkout out the v2 branch.

in terms of release, I won't release any version until WebView changes in react-native side.

tioback commented 7 years ago

@alinz in the mean time, can we use branch v2?

alinz commented 7 years ago

@tioback yes, you can, v2 branch is being used in production at the moment and we are using RPC implementation on top of that. Please refer to the rpc example on that branch.

adamipc commented 7 years ago

@alinz Is v2 ready on Android? I notice the README for v2 is a bit sparse, leaving out the instructions from master that I assume are still required. But it doesn't say how to specifically add the javascript asset files on both Xcode and Android, If it DOES work on Android, could you at least write up a little how to on where to put the js files so they can be loaded? Thanks!

Etheryte commented 7 years ago

@adamipc If you look at the example project, you can see that you need to add the two script files directly into your main project in Xcode. Haven't tested it in Android.

Agreed, that better documentation would help, but all in due time.

adamipc commented 7 years ago

@Etheryte Thanks, you're right, the example project does show where to add stuff and I should be able to use that to figure it out (it does appear to have Android as well so I'll test for myself whether it works)

GantMan commented 7 years ago

@alinz - Awesome work, we all appreciate you adding this to core.