Open dotnetprofessional opened 8 years ago
@dotnetprofessional Thanks for reporting this. I will look at updating this plugin for that usecase.
Great! Not to put any pressure on you ;) But do you have any idea when you might get the chance to update it?
@dotnetprofessional It will probably be a while. I am currently working on web workers for ReactNative, that I am speaking about at conferences. I need to get those done before I work on this.
Would appreciate pull request if you have the time.
@dotnetprofessional I finally got a chance to look into this and looks like that is not the only breaking change. The bigger change is the introduction of MainApplication
- this is where the native modules are initialized.
This is a problem since we would not really have an Activity
when the native module is initialized. Cordova's interfaces require an activity, and are always based on that. Thus, we would need to find a way to access that package in the MainActivity
, initialize it when that activity is created and then run the plugin, when the exec
method is called.
This looks like a total re-write of the plugin, given that so many pieces have moved around.
+1
In case this helps anyone–
It's possible to use an older version of react-native by using the 'rninit' command:
npm install -g rninit
rninit App --source react-native@0.28.0
Then you'll be able to use react-native-cordova-plugin as-is. You'll be stuck at that version of react-native until this issue is resolved, of course, with whatever quirks and bugs that entails.
Btw, downgrading react-native and running react-native upgrade
(which prompts you to downgrade files in the android/ and ios/ dirs) did not work for me. I managed to get it to build, but the app would crash on startup—there's some additional state being bundled in from somewhere that I couldn't track down. YMMV.
+1
@axemclion Have you had chance to look at a fix for this issue? Many thanks.
@axemclion Have you had a chance to look?
@axemclion Any update, friend?
any news?
@nicsefer I have not had the time to work on this, but would accept pull requests.
@axemclion @mribbons it seems that the pull request has some issues. The readme it's missing the MainApplication.java example and the CordovaPluginPackage.java is missing "set_MainActivity". I don't know if something else is missing, I'll update this in case I find out more :) and thanks for the great work! :D
@theBliz I haven't submitted a PR yet because the work is incomplete.
The changes are only in my repo: https://github.com/mribbons/react-native-cordova-plugin
@mribbons got it :) so there are issues just in the ReadMe (broken links for the example)
Hi any news about the update? I've tried hacking my way to get it to work with the latest RN but no luck, it seems I have to wait until the branches merge :-)
@XBLDev you might be better off contributing your efforts to converting whichever libs you need to RN, this one doesn't seem to be moving.
I am glad to take contributions to this library - send in a pull request, or even better, please help by becoming a contributor.
Hi @axemclion How exactly do I send in a pull request? I've never done it before :-(
HI @axemclion, care to have a look at my repo? I don't have the necessary knowledge to get it working.
https://github.com/axemclion/react-native-cordova-plugin/issues/42
@XBLDev after cloning the repo and committing changes, use the New Pull Request button. There should be plenty of information online and on github itself.
Hi @mribbons I don't think I'm knowledgeable enough to make it working with the current RN either, I mean you seem to be pro at this and you can't even make it work, and i'm just a RN app developer, and unfortunately not a very good one :-)
Currently this is preventing the use of the code with the latest bits.