Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: needs updated #640

Open
MacKenzieHnC opened this issue Mar 22, 2023 · 8 comments
Open

Windows: needs updated #640

MacKenzieHnC opened this issue Mar 22, 2023 · 8 comments
Assignees

Comments

@MacKenzieHnC
Copy link
Contributor

MacKenzieHnC commented Mar 22, 2023

Bug report

Summary

Just making an issue I can reference later as I work through this. Please don't close this.

Short version is that the current C# implementation has tons of bugs that were introduced by RNW updating how they do things. Also, Windows example missing completely from repo.

Solution is to rewrite it in the current template as a C++ module and add in example.

@MacKenzieHnC MacKenzieHnC self-assigned this Mar 22, 2023
@MacKenzieHnC
Copy link
Contributor Author

MacKenzieHnC commented Apr 3, 2023

@vonovak I have been working at this for weeks and cannot figure out how this repo runs. I finally figured out what react-native-test-app does today, but even doing that for several hours, I cannot get the example to run on anything. I'm ready to work on the windows side, but I'm absolutely stuck until I get this.

What are the exact steps from cloning this repo to running the example, because I would swear this repo is broken if I didn't already know you're successfully working on it. (Android instructions are fine, I can modify them to Windows fairly easily)

@vonovak
Copy link
Collaborator

vonovak commented Apr 16, 2023

hello @MacKenzieHnC and sorry for taking so long

There is an example project that you can use for development of the library: https://github.com/rnmods/react-native-document-picker/tree/master/example

what you want to do it clone the repo, run yarn and then open the document-picker-example.xcworkspace file in example/ios folder using xcode. Similarly, in Android studio you'd open the example/android folder in android studio. There you can build and run the example project.

In both IDEs you'll be able to find the native source codes of the package, change them, recompile and see the result.

Mac and windows should follow similar pattern.

Hope this helps!

@MacKenzieHnC
Copy link
Contributor Author

MacKenzieHnC commented Apr 17, 2023

So, are you not actually using react-native-test-package? The run commands seem like that package isn't used at all, but that's the only way it makes sense for Windows and Mac example folders to be empty, but also the dist folder is missing.

Did you make or inherit this repo? I just want to be clear whether you are able to run this on your machine by following those instructions, or if it's possible there's some local change that isn't reflected in the repo.

P.S. No stress about taking your time responding. I honestly needed the break. I'll start looking into this again tomorrow.

@vonovak
Copy link
Collaborator

vonovak commented Apr 17, 2023

the react-native-test-app package is used in the example project. The point of having it that it makes it easy to upgrade RN versions in the example project - no need to go through the standard RN upgrade process.

I am able to run the example project on a freshly cloned repo. I guess I inherited the package but I added react-native-test-app myself. https://github.com/microsoft/react-native-test-app has some links about the motivation for having the package

@MacKenzieHnC
Copy link
Contributor Author

Okay, sorry for disappearing so long. I burned out.

Picking this back up again, and so far it's going well. I'll keep you posted on my progress.

@MacKenzieHnC
Copy link
Contributor Author

Having worked on it for a few hours, windows is still as goofy as I remember, but whatever was keeping me from even making a native module seems fixed now. So this should be doable

@MacKenzieHnC
Copy link
Contributor Author

MacKenzieHnC commented Jul 24, 2023

Sorry, React Native Windows is still an unimaginable headache to even start a module in.

I'll take another look when RN hits 1.0, but I'm not dashing myself on this rocky shore again.

@Victor0814gui
Copy link

I can write this part, it's relatively simple. I already have some native modules in my apps with this functionality written in cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants